/* Scheduler Styles */

/* Timeline Grid */
.timeline-grid {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.timeline-day {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
}

.timeline-day.empty {
    opacity: 0.5;
}

.day-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day-slots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.no-slots {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.slot-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    position: relative;
    transition: all 0.2s;
}

.slot-card:hover {
    border-color: var(--accent);
}

.slot-time {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.slot-station {
    font-size: 0.875rem;
    color: var(--accent);
    margin-top: 0.25rem;
}

.slot-show {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.slot-notes {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-style: italic;
}

.recurring-badge {
    display: inline-block;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.slot-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.slot-delete:hover {
    background: rgba(233, 69, 96, 0.2);
    color: var(--accent);
}

/* Schedule Add Button on Cards */
.schedule-add-btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.schedule-add-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Form Improvements */
.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
}

.form-value {
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
}

select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--accent);
}

input[type="time"] {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Modal Large */
.modal-large {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.schedule-detail-body {
    padding: 1rem;
}

.schedule-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.schedule-actions .btn-secondary {
    background: rgba(233, 69, 96, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}

.schedule-actions .btn-secondary:hover {
    background: var(--accent);
    color: white;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Schedule Card Improvements */
.schedule-card {
    cursor: pointer;
    transition: all 0.2s;
}

.schedule-card:hover {
    border-color: var(--accent);
}

/* Add to Schedule Button in Player */
.player-controls .schedule-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.player-controls .schedule-btn:hover {
    color: var(--accent);
}

/* Responsive Timeline */
@media (min-width: 640px) {
    .timeline-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .timeline-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .timeline-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .timeline-day {
        min-height: 200px;
    }
}

/* Cyberpunk glass scheduler overrides */
.timeline-day,
.slot-card,
.toast,
.form-value {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)), var(--bg-secondary);
    border-color: rgba(130, 155, 206, 0.34);
    backdrop-filter: blur(16px);
}

.day-label {
    color: #8ef0ff;
    letter-spacing: 0.08em;
}

.slot-card:hover {
    border-color: rgba(38, 228, 255, 0.58);
    box-shadow: 0 0 0 1px rgba(38, 228, 255, 0.25), 0 10px 24px rgba(0, 0, 0, 0.35);
}

.slot-station {
    color: #7ce9ff;
}

.recurring-badge {
    background: rgba(176, 52, 255, 0.2);
    border: 1px solid rgba(176, 52, 255, 0.34);
    color: #d6c4ff;
}

.slot-delete:hover {
    background: rgba(255, 64, 133, 0.18);
    color: #ff79b8;
}

.schedule-actions {
    border-top-color: rgba(130, 155, 206, 0.28);
}

.toast {
    border-radius: 12px;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(38, 228, 255, 0.2);
}

/* Extra metallic depth for scheduler surfaces */
.timeline-day,
.slot-card,
.toast {
    position: relative;
    overflow: hidden;
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -10px 18px rgba(0, 0, 0, 0.22);
}

.timeline-day::before,
.slot-card::before,
.toast::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.2), transparent 26%),
        linear-gradient(25deg, rgba(0, 0, 0, 0.22), transparent 42%),
        repeating-linear-gradient(
            108deg,
            transparent 0 10px,
            rgba(192, 214, 255, 0.04) 10px 11px,
            transparent 11px 20px
        );
    mix-blend-mode: screen;
    opacity: 0.75;
}

.slot-card::after,
.timeline-day::after {
    content: "";
    position: absolute;
    inset: 1px;
    border: 1px solid rgba(212, 229, 255, 0.08);
    border-radius: inherit;
    pointer-events: none;
}
