/**
 * WG Streaming Calendar - Styles
 *
 * @package WG_Streaming
 * @since 2.1.0
 */

/* ========== TIMELINE VIEW ========== */
.wg-streaming-calendar.timeline-view {
    max-width: 1200px;
    margin: 0 auto;
}

.calendar-day {
    margin-bottom: 40px;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.day-name {
    font-size: 18px;
    font-weight: 600;
}

.release-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.day-releases {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 20px;
}

.release-item {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.release-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.release-item:last-child {
    margin-bottom: 0;
}

.item-poster {
    flex-shrink: 0;
    width: 80px;
}

.item-poster img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.item-info {
    flex: 1;
}

.item-title {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.item-title a {
    color: #24292e;
    text-decoration: none;
    transition: color 0.2s;
}

.item-title a:hover {
    color: #667eea;
}

.item-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.meta-badge,
.meta-quality {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.meta-badge.new {
    background: #d4edda;
    color: #155724;
}

.meta-badge.leaving {
    background: #fff3cd;
    color: #856404;
}

.meta-quality {
    background: #e7f3ff;
    color: #0366d6;
}

/* ========== GRID VIEW ========== */
.wg-streaming-calendar.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.calendar-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.calendar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-poster {
    position: relative;
    padding-top: 150%;
    overflow: hidden;
}

.card-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.release-date {
    background: rgba(255,255,255,0.9);
    color: #24292e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.card-content {
    padding: 15px;
}

.card-content h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.new-badge,
.leaving-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 8px;
}

.new-badge {
    background: #d4edda;
    color: #155724;
}

.leaving-badge {
    background: #fff3cd;
    color: #856404;
}

.quality {
    display: inline-block;
    padding: 4px 8px;
    background: #e7f3ff;
    color: #0366d6;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

/* ========== LIST VIEW ========== */
.wg-streaming-calendar.list-view {
    max-width: 800px;
    margin: 0 auto;
}

.wg-streaming-calendar.list-view ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.calendar-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.calendar-list-item:hover {
    background: #f6f8fa;
}

.item-date {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

.item-title {
    flex: 1;
}

.item-title a {
    color: #24292e;
    text-decoration: none;
}

.item-title a:hover {
    color: #667eea;
    text-decoration: underline;
}

.leaving-icon {
    font-size: 18px;
}

/* ========== SERVICE BADGES ========== */
.service-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.service-netflix {
    background: #E50914;
    color: white;
}

.service-prime {
    background: #00A8E1;
    color: white;
}

.service-disney {
    background: #113CCF;
    color: white;
}

.service-apple {
    background: #000000;
    color: white;
}

.service-wow {
    background: #FF6B35;
    color: white;
}

.service-paramount {
    background: #0064FF;
    color: white;
}

.service-rtl {
    background: #E5007D;
    color: white;
}

.service-joyn {
    background: #00D7A3;
    color: white;
}

/* ========== EMPTY STATE ========== */
.wg-calendar-empty {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.wg-calendar-empty p {
    color: #586069;
    font-size: 16px;
}

/* ========== WIDGET ========== */
.wg-calendar-widget {
    background: white;
    border-radius: 8px;
    padding: 15px;
}

.widget-release-item {
    padding: 12px 0;
    border-bottom: 1px solid #e1e4e8;
}

.widget-release-item:last-child {
    border-bottom: none;
}

.widget-release-item .item-title {
    margin-bottom: 6px;
}

.widget-release-item .item-title a {
    color: #24292e;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.widget-release-item .item-title a:hover {
    color: #667eea;
}

.widget-release-item .item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #586069;
}

.meta-service {
    font-weight: 500;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .wg-streaming-calendar.grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .release-item {
        flex-direction: column;
        gap: 15px;
    }

    .item-poster {
        width: 100%;
        max-width: 150px;
        margin: 0 auto;
    }

    .day-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .calendar-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-date {
        width: auto;
    }
}

@media (max-width: 480px) {
    .wg-streaming-calendar.grid-view {
        grid-template-columns: 1fr;
    }
}

/* ========== DARK MODE ========== */
@media (prefers-color-scheme: dark) {
    .day-releases {
        background: #1a202c;
        border-color: #2d3748;
    }

    .release-item,
    .calendar-card,
    .calendar-list-item {
        background: #2d3748;
        border-color: #4a5568;
    }

    .item-title a,
    .card-content h4 {
        color: #e2e8f0;
    }

    .item-title a:hover {
        color: #a5b4fc;
    }

    .meta-badge.new {
        background: #2f855a;
        color: #9ae6b4;
    }

    .meta-badge.leaving {
        background: #975a16;
        color: #fbd38d;
    }

    .meta-quality {
        background: #2c5282;
        color: #90cdf4;
    }

    .wg-calendar-empty p {
        color: #cbd5e0;
    }

    .widget-release-item {
        border-color: #4a5568;
    }

    .widget-release-item .item-title a {
        color: #e2e8f0;
    }
}
