/* Khalgai Booking - Frontend Styles */

* { box-sizing: border-box; }

.kb-booking-form-wrapper {
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    max-width: 440px;
}

/* ── CARD ── */
.kb-card {
    background: white;
    border-radius: 18px;
    padding: 22px 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.kb-card-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing:0px;
    text-transform: uppercase;
    color: #789d50;
    margin-bottom: 14px;
}

/* ── DATE PICKER ── */
.kb-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.kb-month-nav .kb-month-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #222;
}

.kb-month-nav .kb-week-btn {
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 14px;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
}

.kb-month-nav .kb-week-btn:hover { background: #e8e8e8; }
.kb-month-nav .kb-week-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.kb-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.kb-day-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 9px 2px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.kb-day-cell .kb-day-name {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #bbb;
    margin-bottom: 5px;
    font-family: 'Montserrat', sans-serif;
}

.kb-day-cell .kb-day-num {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    line-height: 1;
    font-family: 'Montserrat', sans-serif;
}

.kb-day-cell.kb-active { background: #789d50; }
.kb-day-cell.kb-active .kb-day-name,
.kb-day-cell.kb-active .kb-day-num { color: white; }

.kb-day-cell:not(.kb-disabled):not(.kb-active):hover { background: #f3f7ec; }
.kb-day-cell:not(.kb-disabled):not(.kb-active):hover .kb-day-num { color: #789d50; }

.kb-day-cell.kb-disabled { cursor: not-allowed; opacity: 0.35; }

.kb-day-cell.kb-today:not(.kb-active) .kb-day-num { color: #789d50; }
.kb-day-cell.kb-today:not(.kb-active) .kb-day-num::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: #789d50;
    border-radius: 50%;
    margin: 3px auto 0;
}

/* ── TIMESLOTS ── */
.kb-timeslots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.kb-timeslot {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 10px;
    background: #f7f7f7;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
    user-select: none;
    font-family: 'Montserrat', sans-serif;
}

.kb-timeslot:hover:not(.disabled):not(.selected) {
    border-color: #789d50;
    color: #789d50;
    background: #f3f7ec;
}

.kb-timeslot.selected {
    background: #789d50;
    color: white;
    border-color: #789d50;
}

.kb-timeslot.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

.kb-slots-empty {
    text-align: center;
    color: #bbb;
    font-size: 13px;
    padding: 20px 0;
}

.kb-loading {
    text-align: center;
    color: #bbb;
    font-size: 13px;
    padding: 20px 0;
}

/* ── PHONE INPUT ── */
.kb-phone-wrapper {
    position: relative;
}

.kb-phone-prefix {
    display: none;
}

.kb-phone-input {
    width: 100%;
    height: 52px;
    padding: 0 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: #222;
    outline: none;
    transition: border-color 0.2s;
    letter-spacing: 1px;
}

.kb-phone-input:focus { border-color: #789d50; }
.kb-phone-input.kb-error { border-color: #e74c3c; }

.kb-phone-hint {
    font-size: 11px;
    color: #aaa;
    margin-top: 8px;
    padding-left: 4px;
}

/* ── SUBMIT ── */
.kb-submit-btn {
    width: 100%;
    height: 46px;
    background: #414141;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.1s;
    margin-top: 4px;
}
.kb-submit-btn:hover { background: #6a8e44; }
.kb-submit-btn:active { transform: scale(0.98); }
.kb-submit-btn:disabled { background: #ccc; cursor: not-allowed; }

/* ── VALIDATION ── */
.kb-field-error {
    font-size: 11px;
    color: #e74c3c;
    margin-top: 7px;
    padding-left: 4px;
    display: none;
}

/* ── SUMMARY CHIPS ── */
.kb-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.kb-summary-chip {
    background: #f3f7ec;
    border: 1px solid #c5d9a8;
    color: #5a7a38;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    display: none;
    font-family: 'Montserrat', sans-serif;
}

/* ── SUCCESS POPUP ── */
.kb-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(3px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.kb-popup-overlay.kb-show {
    opacity: 1;
    pointer-events: all;
}
.kb-popup {
    background: white;
    border-radius: 24px;
    padding: 40px 32px 32px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
    transform: scale(0.88) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.kb-popup-overlay.kb-show .kb-popup {
    transform: scale(1) translateY(0);
}
.kb-popup-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #789d50, #6a8e44);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    box-shadow: 0 8px 24px rgba(120,157,80,0.35);
}
.kb-popup-icon svg {
    width: 28px; height: 28px;
    stroke: white; stroke-width: 3;
    fill: none;
    stroke-linecap: round; stroke-linejoin: round;
}
.kb-popup-check-path {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    transition: stroke-dashoffset 0.4s ease 0.15s;
}
.kb-popup-overlay.kb-show .kb-popup-check-path {
    stroke-dashoffset: 0;
}
.kb-popup-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
    font-family: 'Montserrat', sans-serif;
}
.kb-popup-subtitle {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 24px;
    font-family: 'Montserrat', sans-serif;
}
.kb-popup-info {
    background: none;
    border: none;
    padding: 0 4px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}
.kb-popup-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    font-family: 'Montserrat', sans-serif;
}
.kb-popup-info-row .kb-icon {
    width: 24px; height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.kb-popup-close-btn {
    width: 100%;
    height: 50px;
    background: #414141;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.kb-popup-close-btn:hover  { background: #6a8e44; }
.kb-popup-close-btn:active { transform: scale(0.97); }

.kb-popup-new-link {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: #aaa;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-family: 'Montserrat', sans-serif;
    background: none;
    border: none;
    width: 100%;
}
.kb-popup-new-link:hover { color: #789d50; }

/* ── MOBILE ── */
@media (max-width: 480px) {
    .kb-timeslots-grid { grid-template-columns: repeat(3, 1fr); }
    .kb-card { padding: 18px 16px; }
}