/*
 * Kilcrease Home Team
 * Book a Meeting Popup V184
 */

.kh-booking-popup-expanded {
    width: min(680px, calc(100vw - 30px)) !important;
    max-width: min(680px, calc(100vw - 30px)) !important;
    max-height: calc(100dvh - 32px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

#kh-meeting-request-form.kh-booking-active {
    display: grid;
    gap: 14px;
}

#kh-meeting-request-form .kh-booking-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

#kh-meeting-request-form .kh-booking-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
}

#kh-meeting-request-form input,
#kh-meeting-request-form select,
#kh-meeting-request-form textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 1px solid #ccd5ce;
    border-radius: 9px;
    padding: 11px 12px;
    background: white;
    color: #243e35;
    font: inherit;
    font-weight: 400;
}

#kh-meeting-request-form textarea {
    resize: vertical;
}

#kh-meeting-request-form button[type="submit"] {
    cursor: pointer;
    width: 100%;
}

#kh-meeting-request-form button[disabled] {
    opacity: 0.6;
    cursor: wait;
}

#kh-meeting-request-form .kh-booking-note {
    color: #68756b;
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

#kh-meeting-request-form .kh-booking-error {
    color: #942d27;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.kh-booking-popup-success {
    padding: 15px;
    background: #ecf4ed;
    border-radius: 12px;
    color: #304f41;
}

.kh-booking-popup-success h3 {
    margin: 0 0 8px;
}

.kh-booking-popup-success p {
    margin: 0;
}

@media (max-width: 600px) {
    .kh-booking-popup-expanded {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
        padding: 22px !important;
    }

    #kh-meeting-request-form .kh-booking-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* =====================================================
   KILCREASE MOBILE BOOKING V185
   Full-screen mobile booking, compact form
   Desktop styling unchanged
   ===================================================== */

@media (max-width: 767px) {

    .kh-booking-popup-expanded {
        position: fixed !important;
        inset: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 0 !important;

        margin: 0 !important;
        padding: 56px 20px 24px !important;
        box-sizing: border-box !important;

        transform: none !important;

        border-radius: 0 !important;
        background: #fff !important;

        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;

        z-index: 2147483646 !important;
        box-shadow: none !important;
    }

    .kh-booking-popup-expanded h2,
    .kh-booking-popup-expanded h3 {
        margin-top: 0 !important;
        margin-bottom: 6px !important;
        line-height: 1.2 !important;
    }

    .kh-booking-popup-expanded > p {
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        line-height: 1.45 !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form.kh-booking-active {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;

        width: 100% !important;
        max-width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: visible !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form .kh-booking-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form .kh-booking-field {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;

        width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 0 !important;

        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form input:not([type="hidden"]),
    .kh-booking-popup-expanded
    #kh-meeting-request-form select {
        display: block !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        height: 43px !important;
        min-height: 43px !important;

        margin: 0 !important;
        padding: 9px 12px !important;

        border: 1px solid #cbd5cc !important;
        border-radius: 8px !important;

        box-sizing: border-box !important;

        background: #fff !important;
        color: #243e35 !important;

        font-size: 16px !important;
        line-height: 22px !important;

        box-shadow: none !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form textarea {
        display: block !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        min-height: 76px !important;
        height: 76px !important;

        margin: 0 !important;
        padding: 10px 12px !important;

        border: 1px solid #cbd5cc !important;
        border-radius: 8px !important;

        box-sizing: border-box !important;

        background: #fff !important;
        color: #243e35 !important;
        font-size: 16px !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form button[type="submit"] {
        display: block !important;

        width: 100% !important;
        min-height: 45px !important;

        margin: 4px 0 0 !important;
        padding: 11px 16px !important;

        border: 0 !important;
        border-radius: 8px !important;

        background: #304f41 !important;
        color: #fff !important;

        font-size: 14px !important;
        font-weight: 600 !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form .kh-booking-note {
        font-size: 11px !important;
        line-height: 1.5 !important;
        margin: 0 0 12px !important;
    }

    .kh-booking-popup-expanded
    button[aria-label*="close" i],
    .kh-booking-popup-expanded
    button[class*="close" i] {
        position: sticky !important;
        top: 0 !important;
        float: right !important;
        z-index: 10 !important;
    }

    .kh-booking-popup-expanded
    .kh-booking-popup-success {
        margin-top: 10px !important;
    }
}

/* ============================================
   KILCREASE MOBILE POPUP V186
   Keep booking below mobile navigation
   ============================================ */

@media (max-width: 767px) {

    .kh-booking-popup-expanded {
        position: fixed !important;

        top: 76px !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;

        inset: 76px 0 0 0 !important;

        width: 100% !important;
        max-width: 100% !important;

        height: calc(100dvh - 76px) !important;
        max-height: calc(100dvh - 76px) !important;
        min-height: 0 !important;

        margin: 0 !important;
        padding: 20px 20px 28px !important;

        border-radius: 0 !important;
        box-sizing: border-box !important;

        overflow-x: hidden !important;
        overflow-y: auto !important;

        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;

        transform: none !important;

        background: #ffffff !important;
    }

    .kh-booking-popup-expanded h2 {
        font-size: 26px !important;
        line-height: 1.2 !important;
        margin: 0 42px 7px 0 !important;
        padding: 0 !important;
    }

    .kh-booking-popup-expanded > p {
        margin: 0 0 18px !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form.kh-booking-active {
        gap: 12px !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form .kh-booking-grid {
        gap: 11px !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form .kh-booking-field {
        gap: 5px !important;
        font-size: 12px !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form input:not([type="hidden"]),
    .kh-booking-popup-expanded
    #kh-meeting-request-form select {
        height: 44px !important;
        min-height: 44px !important;
    }

    .kh-booking-popup-expanded
    #kh-meeting-request-form textarea {
        min-height: 80px !important;
    }

    .kh-booking-popup-expanded
    button[aria-label*="close" i],
    .kh-booking-popup-expanded
    button[class*="close" i] {
        position: sticky !important;
        top: 0 !important;
        z-index: 20 !important;
    }
}


/* KILCREASE DATE PICKER V193 */

#kh-meeting-request-form
input[name="meeting_date"][type="date"] {
    cursor: pointer !important;
    touch-action: manipulation;
}

#kh-meeting-request-form
input[name="meeting_date"][type="date"]:focus {
    border-color: #607b52 !important;
    outline: 2px solid rgba(96, 123, 82, 0.17);
    outline-offset: 1px;
}


/* KILCREASE TIME PICKER V194 */

#kh-meeting-request-form
input[name="meeting_time"][type="time"] {
    cursor: pointer !important;
    touch-action: manipulation;
}

#kh-meeting-request-form
input[name="meeting_time"][type="time"]:focus {
    border-color: #607b52 !important;
    outline: 2px solid rgba(96, 123, 82, 0.17);
    outline-offset: 1px;
}
