/*
    (c) hfx.
    SS responsive styles
*/

/**
    BOOTSTRAP breakpoints 
*/

/* XS - width < 768px */
/* Portrait mode - with side menu */
@media only screen and (max-width: 767px) and (orientation: portrait) {
    body {}

    .navbar-atm-right {
        top: 40px;
        height: calc(100% - 40px);
    }

    .ess-main-content {
        padding-bottom: 60px;
        height: calc(100vh - 110px);
        margin: 0 auto;
        width: 100%;
        overflow: auto;
        margin-top: 40px;
    }

    .ess-navbar-places ul {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
    }

    .ess-navbar-places ul li {
        padding: 0;
    }

    .ess-navbar.ess-navbar-places ul li .ess-navbar-item-icon {
        /* scale 48/80 = 0.6 */
        transform: scale(0.6);
        display: inline-block;
        transform-origin: left top;
        margin: 0;
        margin-left: calc((60px - 48px) / 2);
    }

    .ess-navbar.ess-navbar-places ul li .ess-navbar-item-label {
        /*font-weight: lighter;*/
        position: relative;
        top: -38px;
        text-decoration: none;
    }

    .ess-navbar-actions ul {
        display: flex;
        flex-direction: column;
        height: calc(100% - 70px);
        justify-content: space-around;
    }

    .ess-navbar-actions ul li {
        display: flex;
        flex-direction: row;
        margin: 0;
        padding: 0;
        align-items: center;
        height: 70px;
        flex: 0 0 auto;
    }

    .ess-navbar-actions ul li .ess-navbar-item-icon {
        /* scale 48/80 = 0.6 */
        transform: scale(0.6);
        transform-origin: center center;
        margin: 0 !important;
    }

    .ess-navbar-actions ul li .ess-navbar-item-label {
        font-size: 1.2rem;
    }

    .home-tiles {
        display: flex;
        flex-direction: column;
    }

    .home-tile {
        margin-bottom: 10px;
    }

    .home-tile:first-child {
        margin-bottom: 0;
    }

    .calendar-buttonsbar-bottom {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
    }

    .calendar-buttonsbar-bottom li {
        padding-top: 30px;
    }

    .calendar-buttonsbar-bottom .nav-btn {
        padding-top: 0;
        font-size: 9px;
    }

    .calendar-buttonsbar-bottom .nav-btn:before {
        /* scale 30/50 = 0.6 */
        transform: scale(0.6) translateY(-80px);
    }

    .nav-tabs.calendar-buttonsbar {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }

    .page-title-main {
        margin-bottom: 6px;
    }

    .open-shift-colours {
        font-size: 1rem;
        text-align: left;
    }

    .open-shift-colour-text::after {
        content: '';
        display: block;
    }

    .page-title-post-name,
    .page-title-user-name,
    .person-tile .page-subtitle {
        font-size: 1.4rem;
        margin: 0;
        margin-bottom: 6px;
    }

    .home-tile h1,
    .page-title-main,
    .my-account-banner .my-account-banner-title {
        font-size: 2rem;
    }

    .home-tile h2,
    .my-account-banner .my-account-banner-subtitle {
        font-size: 1.4rem;
    }

    .home-tile h3 {
        font-size: 1.2rem;
    }

    .home-tile h4 {
        font-size: 1.1rem;
    }

    nav ul li label {
        font-size: 1.2rem;
    }

    #employee_balances {
        margin-top: unset;
        font-size: 1.4rem;
    }

    #employee_balances span {
        display: inline-block;
        margin-right: unset;
    }

    .modal-content {
        width: unset;
    }

    .modal-content .table-striped {
        font-size: 1.2rem;
    }

    /* moved from ss-override */

    .ess-container-header {
        height: 40px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        display: block;
        background-color: #eee;
    }

    .ess-container-header h1 {
        padding: 3px;
        margin: 0;
        text-align: center;
        line-height: 34px;
        font-size: 1.8rem;
    }

    .navbar-atm-left {
        bottom: 0;
        top: auto;
        width: 100%;
        height: 70px;
        position: fixed;
        z-index: 1000;
    }

    .navbar-atm-left ul,
    .navbar-atm-left li {
        margin: 0;
        list-style: none;
        /*padding: 0;*/
    }

    .navbar-atm-left li,
    .navbar-atm-left li a {
        width: 60px;
        display: inline-block;
    }

    /* toggle side menu */

    .off-canvas {
        position: relative;
        width: 50em;
        transition-duration: .3s, .5s;
        transition-timing-function: ease-in-out;
        z-index: 9;
    }

    .off-canvas-left {
        transition-property: left, opacity, visibility;
    }

    .off-canvas-right {
        transition-property: right, opacity, visibility;
    }

    html,
    body {
        margin: 0;
        overflow-x: hidden;
    }

    .off-canvas {
        position: absolute;
        width: 20em;
        opacity: 0;
        visibility: collapse;
    }

    .off-canvas-left {
        left: -20em;
    }

    .off-canvas-right {
        right: -20em;
    }

    label.nav-toggle-label {
        display: block;
    }

    label.nav-toggle-label:hover,
    input.nav-toggle:checked~label.nav-toggle-label {
        color: #fff;
    }

    input.nav-toggle:checked~label.nav-toggle-label .nav-toggle-icon:before {
        content: "\e014"
    }

    input.nav-toggle:checked~.off-canvas {
        opacity: 1;
        visibility: visible;
        top: 40px;
    }

    input.nav-toggle:checked~.off-canvas-left {
        left: 0;
        box-shadow: -30em 0 0 30em #4d73a8, -2px 0 5px #ccc;
    }

    input.nav-toggle:checked~.off-canvas-right {
        right: 0;
        box-shadow: 30em 0 0 30em #4d73a8, -2px 0 5px #ccc;
    }

    input.nav-toggle:checked~.ess-main-content {
        margin-left: calc(20em + .5em);
        margin-right: calc(-1 * 20em + .5em);
    }

    .btnCheckBalance {
        float: right;
    }

    /* calendar-view-selector responsive styling */
    .calendar-view-selector.off-canvas {
        margin-top: 0;
        background-color: var(--body-bg);
        height: 100%;
        top: 0 !important;
    }

    .nav-tabs.calendar-buttonsbar-bottom {
        margin-left: 12px;
    }

    .calendar-view-selector.off-canvas .ess-tabs {
        flex-direction: column;
    }

    .nav-tabs.calendar-buttonsbar-bottom li {
        padding: 12px 0 12px 0;
    }

    .nav-tabs.calendar-buttonsbar-bottom .nav-btn {
        text-align: left;
        padding: 12px 0 12px 75px;
        font-size: 1.2rem;
    }

    .calendar-buttonsbar-bottom .nav-btn::before {
        top: unset;
        transform: scale(0.8) translateY(-20px) translateX(-100px);
    }

    .calendar-view-selector .calendar-buttonbar-button {
        position: static;
        margin-left: 12px;
    }

    /* open shifts info */
    div#color_key {
        text-align: left;
        margin: 0 auto;
        width: 35em;
    }

    .open-shift-colours:before {
        content: '';
        display: block;
    }

    .open-shift-colour:first-child {
        margin-left: 30px;
    }

}

