/* ============================================================
   Google Calendar Booking — frontend widget
   ============================================================ */

.gcal-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    color: #111;
    box-sizing: border-box;
    width: 60vw;
    max-width: 1080px;
}

/* ── Outer panel ──────────────────────────────────── */
.gcal-panel {
    display: flex;
    border: 1px solid #111;
    width: 100%;
    box-sizing: border-box;
    min-height: 480px;
}

/* ── Left: calendar ───────────────────────────────── */
.gcal-left {
    flex: 0 0 52%;
    padding: 24px 28px 28px;
    box-sizing: border-box;
}

.gcal-vdivider {
    width: 1px;
    background: #111;
    flex-shrink: 0;
}

/* ── Right: panels ────────────────────────────────── */
.gcal-right {
    flex: 1;
    overflow-y: auto;
    max-height: 480px;
    box-sizing: border-box;
    scroll-behavior: smooth;
    transition: max-height 0.5s ease-in-out;
}

.gcal-right-panel { box-sizing: border-box; min-height: 100%; }

.gcal-divider { height: 1px; background: #111; width: 100%; }

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

.gcal-month-label {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: .04em;
}

.gcal-nav-arrows { display: flex; gap: 2px; }

.gcal-arrow {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .72rem;
    color: #111;
    padding: 4px 7px;
    opacity: .7;
    transition: opacity .12s;
    line-height: 1;
}
.gcal-arrow:hover { opacity: 1; }
.gcal-arrow:disabled { opacity: .2; cursor: not-allowed; }

/* ── Day-of-week headers ──────────────────────────── */
.gcal-dow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 10px 0 8px;
}
.gcal-dow span {
    text-align: center;
    font-size: 1.1vw;
    font-weight: 700;
    letter-spacing: .05em;
}

/* ── Day grid ─────────────────────────────────────── */
.gcal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding-top: 4px;
}

.gcal-day {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 50%;
    margin: 2px auto;
    cursor: default;
    transition: background .12s, color .12s;
}

.gcal-day-beyond,
.gcal-day-unavail { color: #ccc; }

.gcal-day-available { cursor: pointer; }
.gcal-day-available:hover,
.gcal-day-selected {
    background: #111 !important;
    color: #fff !important;
}

.gcal-day-today { border: 1.5px solid #111; }

/* ── Right panel title ────────────────────────────── */
.gcal-right-title {
    font-size: 1.1vw;
    font-weight: 700;
    letter-spacing: .12em;
    text-align: center;
    margin: 13px 0;
    color: #111;
    text-transform: uppercase;
}

/* ── Scrollable month slot list ───────────────────── */
.gcal-month-slots { padding: 0; }

/* Each day section fills the full panel height so only
   one day is visible at a time — scroll/anchor to navigate */
.gcal-day-section {
    min-height: 480px;          /* match .gcal-right max-height */
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
}
.gcal-day-section:last-child { border-bottom: none; }

/* Highlight the anchored/active day section */
.gcal-day-section-active .gcal-selected-day-heading {
    background: #f9f9f9;
    border-left: 3px solid #111;
}

/* Date heading — "23 June 2026" + "Tuesday" */
.gcal-selected-day-heading {
    padding: 18px 20px 12px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    transition: background .15s;
}

.gcal-sdh-date {
    font-size: 1.6rem;
    font-weight: 400;
    color: #111;
    line-height: 1.1;
}

.gcal-sdh-dow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #666;
    margin-top: 3px;
}

.gcal-no-date-hint {
    padding: 32px 20px;
    font-size: .85rem;
    color: #999;
    font-style: italic;
    text-align: center;
}

.gcal-day-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px 20px 20px;
}

.gcal-slot-btn {
    background: #fff;
    border: 1px solid #111;
    color: #111;
    padding: 10px 4px;
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    transition: background .12s, color .12s;
    border-radius: 0;
}
.gcal-slot-btn:hover,
.gcal-slot-btn.gcal-slot-selected {
    background: #111;
    color: #fff;
}

