/* Series Archive Styles */
.i2i-series-archive {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Sorting Controls */
.i2i-sorting-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.i2i-sorting-controls label {
    font-weight: 600;
    margin-right: 10px;
    color: #2d3748;
}

.i2i-sorting-controls select {
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background: white;
    font-size: 14px;
}

.i2i-view-toggle {
    display: flex;
    gap: 5px;
}

.i2i-view-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.i2i-view-btn:hover,
.i2i-view-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Series Container Layouts */
.i2i-series-container.i2i-layout-grid {
    display: grid;
    gap: 30px;
}

.i2i-series-container.i2i-layout-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.i2i-series-container.i2i-layout-masonry {
    display: grid;
    gap: 30px;
}

/* Series Cards */
.i2i-series-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.i2i-series-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.i2i-series-card.i2i-clickable {
    cursor: pointer;
}

.i2i-series-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Series Card Content */
.i2i-series-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.i2i-series-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.3;
}

.i2i-event-count {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.i2i-series-description {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

.i2i-series-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #718096;
    font-size: 14px;
}

.i2i-upcoming-count {
    font-weight: 600;
}

.i2i-series-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.i2i-series-card:hover .i2i-series-arrow {
    transform: translateX(4px);
}

/* List Layout Specific */
.i2i-layout-list .i2i-series-card {
    display: flex;
    align-items: center;
    padding: 20px 30px;
}

.i2i-layout-list .i2i-series-header {
    flex: 1;
    margin-bottom: 0;
    margin-right: 20px;
}

.i2i-layout-list .i2i-series-description {
    flex: 2;
    margin-bottom: 0;
    margin-right: 20px;
}

.i2i-layout-list .i2i-series-footer {
    flex: 0 0 auto;
}

/* Loading State */
.i2i-series-loading {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.i2i-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #007cba;
    animation: i2i-spin 1s ease-in-out infinite;
}

@keyframes i2i-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Series Popup Styles */
.i2i-series-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: i2i-fadeIn 0.3s ease-out;
}

.i2i-series-popup {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: i2i-popupSlideIn 0.3s ease-out;
}

@keyframes i2i-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes i2i-popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.i2i-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.i2i-popup-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
}

.i2i-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #718096;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.i2i-popup-close:hover {
    background: #f7fafc;
    color: #2d3748;
}

.i2i-popup-content {
    padding: 30px;
}

/* Popup Series Stats */
.i2i-popup-content .i2i-series-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    justify-content: center;
}

.i2i-popup-content .i2i-stat-item {
    text-align: center;
}

.i2i-popup-content .i2i-stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.i2i-popup-content .i2i-stat-label {
    display: block;
    font-size: 14px;
    color: #718096;
    margin-top: 8px;
    font-weight: 600;
}

.i2i-popup-description {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Popup Events List */
.i2i-popup-events h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.i2i-events-list {
    max-height: 300px;
    overflow-y: auto;
}

.i2i-event-item {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.i2i-event-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.i2i-event-content h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.i2i-event-content h5 a {
    color: #007cba;
    text-decoration: none;
}

.i2i-event-content h5 a:hover {
    text-decoration: underline;
}

.i2i-event-date,
.i2i-event-author {
    display: block;
    font-size: 14px;
    color: #718096;
    margin-bottom: 4px;
}

/* Popup Actions */
.i2i-popup-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.i2i-popup-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.i2i-popup-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.i2i-popup-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.i2i-popup-btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.i2i-popup-btn-secondary:hover {
    background: #edf2f7;
    color: #2d3748;
}

/* Responsive Design */
@media (max-width: 768px) {
    .i2i-sorting-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .i2i-series-container.i2i-layout-grid {
        grid-template-columns: 1fr !important;
    }
    
    .i2i-layout-list .i2i-series-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .i2i-layout-list .i2i-series-header,
    .i2i-layout-list .i2i-series-description {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .i2i-series-popup {
        width: 95vw;
        margin: 10px;
    }
    
    .i2i-popup-header,
    .i2i-popup-content {
        padding: 20px;
    }
    
    .i2i-popup-content .i2i-series-stats {
        gap: 20px;
    }
    
    .i2i-popup-actions {
        flex-direction: column;
    }
}
