/* ---- Calendar Booking Styles ---- */
/* Extends the consulting site base styles.css */

.cal-page-header {
    text-align: center;
    margin-bottom: 30px;
}

.cal-company-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--brand);
    margin: 0 0 4px;
    text-transform: uppercase;
}

/* Calendar container — wide for side-by-side */
.cal-container {
    max-width: 760px;
    margin: 0 auto 40px;
}

.cal-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    font-size: 18px;
}

/* ---- Side-by-side layout: calendar + time slots ---- */
.cal-split {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 40px;
    align-items: start;
}

/* Left: month calendar */
.cal-left {
    min-width: 0;
}

/* Right: time slot panel */
.cal-right {
    border-left: 1px solid var(--rule);
    padding-left: 32px;
}

.cal-right-header {
    margin-bottom: 16px;
}

.cal-right-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 2px;
}

.cal-right-header p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

/* Month header */
.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.cal-nav-btn {
    background: none;
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
    transition: all 0.2s;
}

.cal-nav-btn:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.cal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cal-nav-btn:disabled:hover {
    background: none;
    color: var(--brand);
    border-color: var(--rule);
}

/* Calendar grid */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day-header {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    cursor: default;
    color: #ccc;
    transition: all 0.15s;
    font-weight: 500;
}

.cal-day.available {
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
}

.cal-day.available:hover {
    background: var(--brand);
    color: #fff;
}

.cal-day.selected {
    background: var(--brand);
    color: #fff;
}

.cal-day.today {
    box-shadow: inset 0 0 0 2px var(--brand);
}

.cal-day.empty {
    visibility: hidden;
}

.cal-tz-note {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
}

/* Timezone selector */
.cal-tz-selector {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
    color: var(--muted);
}

.cal-tz-label {
    margin-right: 2px;
}

.cal-tz-select {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    border-bottom: 1px dashed var(--muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
    cursor: pointer;
    padding: 0 16px 1px 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235A10A2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    outline: none;
}

.cal-tz-select:hover {
    border-bottom-color: var(--brand);
}

.cal-tz-select:focus {
    border-bottom-color: var(--brand);
    border-bottom-style: solid;
}

/* Time slots */
.cal-slot-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.cal-slot-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: 2px solid var(--brand);
    border-radius: 999px;
    background: #fff;
    color: var(--brand);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    flex-shrink: 0;
}

.cal-slot-btn:hover {
    background: var(--brand);
    color: #fff;
}

.cal-no-slots {
    color: var(--muted);
    font-size: 15px;
    padding: 20px 0;
}

/* Booking form */
.cal-form-header {
    text-align: center;
    margin-bottom: 24px;
}

.cal-form-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 4px;
}

.cal-form-header p {
    color: var(--muted);
    font-size: 15px;
    margin: 0;
}

.cal-form {
    max-width: 440px;
    margin: 0 auto;
}

.cal-form label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cal-form input[type="text"],
.cal-form input[type="email"],
.cal-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--rule);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    margin-bottom: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cal-form input:focus,
.cal-form textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(90, 16, 162, 0.1);
}

.cal-form textarea {
    height: 80px;
    resize: vertical;
}

/* Attendees */
.cal-attendee-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: start;
}

.cal-attendee-row input {
    flex: 1;
    margin-bottom: 0 !important;
}

.cal-attendee-remove {
    background: none;
    border: none;
    color: #c00;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

.cal-add-attendee {
    display: inline-block;
    font-size: 15px;
    color: var(--brand);
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    padding: 0;
    margin-bottom: 16px;
}

.cal-add-attendee:hover {
    text-decoration: underline;
}

/* Back button */
.cal-back-btn {
    display: inline-block;
    margin-top: 12px;
    font-size: 15px;
    color: var(--muted) !important;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    text-decoration: none;
}

.cal-back-btn:hover {
    color: var(--brand) !important;
}

/* Primary button */
.cal-btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: var(--brand);
    color: #fff !important;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none !important;
}

.cal-btn-primary:hover {
    background: var(--brand-soft);
    color: #000 !important;
}

.cal-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Confirmation */
.cal-confirmation {
    text-align: center;
    padding: 20px 0;
}

.cal-confirmation h2 {
    font-size: 26px;
    font-weight: 800;
    color: midnightblue;
    margin: 0 0 8px;
}

.cal-confirmation .cal-confirm-details {
    background: #f7f7fb;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 20px auto;
    max-width: 400px;
    text-align: left;
}

.cal-confirmation .cal-confirm-details p {
    margin: 6px 0;
    font-size: 16px;
}

.cal-confirmation .cal-confirm-details .cal-zoom-link {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 24px;
    background: #2D8CFF;
    color: #fff !important;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none !important;
}

.cal-confirmation .cal-confirm-details .cal-zoom-link:hover {
    background: #1a73e8;
}

/* Error */
.cal-error {
    background: #fff0f0;
    color: #c00;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 15px;
    text-align: center;
}

/* Spinner */
.cal-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cal-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes cal-spin {
    to { transform: rotate(360deg); }
}

/* ---- Team mode: duration chooser ---- */
.cal-duration-chooser {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.cal-duration-btn {
    padding: 8px 20px;
    border: 2px solid var(--brand);
    border-radius: 999px;
    background: #fff;
    color: var(--brand);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.cal-duration-btn:hover {
    background: rgba(90, 16, 162, 0.08);
}

.cal-duration-btn.active {
    background: var(--brand);
    color: #fff;
}

/* ---- Team mode: member chips ---- */
.cal-team-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.cal-team-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.cal-team-chip:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.cal-team-chip.added {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.cal-team-chip.added::before {
    content: '\2713 ';
}

/* ---- Responsive: stack on small screens ---- */
@media (max-width: 680px) {
    .cal-split {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cal-right {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--rule);
        padding-top: 20px;
    }

    .cal-slot-list {
        max-height: none;
    }

    .cal-container {
        margin: 0 auto 20px;
    }

    .cal-day {
        font-size: 15px;
    }

    .cal-form input[type="text"],
    .cal-form input[type="email"],
    .cal-form textarea {
        font-size: 16px; /* prevent zoom on iOS */
    }

    .cal-attendee-row {
        flex-direction: column;
    }

    .cal-attendee-row input {
        width: 100%;
    }
}
