/* Calendar Widget - Modern Clean Design */

.calendar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(8px);
}

/* Steps Indicator */
.calendar-steps {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

.cal-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

.cal-step.active {
    opacity: 1;
}

.cal-step.completed {
    opacity: 0.7;
}

.cal-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.cal-step.active .cal-step-num {
    background: var(--accent-gold);
    color: var(--bg-primary);
    border-color: var(--accent-gold);
}

.cal-step.completed .cal-step-num {
    background: rgba(196, 151, 58, 0.2);
    border-color: var(--accent-gold-dim);
    color: var(--accent-gold);
}

.cal-step-label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-family: var(--font-body);
}

.cal-step.active .cal-step-label {
    color: var(--text-primary);
}

/* Progress Bar */
.cal-progress {
    height: 2px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    margin-bottom: 28px;
}

.cal-progress-bar {
    height: 100%;
    background: var(--accent-gold);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* Views */
.cal-view {
    display: none;
}

.cal-view.active {
    display: block;
}

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

.cal-month-label {
    font-family: var(--font-headline);
    font-size: var(--text-base);
    color: var(--text-primary);
    font-weight: 600;
}

.cal-nav-btn {
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.cal-nav-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Weekday Labels */
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 8px;
}

.cal-weekdays span {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 0;
}

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

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.cal-day:hover:not(.disabled):not(.empty) {
    background: rgba(196, 151, 58, 0.1);
    border-color: var(--accent-gold-dim);
    color: var(--text-primary);
}

.cal-day.selected {
    background: var(--accent-gold);
    color: var(--bg-primary);
    font-weight: 600;
}

.cal-day.disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.cal-day.empty {
    cursor: default;
}

.cal-day.today {
    border-color: var(--accent-gold-dim);
}

/* Time Slots */
.cal-back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.cal-back-btn:hover {
    color: var(--accent-gold);
}

.selected-date-display,
.selected-datetime-display {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--accent-gold);
    margin-bottom: 20px;
    letter-spacing: 0.04em;
}

.cal-slots-label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cal-time-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.cal-time-slot {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.cal-time-slot:hover {
    border-color: var(--accent-gold-dim);
    color: var(--text-primary);
}

.cal-time-slot.selected {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-primary);
    font-weight: 500;
}

.cal-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: var(--text-sm);
}

/* Form */
.cal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cal-field label {
    display: block;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.cal-field input,
.cal-field textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    outline: none;
    transition: border-color 0.2s;
}

.cal-field input:focus,
.cal-field textarea:focus {
    border-color: var(--accent-gold-dim);
}

.cal-field input::placeholder,
.cal-field textarea::placeholder {
    color: var(--text-muted);
}

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

/* Success */
.cal-success {
    text-align: center;
    padding: 40px 16px;
}

.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 20px;
    font-weight: 700;
}

.cal-success h3 {
    font-size: var(--text-xl);
    margin-bottom: 8px;
    color: var(--text-primary);
}

.cal-success p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.success-note {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: var(--text-xs) !important;
    color: var(--text-muted) !important;
    line-height: 1.6;
}

/* ==================== LIGHT MODE OVERRIDES ==================== */
[data-theme="light"] .calendar-widget {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .cal-day:not(.disabled):not(.empty) {
    color: var(--text-primary);
}

[data-theme="light"] .cal-time-slot {
    background: rgba(241, 243, 245, 0.8);
    color: var(--text-primary);
}

[data-theme="light"] .cal-field input,
[data-theme="light"] .cal-field textarea {
    background: rgba(241, 243, 245, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .cal-step.active .cal-step-num {
    color: #fff;
}