/* ==========================
   SCHEDULER — funding consultation booking widget
   Owns: calendar grid, time-slot picker, selection chip.
   The contact form inside step 2 inherits .contact-form-card and
   .application-grid styling from styles.css / forms.css.
   ========================== */

.scheduler {
    width: 100%;
    max-width: 720px;
    margin: 40px auto 0;
}

.scheduler [hidden] { display: none !important; }

/* ===== PICKER STEP — calendar on left (wide), slots on right (narrow) ===== */
.scheduler-step[data-step="picker"] {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: center;
}

.scheduler-step[data-step="picker"] > .scheduler-card:first-child {
    flex: 0 0 460px;
}

.scheduler-step[data-step="picker"] > .slots-wrap {
    flex: 0 0 220px;
    margin-top: 0;
    align-self: stretch;
}

/* ===== CARD (calendar + slots share this look) ===== */
.scheduler-card {
    background: #ffffff;
    border: 1px solid #e0e6ee;
    border-radius: 12px;
    padding: 28px;
}

/* ===== CALENDAR HEADER ===== */
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.cal-month {
    font-family: 'Vectora Bold', sans-serif;
    letter-spacing: -0.02em;
    font-size: 17px;
    color: #000;
}

.cal-nav {
    background: #f5f7fa;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    line-height: 1;
    font-size: 18px;
    color: #6ab235;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease;
}

.cal-nav:hover:not(:disabled) {
    background: #eaf5e0;
}

.cal-nav:disabled {
    color: #cbd5e0;
    cursor: not-allowed;
}

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

.cal-weekdays {
    margin-bottom: 4px;
}

.cal-weekdays > span {
    font-family: 'Vectora Roman', sans-serif;
    font-size: 13px;
    color: #718096;
    text-align: center;
    padding: 6px 0;
}

.cal-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    font-family: 'Vectora Roman', sans-serif;
    font-size: 15px;
    color: #cbd5e0;
    border-radius: 50%;
    padding: 0;
    cursor: default;
    transition: background 0.15s ease, color 0.15s ease;
}

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

.cal-day.available {
    background: #eaf5e0;
    color: #000;
    cursor: pointer;
    font-weight: 700;
    -webkit-text-stroke: 0.2px;
}

.cal-day.available:hover {
    background: #d6ecc4;
}

.cal-day.selected,
.cal-day.selected:hover {
    background: #6ab235;
    color: #ffffff;
}

/* ===== TIME ZONE ROW ===== */
.cal-tz {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e0e6ee;
    font-family: 'Vectora Roman', sans-serif;
    font-size: 13px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-tz-icon {
    color: #6ab235;
    font-size: 14px;
}

.cal-tz strong {
    color: #000;
    font-family: 'Vectora Roman', sans-serif;
    font-weight: 700;
    -webkit-text-stroke: 0.2px;
}

/* ===== TIME SLOTS ===== */
.slots-heading {
    font-family: 'Vectora Bold', sans-serif;
    letter-spacing: -0.02em;
    font-size: 16px;
    color: #000;
    margin-bottom: 12px;
}

.slots-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 2px;
}

.slot-btn {
    padding: 11px 6px;
    border: 1px solid #6ab235;
    background: #ffffff;
    border-radius: 9px;
    color: #6ab235;
    font-family: 'Vectora Roman', sans-serif;
    font-weight: 700;
    -webkit-text-stroke: 0.2px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.slot-btn:hover {
    background: #eaf5e0;
}

.slots-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #718096;
    font-family: 'Vectora Light', sans-serif;
    padding: 24px 8px;
    font-size: 14px;
}

.slots-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #718096;
    font-family: 'Vectora Light', sans-serif;
    padding: 24px 0;
    font-size: 14px;
}

/* ===== SELECTION CHIP (above the form) ===== */
.scheduler-selection {
    background: #eaf5e0;
    border-radius: 9px;
    padding: 14px 18px;
    margin: 0 auto 18px;
    max-width: 640px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.scheduler-selection .sel-text {
    font-family: 'Vectora Roman', sans-serif;
    font-weight: 700;
    -webkit-text-stroke: 0.2px;
    color: #000;
    font-size: 15px;
}

.scheduler-selection .link-green {
    background: none;
    border: none;
    color: #6ab235;
    cursor: pointer;
    font-family: 'Vectora Roman', sans-serif;
    font-weight: 700;
    -webkit-text-stroke: 0.2px;
    font-size: 14px;
    padding: 0;
}

.scheduler-selection .link-green:hover {
    text-decoration: underline;
}

/* ===== TEXTAREA — match application-row input look ===== */
.contact-form-card textarea.sched-notes {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 15px;
    border: 1px solid #e0e6ee;
    border-radius: 9px;
    font-family: 'Vectora Roman', sans-serif;
    font-size: 17px;
    line-height: 1.4;
    background-color: #ffffff;
    color: #000;
    resize: vertical;
    min-height: 90px;
}

.contact-form-card textarea.sched-notes::placeholder {
    color: #718096;
    font-family: 'Vectora Roman', sans-serif;
    font-size: 16px;
}

.contact-form-card textarea.sched-notes:focus {
    outline: none;
    border-color: #6ab235;
    box-shadow: 0 0 0 2px rgba(106, 178, 53, 0.18);
}

/* ===== INLINE FORM ERROR ===== */
.sched-error {
    color: #cc4b37;
    font-family: 'Vectora Roman', sans-serif;
    font-size: 14px;
    text-align: center;
    margin-top: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .scheduler {
        max-width: 100%;
    }
    .scheduler-step[data-step="picker"] {
        flex-direction: column;
    }
    .scheduler-step[data-step="picker"] > .scheduler-card:first-child,
    .scheduler-step[data-step="picker"] > .slots-wrap {
        flex: 0 0 auto;
        width: 100%;
    }
    .slots-grid {
        grid-template-columns: 1fr;
    }
}