/* SM - width >= 768px */
@media only screen and (min-width: 768px) {
    .calendar-buttonsbar-bottom .nav-btn:before {
        /* scale 40/50 = 0.8 */
        transform: scale(0.8);
    }

    #employee_balances {
        margin-top: unset;
    }

    #employee_balances span {
        display: inline-block;
        margin-right: unset;
    }

    .modal-content {
        width: unset;
    }

    .modal-content .table-striped {
        font-size: 1.2rem;
    }

    .nav-tabs.calendar-buttonsbar-bottom {
        width: 96%;
    }
}

/* MD - width >= 992px */
@media only screen and (min-width: 992px) {
    .calendar-buttonsbar-bottom .nav-btn {
        /* scale 60/50 = 1.2 */
        transform: scale(1.2);
    }

    .calendar-view-selector {
        margin-top: 10px;
        width: calc(100% - 10px);
    }

    .calendar-buttonsbar-bottom .nav-btn {
        padding-top: 50px;
        font-size: 9px;
    }

    .calendar-buttonsbar-bottom .nav-btn:before {
        /* scale 40/50 = 0.8 */
        transform: scale(0.8);
    }

    .calendar-datepicker .pager-btn:before,
    .calendar-datepicker .pager-btn:after {
        font-size: 1.5rem;
        /*        top: 3px;*/
        line-height: 2rem;
        /*
        top: 1px;*/
    }
}

/* LG - width >= 1200px */
@media only screen and (min-width: 1200px) {
    html {
        font-size: 12px;
    }


    .nav-tabs.calendar-buttonsbar-bottom li a,
    .pager-btn-label {
        font-size: 1rem;
    }

    .ess-navbar-item-label {
        font-size: 1.2rem;
    }
}


/**
    DEVICE specific breakpoints 
*/

/* Smaller phones in portrait mode */
@media only screen and (max-width: 448px) and (orientation: portrait) {
    /* hide the calendar datepicker labels */

    .calendar-datepicker .pager-btn a {
        width: 26px;
    }

    .calendar-datepicker .pager-btn-prev-2 .fa {
        left: -6px;
    }

    .calendar-datepicker .pager-btn-prev-1 .fa {
        left: -4px;
    }

    .calendar-datepicker .pager-btn-next-2 .fa {
        right: 4px;
    }

    .calendar-datepicker .pager-btn-next-1 .fa {
        right: 2px;
    }

    .calendar-datepicker .pager-btn-label {
        display: none;
    }

    .info-list-item-desc,
    .info-list-item-val {
        font-size: 1.2rem;
    }

    /* force cell width so that date labels can fit */
    #calendar_table.calendar-table-monthly th {
        min-width: 8rem !important;
    }

    /* GENERAL 1-DAY VIEW FOR MOBILES PORTRAIT */
    .normal_view,
    li.normal-cal-tab {
        display: none !important;
    }

    .mobile_view,
    li.mobile-cal-tab,
    .single_view,
    li.single-cal-tab {
        display: block !important;
    }
}

