/* ============================================
   STREAM SCHEDULE
   - sidebar on the index/landing page
   - admin management modal styles
   ============================================ */

/* -----------------------------------------------
   INDEX PAGE LAYOUT WRAPPER
   ----------------------------------------------- */
.calendar-with-streams {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.calendar-with-streams .calendar-container {
    flex: 1;
    min-width: 0;
}

/* -----------------------------------------------
   STREAM SCHEDULE SIDEBAR
   ----------------------------------------------- */
.stream-schedule-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: none; /* JS sets to flex when streams exist */
    flex-direction: column;
    overflow: hidden;
}

.stream-sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.875rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.stream-sidebar-header h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stream-list {
    flex: 1;
    overflow-y: auto;
}

/* -----------------------------------------------
   STREAM ROW
   ----------------------------------------------- */
.stream-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
    overflow-wrap: break-word;
}

.stream-row:last-child {
    border-bottom: none;
}

.stream-row:hover {
    background: var(--hover-bg);
}

.stream-row-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
    width: 34px;
    margin-bottom: auto;
}

.twitch-icon {
    padding: 5px;
    color: var(--stockton-blue);
}

.youtube-icon {
    padding: 2px;
    color: var(--stockton-blue);
}

.stream-date {
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.stream-row-right {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.stream-row-right-date-time {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.stream-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
    text-overflow: ellipsis;
}

.stream-time {
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

/* -----------------------------------------------
   ADMIN MODAL
   ----------------------------------------------- */
#manageStreamsModal .modal-content {
    max-width: 520px;
    width: 90%;
}

#manageStreamsModal label.required-field::after {
    content: ' *';
    color: #ef4444;
}

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

.add-stream-panel {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.add-stream-panel h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-stream-panel h4 i {
    color: var(--stockton-blue);
}

.stream-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Upcoming streams list */
.admin-stream-list-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-stream-list-label i {
    color: var(--stockton-blue);
}

#adminStreamList {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
}

#adminPastStreamList {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
}

.admin-stream-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.admin-stream-row:hover {
    border-color: var(--stockton-blue);
}

.admin-stream-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    flex: 1;
}

.admin-stream-info > i {
    font-size: 1.125rem;
    flex-shrink: 0;
    margin-bottom: auto;
}

.admin-stream-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.admin-stream-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}

.admin-stream-datetime {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-stream-delete {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 6px;
    border: 1px solid #ef4444;
    background: transparent;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.btn-stream-delete:hover {
    background: rgba(239, 68, 68, 0.12);
}

.btn-stream-edit {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 6px;
    border: 1px solid var(--stockton-blue);
    background: transparent;
    color: var(--stockton-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.btn-stream-edit:hover {
    background: rgba(121, 189, 233, 0.12);
}

.admin-stream-actions {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
}

.streams-empty-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
    padding: 1.5rem 0;
    margin: 0;
}

#adminStreamLoading {
    text-align: center;
    padding: 1.5rem;
    color: var(--stockton-blue);
    font-size: 1.5rem;
}

/* -----------------------------------------------
   MOBILE FRIENDLINESS
   ----------------------------------------------- */
@media (max-width: 900px) {
    .calendar-with-streams {
        flex-direction: column;
        align-items: stretch;
    }

    .stream-schedule-sidebar {
        width: 100%;
        max-height: 180px;
    }
}

@media (max-width: 640px) {
    .stream-form-row {
        grid-template-columns: 1fr;
    }
}