/**
 * Calendar List Page Styles
 * Page-specific styles for the multi-calendar list view
 * Shared styles (nav, export modal, etc.) are in calendar.css
 */

.main-container {
    display: flex;
    height: calc(100vh - 60px);
    gap: 0;
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    padding: 20px;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calendar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid var(--color-bg-light);
    border-left: 8px solid #e1e1e1;
}

.calendar-item:hover {
    background: var(--color-bg-light);
}

.calendar-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.calendar-item-info {
    flex: 1;
    min-width: 0;
}

.calendar-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-item-creator {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-item-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.calendar-item:hover .calendar-item-actions {
    opacity: 1;
}

.ics-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #999;
    transition: all 0.2s;
    padding: 0;
}

.ics-action-btn:hover {
    background: #e8ecf4;
    color: var(--color-primary);
}

.ics-action-btn svg {
    width: 14px;
    height: 14px;
}

.calendar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

.sidebar-actions {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.btn-export {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    transition: background 0.3s;
}

.btn-export svg {
    width: 16px;
    height: 16px;
}

.calendar-view {
    flex: 1;
    overflow: auto;
    background: white;
}

/* Override: calendar-header inside content area uses border instead of shadow */
.calendar-content .calendar-header {
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
    padding: 20px;
}

/* Subscribe Modal */
.subscribe-section {
    margin-bottom: 18px;
}

.subscribe-section label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
}

.subscribe-row {
    display: flex;
    gap: 8px;
}

.subscribe-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    background: #f9fafb;
}

.subscribe-row button {
    padding: 10px 14px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================
   Sidebar Toggle Button (mobile)
   ============================================ */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding: 0;
    transition: transform 0.2s;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    background: rgb(6, 83, 182);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1199;
}

.sidebar-backdrop.active {
    display: block;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        z-index: 1200;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .main-container {
        display: block;
        height: auto;
    }

    .calendar-content {
        height: calc(100vh - 60px);
    }

    .calendar-content .calendar-header {
        padding: 12px;
    }

    .subscribe-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .subscribe-row {
        flex-direction: column;
    }

    .subscribe-row button {
        width: 100%;
    }
}

.subscribe-row button:hover {
    background: rgb(6, 83, 182);
}

.subscribe-hint {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

/* ICS toast styles moved to toast.css */

/* Sidebar loading message */
.sidebar-loading {
    color: #999;
    font-size: 13px;
    padding: 10px 0;
}