/* Booked / unavailable slot — black, unclickable */
.gcal-slot-btn.gcal-slot-booked {
    background: #111;
    color: #fff;
    border-color: #111;
    cursor: not-allowed;
    opacity: .45;
    pointer-events: none;
}

.gcal-slots-hint {
    font-size: .82rem;
    color: #888;
    padding: 24px 20px;
    font-style: italic;
}

/* ── Form panel ───────────────────────────────────── */
.gcal-form-inner { padding: 0 20px 24px; }

/* Selected slot summary bar */
.gcal-slot-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    border-left: 3px solid #111;
    padding: 10px 14px;
    margin: 16px 0 4px;
    font-size: .88rem;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
}

.gcal-slot-summary-icon { font-size: 1rem; flex-shrink: 0; }

.gcal-back-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: .78rem;
    color: #666;
    display: inline-block;
    margin-bottom: 18px;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.gcal-back-link:hover { color: #111; }

.gcal-field { margin-bottom: 14px; }

.gcal-field label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 5px;
    line-height: 1.4;
}

.gcal-field label.gcal-label-natural {
    text-transform: none;
    letter-spacing: 0;
    font-size: .82rem;
    font-weight: 600;
}

.gcal-req { color: #c00; font-weight: 700; }
.gcal-opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: #888; }

.gcal-field input,
.gcal-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #111;
    border-radius: 0;
    padding: 9px 11px;
    font-size: .9rem;
    outline: none;
    font-family: inherit;
    color: #111;
    background: #fff;
    transition: box-shadow .15s;
    -webkit-appearance: none;
}
.gcal-field input:focus,
.gcal-field textarea:focus { box-shadow: 0 0 0 2px rgba(0,0,0,.12); }

/* ── Submit button ────────────────────────────────── */
.gcal-confirm-btn {
    display: block;
    width: 100%;
    background: #414042;
    color: #fff;
    border: 2px solid #414042;
    padding: 13px;
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    border-radius: 0;
    margin-top: 6px;
    transition: opacity .12s;
}
.gcal-confirm-btn span{
    color: #ffffff;
}
.gcal-confirm-btn:hover { opacity: .8; }
.gcal-confirm-btn:disabled { opacity: .4; cursor: not-allowed; }

.gcal-outline-btn { background: #fff; color: #111; }
.gcal-outline-btn:hover { background: #f4f4f4; opacity: 1; }

/* ── Error msg ────────────────────────────────────── */
.gcal-error-msg {
    border: 1px solid #c00;
    color: #c00;
    padding: 9px 12px;
    font-size: .82rem;
    margin-bottom: 12px;
    border-radius: 0;
}

/* ── Confirmation panel ───────────────────────────── */
.gcal-confirmed-body {
    padding: 32px 24px 28px;
    text-align: center;
}

.gcal-confirmed-icon {
    width: 52px;
    height: 52px;
    border: 2px solid #111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 18px;
    color: #111;
    font-weight: 300;
}

.gcal-confirm-msg {
    font-size: .95rem;
    font-weight: 600;
    color: #111;
    margin: 0 0 10px;
    line-height: 1.5;
}

.gcal-confirm-sub {
    color: #777;
    font-size: .82rem;
    margin-bottom: 22px;
}
.booking-open {
    max-height: 620px;
}
/* ── Utility ──────────────────────────────────────── */
.gcal-hidden { display: none !important; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 640px) {
    .gcal-wrap       { width: 100%; }
    .gcal-panel      { flex-direction: column; }
    .gcal-left       { flex: none; width: 100%; padding: 18px 14px 20px; }
    .gcal-vdivider   { width: 100%; height: 1px; }
    .gcal-right      { max-height: 420px; }
    .gcal-day-slots  { grid-template-columns: repeat(2, 1fr); }
    .gcal-day        { width: 30px; height: 30px; font-size: .82rem; }
    .gcal-form-inner { padding: 0 14px 20px; }
    .gcal-right-title { font-size: .68rem; }
    .gcal-dow span   { font-size: .65rem; }
}
