/**
 * BoundedCalendar — popover date picker styles.
 * Color tokens align with booking-wizard.css / schedule-booking.css
 * (--wiz-primary indigo #4f46e5, --wiz-border #e2e8f0).
 */

.bounded-cal-wrap {
    display: inline-block;
    position: relative;
}

.bounded-cal-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    line-height: 1.2;
    user-select: none;
}

.bounded-cal-trigger:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.bounded-cal-trigger:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.bounded-cal-trigger[aria-expanded="true"] {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.bounded-cal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.bounded-cal-trigger-text {
    white-space: nowrap;
}

/* Popover */
.bounded-cal-popover {
    position: fixed;
    z-index: 10000;
    width: 288px;
    padding: 12px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(15, 23, 42, 0.06);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0f172a;
    user-select: none;
}

.bounded-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.bounded-cal-title {
    flex: 1;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.bounded-cal-nav {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: #475569;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.bounded-cal-nav:hover:not(:disabled) {
    background-color: #f1f5f9;
    color: #0f172a;
}

.bounded-cal-nav:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.bounded-cal-nav:disabled {
    cursor: default;
    pointer-events: none;
}

.bounded-cal-dow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

.bounded-cal-dow > span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    padding: 4px 0;
}

.bounded-cal-grid {
    display: grid;
    /* Zero-min tracks prevent mobile touch-target rules from widening the
       day grid beyond the separately rendered weekday header. */
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}

.bounded-cal-day {
    height: 36px;
    /* Override mobile-responsive.css's global 44px button minimum so all
       seven date cells remain inside their intended weekday columns. */
    min-width: 0;
    min-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
    padding: 0;
}

.bounded-cal-day-blank {
    cursor: default;
}

.bounded-cal-day:not(:disabled):not(.bounded-cal-day-blank):hover {
    background-color: #eef2ff;
    color: #3730a3;
}

.bounded-cal-day:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.bounded-cal-day-today:not(.bounded-cal-day-selected) {
    color: #4f46e5;
    font-weight: 700;
}

.bounded-cal-day-selected {
    background-color: #4f46e5;
    color: #ffffff;
    font-weight: 600;
}

.bounded-cal-day-selected:hover {
    background-color: #4338ca;
    color: #ffffff;
}

.bounded-cal-day-out {
    visibility: hidden;
    pointer-events: none;
    cursor: default;
}

@media (max-width: 380px) {
    .bounded-cal-popover { width: 92vw; max-width: 320px; }
}