@media only screen and (max-width: 768px) and (orientation: landscape) {
    body {}

    .ess-main-content {
        width: calc(100% - 120px);
    }

    .ess-tabs {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }

    .nav-tabs.calendar-buttonsbar-bottom {
        width: 100%;
    }

    .ess-navbar li {
        margin: 0;
    }

    .ess-navbar .ess-navbar-item-icon {
        transform-origin: center top;
        /* 48/ 80 = 0.6 */
        transform: scale(0.6);
        margin-left: calc((60px - 48px) / 2);
    }

    .ess-navbar .ess-navbar-item-label {
        margin-top: calc(0px - (80px - 48px));
    }

    .ess-navbar {
        overflow-y: auto;
    }

    .home-tiles {
        display: flex;
        flex-direction: column;
    }

    .home-tile {
        margin-bottom: 10px;
    }

    .home-tile:first-child {
        margin-bottom: 0;
    }

    .calendar-datepicker .pager-btn-prev:before,
    .calendar-datepicker .pager-btn-next:after {
        font-size: 1.4rem;
    }

    .page-title-main {
        margin-bottom: 6px;
    }

    .page-title-post-name,
    .page-title-user-name,
    .person-tile .page-subtitle {
        font-size: 1.2rem;
        margin: 0;
        margin-bottom: 6px;
    }

    .home-tile h1,
    .page-title-main,
    .my-account-banner .my-account-banner-title {
        font-size: 1.5rem;
    }

    .home-tile h2,
    .my-account-banner .my-account-banner-subtitle {
        font-size: 1.4rem;
    }

    .home-tile h3 {
        font-size: 1.2rem;
    }

    .home-tile h4 {
        font-size: 1.1rem;
    }


    .calendar-buttonsbar-bottom .nav-btn:before {
        top: 25px;
        transform: scale(1);
    }

    #employee_balances {
        margin-top: unset;
        font-size: 1.4rem;
    }

    #employee_balances span {
        display: inline-block;
        margin-right: unset;
    }
}

@media only screen and (max-height: 414px) and (orientation: landscape) {
    html {
        font-size: 9px;
    }

    .ess-main-content {
        width: calc(100% - 120px);
        overflow-x: auto;
    }

    .ess-navbar li {
        margin: 0;
    }

    .ess-navbar .ess-navbar-item-icon {
        transform-origin: left top;
        /* 48/ 80 = 0.6 */
        transform: scale(0.6);
        margin-left: calc((60px - 48px) / 2);
    }

    .ess-navbar .ess-navbar-item-label {
        margin-top: calc(0px - (80px - 48px));
    }

    .ess-navbar {
        overflow-y: auto;
    }

    .home-tiles {
        display: flex;
        flex-direction: column;
    }

    .home-tile {
        margin-bottom: 10px;
    }

    .home-tile:first-child {
        margin-bottom: 0;
    }

    .calendar-datepicker .pager-btn-prev:before,
    .calendar-datepicker .pager-btn-next:after {
        font-size: 1.4rem;
    }

    .page-title-main {
        margin-bottom: 6px;
    }

    .page-title-post-name,
    .page-title-user-name,
    .person-tile .page-subtitle {
        font-size: 1.2rem;
        margin: 0;
        margin-bottom: 6px;
    }

    .home-tile h1,
    .page-title-main,
    .my-account-banner .my-account-banner-title {
        font-size: 1.5rem;
    }

    .home-tile h2,
    .my-account-banner .my-account-banner-subtitle {
        font-size: 1.4rem;
    }

    .home-tile h3 {
        font-size: 1.2rem;
    }

    .home-tile h4 {
        font-size: 1.1rem;
    }

    nav {
        width: 60px;
    }

    nav img {
        width: 25px;
        height: 25px;
    }

    nav ul li {
        padding-top: 6px;
        /*        height:42px; */
    }

    nav ul li label {
        font-size: 1rem;
    }

    .calendar-popup .div_with_bg,
    .calendar-popup .div_without_bg,
    .calendar-popup td {
        font-size: 1.2rem;
    }

    .sched_reqs_container img {
        width: 14px;
        height: 14px;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .modal-content h4 {
        font-size: 1.4rem;
    }

    .modal-footer {
        margin-top: -13px;
        padding: 10px 15px 10px 15px;
    }

    input.date-picker {
        height: 3rem;
    }

    #update-button {
        font-size: 1rem;
    }

    label[for=start_date],
    label[for=end_date] {
        width: 60px;
    }

    #email,
    #captcha-image,
    #captcha,
    legend {
        font-size: 10px;
    }

    .my-account-banner-avatar {
        width: 50px;
        height: 50px;
        left: calc(50% - 25px);
        top: -30px;
    }

    .my-account-banner-title {
        margin-top: 25px;
    }

    #employee_balances {
        margin-top: unset;
    }
}

@media only screen and (orientation: landscape) and (max-height:768px) {
    .ess-navbar .ess-navbar-item {
        padding-top: 0;
        margin-top: 3px;
    }
}