/**
 * Rialto Film Guide - Public Styles
 */

/* CSS Variables - Dark Theme to match Rialto branding */
:root {
    --rialto-primary: #1a1a1a;
    --rialto-secondary: #bfb099;
    --rialto-accent: #e63946;
    --rialto-text: #ffffff;
    --rialto-text-light: #bfb099;
    --rialto-text-muted: #888;
    --rialto-bg: #0d0d0d;
    --rialto-bg-dark: #1a1a1a;
    --rialto-bg-light: #1f1f1f;
    --rialto-border: #333;
    --rialto-shadow: 0 2px 8px rgba(0,0,0,0.3);
    --rialto-radius: 4px;
    --rialto-transition: 0.3s ease;
}

/* Base App Container */
.rialto-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--rialto-text);
    line-height: 1.5;
}

/* Loading State */
.rialto-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: var(--rialto-text-light);
}

.rialto-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--rialto-border);
    border-top-color: var(--rialto-secondary);
    border-radius: 50%;
    animation: rialto-spin 0.8s linear infinite;
}

@keyframes rialto-spin {
    to { transform: rotate(360deg); }
}

/* Film Grid */
.rialto-film-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

/* Film Card */
.rialto-film-card {
    position: relative;
    background: var(--rialto-bg);
    border-radius: var(--rialto-radius);
    overflow: hidden;
    box-shadow: var(--rialto-shadow);
    transition: transform var(--rialto-transition), box-shadow var(--rialto-transition);
}

.rialto-film-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.rialto-film-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.rialto-film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--rialto-transition);
}

.rialto-film-card:hover .rialto-film-poster img {
    transform: scale(1.05);
}

.rialto-film-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 16px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: #fff;
}

.rialto-film-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
}

.rialto-film-title a {
    color: inherit;
    text-decoration: none;
}

.rialto-film-meta {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.rialto-film-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

/* Buttons */
.rialto-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--rialto-radius);
    cursor: pointer;
    transition: all var(--rialto-transition);
}

.rialto-btn-primary {
    background: var(--rialto-secondary);
    color: var(--rialto-primary);
}

.rialto-btn-primary:hover {
    background: #a89a84;
}

.rialto-btn-secondary {
    background: rgba(255,255,255,0.9);
    color: var(--rialto-primary);
}

.rialto-btn-secondary:hover {
    background: #fff;
}

.rialto-btn-small {
    padding: 4px 12px;
    font-size: 12px;
}

/* Certification Badge */
.rialto-cert {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    background: var(--rialto-primary);
    color: #fff;
    border-radius: 2px;
}

/* Schedule Calendar */
.rialto-schedule {
    background: var(--rialto-bg);
    border-radius: var(--rialto-radius);
    padding: 20px;
}

/* ========================================
   SCHEDULE - Modern TV Guide Design
   ======================================== */

.rialto-schedule {
    max-width: 1200px;
    margin: 0 auto;
}

/* Month title */
.schedule-month {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: -0.5px;
    color: #fff;
    margin: 0 0 16px;
    text-align: center;
    padding: 0 16px;
}

/* Days row: nav buttons + scrollable day pills in one row */
.rialto-schedule-days-row {
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(191, 176, 153, 0.15);
}

/* Prev/Next nav buttons (visible on both desktop and mobile, styled per breakpoint) */
.day-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 10px 20px;
    background: linear-gradient(180deg, rgba(50, 50, 50, 0.9) 0%, rgba(35, 35, 35, 0.95) 100%);
    border: 1px solid rgba(191, 176, 153, 0.3);
    border-radius: 8px;
    color: var(--rialto-gray-light);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.day-nav-btn:hover {
    background: linear-gradient(180deg, rgba(60, 60, 60, 0.9) 0%, rgba(45, 45, 45, 0.95) 100%);
    border-color: var(--rialto-primary);
    color: var(--rialto-primary);
}

.nav-chevron {
    display: block;
    width: 16px;
    height: 16px;
}

.nav-label {
    display: inline;
}

/* Day Selector */
.rialto-schedule-days {
    display: flex;
    justify-content: center;
    gap: 4px;
    overflow-x: auto;
    padding: 0;
    flex: 1;
    min-width: 0;
}

.rialto-schedule-day {
    flex: 0 0 auto;
    min-width: 85px;
    padding: 14px 20px;
    text-align: center;
    background: linear-gradient(180deg, rgba(40, 40, 40, 0.8) 0%, rgba(30, 30, 30, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rialto-schedule-day:hover {
    background: linear-gradient(180deg, rgba(50, 50, 50, 0.9) 0%, rgba(40, 40, 40, 0.95) 100%);
    border-color: rgba(191, 176, 153, 0.4);
    transform: translateY(-2px);
}

.rialto-schedule-day.active {
    background: linear-gradient(180deg, var(--rialto-primary) 0%, #a69478 100%);
    border-color: var(--rialto-primary);
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(191, 176, 153, 0.3);
}

.rialto-schedule-day-name {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.rialto-schedule-day.active .rialto-schedule-day-name {
    color: rgba(0, 0, 0, 0.6);
}

.rialto-schedule-day-date {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rialto-gray-light);
}

.rialto-schedule-day.active .rialto-schedule-day-date {
    color: #1a1a1a;
}

/* Earlier Shows Visual Strip */
.earlier-strip-container {
    padding: 0 16px;
    margin-bottom: 20px;
}

.earlier-strip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.earlier-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
}

.earlier-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(191, 176, 153, 0.3);
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.earlier-toggle-btn:hover {
    background: rgba(191, 176, 153, 0.15);
    border-color: var(--rialto-primary);
}

.earlier-toggle-btn.expanded {
    background: rgba(191, 176, 153, 0.2);
}

.toggle-icon {
    font-size: 0.6rem;
}

.earlier-strip {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 28px 0 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--rialto-primary) transparent;
    position: relative;
}

.earlier-strip::-webkit-scrollbar {
    height: 4px;
}

.earlier-strip::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.earlier-strip::-webkit-scrollbar-thumb {
    background: var(--rialto-primary);
    border-radius: 2px;
}

.earlier-strip-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: transform 0.2s ease;
    position: relative;
}

.earlier-strip-item:hover {
    transform: translateY(-4px);
}

/* Now Playing label for earlier strip */
.earlier-strip-item .now-playing-label {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 6px;
    background: var(--rialto-gold, #bfb099);
    color: #000;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Now Playing highlight for earlier strip items */
.earlier-strip-item.now-playing {
    z-index: 10;
    margin-top: 24px;
}

.earlier-strip-item.now-playing .earlier-strip-poster {
    border-color: var(--rialto-gold, #bfb099) !important;
    border-width: 3px;
    box-shadow: 0 0 25px rgba(191, 176, 153, 0.6), 0 6px 16px rgba(0, 0, 0, 0.6);
}

.earlier-strip-item.now-playing .earlier-strip-time {
    color: var(--rialto-gold, #bfb099);
    font-weight: 700;
}

/* Earlier strip posters - 20% larger (84x120 instead of 70x100) */
.earlier-strip-poster {
    width: 84px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 2px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.earlier-strip-item:hover .earlier-strip-poster {
    border-color: var(--rialto-primary);
}

.earlier-strip-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder with Rialto gold gradient and title */
.poster-placeholder-small {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #bfb099 0%, #8a7d6a 50%, #5c5347 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
    font-size: 0; /* Hide any emoji text */
    color: transparent;
}

/* Hide the emoji inside placeholder */
.poster-placeholder-small > span:not(.placeholder-title) {
    display: none;
}

.poster-placeholder-small::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

.poster-placeholder-small .placeholder-title {
    display: block !important;
    font-size: 0.6rem !important;
    font-weight: 600;
    color: #1a1a1a !important;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    word-break: break-word;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

.earlier-strip-time {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* Hover Popup for Earlier Strip Items - positioned ABOVE the poster */
.earlier-strip-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    width: 280px;
    background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid rgba(191, 176, 153, 0.3);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 20px rgba(191, 176, 153, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 9999;
    pointer-events: none;
}

/* Arrow pointing DOWN to the poster */
.earlier-strip-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #1a1a1a;
}

.earlier-strip-item:hover .earlier-strip-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.popup-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.popup-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.popup-meta-item {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: #ccc;
}

.popup-meta-item.genre {
    background: rgba(191, 176, 153, 0.2);
    color: var(--rialto-gold, #bfb099);
}

.popup-meta-item.cert {
    background: rgba(139, 0, 0, 0.3);
    color: #ff9999;
}

.popup-synopsis {
    font-size: 0.75rem;
    color: #999;
    line-height: 1.4;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popup-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #01b4e4, #0d253f);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.popup-rating-label {
    font-size: 0.6rem;
    opacity: 0.8;
}

/* Prime Time Label */
.prime-time-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
}

.prime-icon {
    font-size: 0.9rem;
}

/* Schedule List */
.rialto-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}

/* Schedule Item - Modern Row Design */
.rialto-schedule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(38, 38, 38, 0.95) 0%, rgba(28, 28, 28, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rialto-schedule-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.rialto-schedule-item:hover {
    background: linear-gradient(180deg, rgba(48, 48, 48, 0.95) 0%, rgba(38, 38, 38, 0.98) 100%);
    border-color: rgba(191, 176, 153, 0.2);
    transform: translateX(4px);
}

.rialto-schedule-item:hover::before {
    background: var(--rialto-primary);
}

/* Now Playing - Prime Time Item */
.rialto-schedule-item.now-playing {
    background: linear-gradient(180deg, rgba(191, 176, 153, 0.15) 0%, rgba(38, 38, 38, 0.98) 100%);
    border-color: var(--rialto-gold, #bfb099);
    box-shadow: 0 0 30px rgba(191, 176, 153, 0.2);
}

.rialto-schedule-item.now-playing::before {
    background: var(--rialto-gold, #bfb099);
    width: 4px;
}

.now-playing-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, var(--rialto-gold, #bfb099) 0%, rgba(191, 176, 153, 0.8) 100%);
    color: #000;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    padding: 4px 8px;
    z-index: 5;
}

/* Time Column */
.schedule-time-col {
    flex: 0 0 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
}

/* My Reminders - tighter time column and content padding */
.my-reminders .schedule-time-col {
    gap: 2px;
    align-self: center;
}

.my-reminders .schedule-content {
    padding: 0 16px;
}

.schedule-time {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.time-digits {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 1px;
}

.time-period {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

/* Poster */
.schedule-poster {
    flex: 0 0 65px;
    width: 65px;
    height: 95px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.schedule-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rialto-schedule-item:hover .schedule-poster img {
    transform: scale(1.05);
}

.poster-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(50, 50, 50, 0.8) 0%, rgba(30, 30, 30, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Content */
.schedule-content {
    flex: 1;
    min-width: 0;
}

.schedule-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Details row: 2x2 metadata grid on left, synopsis on right */
.schedule-details {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 2x2 metadata grid */
.schedule-meta-grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: 4px 12px;
    flex-shrink: 0;
}

.schedule-meta-grid span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.schedule-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.meta-year {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 600;
}

.meta-genre {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.meta-duration {
    color: rgba(255, 255, 255, 0.5) !important;
}

.meta-cert {
    width: fit-content;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.7rem !important;
    letter-spacing: 0.5px;
}

.meta-cert.cert-g,
.meta-cert.cert-pg {
    background: #2d5a27;
    color: #90ee90;
}

.meta-cert.cert-m {
    background: #8b7500;
    color: #ffd700;
}

.meta-cert.cert-13,
.meta-cert.cert-16,
.meta-cert.cert-18,
.meta-cert.cert-r13,
.meta-cert.cert-r16,
.meta-cert.cert-r18 {
    background: #8b0000;
    color: #ff6b6b;
}

.schedule-synopsis {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

/* Ratings & Actions */
.schedule-ratings-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.schedule-ratings {
    display: flex;
    gap: 6px;
}

.rating-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.rating-badge.tmdb {
    background: linear-gradient(135deg, #01b4e4 0%, #0d253f 100%);
    color: #fff;
}

.rating-badge.tmdb:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(1, 180, 228, 0.4);
}

.rating-badge.imdb {
    background: linear-gradient(135deg, #f5c518 0%, #c9a000 100%);
    color: #000;
}

.rating-badge.imdb:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(245, 197, 24, 0.4);
}

.rating-source {
    font-size: 0.6rem;
    opacity: 0.9;
}

.rating-value {
    font-size: 0.8rem;
}

/* Action Buttons */
.schedule-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.action-btn:hover {
    background: rgba(191, 176, 153, 0.2);
    border-color: var(--rialto-primary);
    color: var(--rialto-primary);
    transform: scale(1.1);
}

.remind-btn:hover {
    background: rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
    color: #ffc107;
}

.trailer-btn:hover {
    background: rgba(229, 57, 53, 0.2);
    border-color: #e53935;
    color: #e53935;
}

/* Arrow indicator */
.schedule-arrow {
    flex: 0 0 24px;
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.schedule-arrow svg {
    width: 24px;
    height: 24px;
}

.rialto-schedule-item:hover .schedule-arrow {
    color: var(--rialto-primary);
    transform: translateX(4px);
}

/* Highlighted Item (8:30pm Featured) */
.rialto-schedule-item.highlighted {
    background: linear-gradient(135deg, rgba(191, 176, 153, 0.12) 0%, rgba(212, 175, 55, 0.08) 100%);
    border: 2px solid var(--rialto-primary);
    box-shadow: 0 4px 25px rgba(191, 176, 153, 0.2);
}

.rialto-schedule-item.highlighted::before {
    background: linear-gradient(180deg, var(--rialto-primary), var(--rialto-accent));
    width: 4px;
}

.rialto-schedule-item.highlighted .time-digits {
    color: var(--rialto-accent);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.rialto-schedule-item.highlighted .time-period {
    color: rgba(212, 175, 55, 0.7);
}

.featured-badge {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    background: linear-gradient(135deg, var(--rialto-primary), var(--rialto-accent));
    padding: 3px 8px;
    border-radius: 3px;
}

/* Empty State */
.schedule-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.schedule-empty p {
    margin: 0 0 16px;
    font-size: 1rem;
}

.show-earlier-link {
    background: transparent;
    border: 1px solid var(--rialto-primary);
    color: var(--rialto-primary);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-earlier-link:hover {
    background: var(--rialto-primary);
    color: #1a1a1a;
}

/* Responsive */
@media (max-width: 768px) {
    /* Reduce top padding on mobile */
    .rialto-schedule {
        padding: 8px 0 20px;
    }

    /* Compact month label on mobile */
    .schedule-month {
        font-size: 0.75rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.45);
        letter-spacing: 1px;
        text-transform: uppercase;
        margin: 0 0 6px;
    }

    /* Days row compact on mobile */
    .rialto-schedule-days-row {
        gap: 0;
        padding: 0 4px 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(191, 176, 153, 0.12);
    }

    /* Small chevron-only nav buttons on mobile */
    .day-nav-btn {
        justify-content: center;
        width: 28px;
        height: 28px;
        padding: 0;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(191, 176, 153, 0.25);
        border-radius: 6px;
        color: rgba(255, 255, 255, 0.6);
    }

    .day-nav-btn:hover,
    .day-nav-btn:active {
        background: rgba(191, 176, 153, 0.15);
        border-color: rgba(191, 176, 153, 0.5);
        color: #fff;
    }

    .nav-label {
        display: none;
    }

    .nav-chevron {
        width: 14px;
        height: 14px;
    }

    /* Day selector - all 7 days visible, no scroll */
    .rialto-schedule-days {
        justify-content: center;
        gap: 3px;
        padding: 0 4px;
        overflow: hidden;
    }

    .rialto-schedule-day {
        flex: 1 1 0;
        min-width: 0;
        padding: 5px 2px;
        border-radius: 6px;
    }

    .rialto-schedule-day-name {
        font-size: 0.5rem;
        margin-bottom: 1px;
        letter-spacing: 0.5px;
    }

    .rialto-schedule-day-date {
        font-size: 0.95rem;
    }

    /* Earlier strip */
    .earlier-strip-container {
        padding: 0 12px;
    }

    .earlier-strip-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .earlier-toggle-btn {
        font-size: 0.7rem;
        padding: 5px 12px;
    }

    /* Schedule items - Netflix mobile style horizontal cards */
    .rialto-schedule-list {
        padding: 0 12px;
        gap: 12px;
    }

    .rialto-schedule-item {
        display: grid;
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto;
        padding: 0;
        gap: 0;
        border-radius: 8px;
        overflow: hidden;
        background: rgba(30, 30, 30, 0.8);
    }

    .rialto-schedule-item::before {
        display: none;
    }

    /* Poster - left column, full height */
    .schedule-poster {
        grid-column: 1;
        grid-row: 1 / -1;
        width: 100px;
        height: 100%;
        min-height: 150px;
        border-radius: 0;
    }

    .schedule-poster img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }

    .poster-placeholder {
        height: 100%;
        min-height: 150px;
        border-radius: 0;
    }

    /* Hide desktop time column */
    .schedule-time-col {
        display: none;
    }

    /* Content - right column */
    .schedule-content {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        padding: 12px 14px 8px;
        gap: 6px;
    }

    /* Time shown above title on mobile */
    .schedule-content::before {
        content: attr(data-time);
        font-family: 'Poppins', sans-serif;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--rialto-gold, #bfb099);
        letter-spacing: 0.5px;
    }

    .schedule-title {
        font-size: 1rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.3;
    }

    .schedule-details {
        flex-direction: column;
        gap: 6px;
    }

    .schedule-meta-grid {
        gap: 3px 10px;
    }

    .schedule-meta-grid span {
        font-size: 0.7rem;
    }

    .meta-genre,
    .meta-duration,
    .meta-cert,
    .meta-year {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    .schedule-synopsis {
        display: none;
    }

    /* Hide TMDB and IMDb badges on mobile */
    .rating-badge.tmdb,
    .rating-badge.imdb {
        display: none;
    }

    /* Ratings and actions - right column, below content */
    .schedule-ratings-actions {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        padding: 0 14px 8px;
    }

    .schedule-ratings {
        gap: 6px;
    }

    .rating-badge {
        padding: 3px 6px;
        font-size: 0.65rem;
    }

    .schedule-actions {
        gap: 6px;
    }

    .action-btn {
        width: 30px;
        height: 30px;
    }

    .action-btn svg {
        width: 14px;
        height: 14px;
    }

    .schedule-arrow {
        display: none;
    }

    .prime-time-label {
        padding: 0 12px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .rialto-schedule-days {
        gap: 2px;
        padding: 0 2px;
    }

    .rialto-schedule-day {
        padding: 4px 1px;
    }

    .rialto-schedule-day-name {
        font-size: 0.45rem;
        letter-spacing: 0.3px;
    }

    .rialto-schedule-day-date {
        font-size: 0.85rem;
    }

    .day-nav-btn {
        width: 22px;
        height: 22px;
    }

    .nav-chevron {
        width: 11px;
        height: 11px;
    }

    /* Adjust grid for smaller screens */
    .rialto-schedule-item {
        grid-template-columns: 85px 1fr;
    }

    .schedule-poster {
        width: 85px;
        min-height: 130px;
    }

    .poster-placeholder {
        min-height: 130px;
    }

    .schedule-content {
        padding: 10px 12px 6px;
    }

    .schedule-content::before {
        font-size: 0.8rem;
    }

    .schedule-title {
        font-size: 0.9rem;
    }

    .schedule-meta-grid span,
    .meta-genre,
    .meta-duration,
    .meta-cert,
    .meta-year {
        font-size: 0.65rem;
        padding: 2px 5px;
    }

    .schedule-ratings-actions {
        padding: 0 12px 10px;
        gap: 8px;
    }

    .action-btn {
        width: 28px;
        height: 28px;
    }

    .action-btn svg {
        width: 12px;
        height: 12px;
    }

    .earlier-strip-poster {
        width: 45px;
        height: 65px;
    }

    .earlier-strip-time {
        font-size: 0.55rem;
    }

    .rating-badge {
        padding: 2px 5px;
        font-size: 0.55rem;
    }
}

/* ========================================
   TRAILER MODAL
   ======================================== */

.trailer-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.trailer-modal {
    width: 100%;
    max-width: 1000px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trailer-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(40, 40, 40, 1) 0%, rgba(30, 30, 30, 1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trailer-modal-header h3 {
    margin: 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
}

.trailer-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.trailer-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.1);
}

.trailer-modal-close svg {
    width: 20px;
    height: 20px;
}

.trailer-modal-content {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.trailer-modal-content iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .trailer-modal-overlay {
        padding: 10px;
    }

    .trailer-modal-header {
        padding: 12px 16px;
    }

    .trailer-modal-header h3 {
        font-size: 0.95rem;
    }
}

/* Search */
.rialto-search {
    margin-bottom: 24px;
}

.rialto-search-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rialto-search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--rialto-border);
    border-radius: var(--rialto-radius);
    transition: border-color var(--rialto-transition);
}

.rialto-search-input:focus {
    outline: none;
    border-color: var(--rialto-secondary);
}

.rialto-search-select {
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid var(--rialto-border);
    border-radius: var(--rialto-radius);
    background: var(--rialto-bg);
}

/* Pick of Day/Week */
.rialto-pick {
    position: relative;
    background: var(--rialto-primary);
    color: #fff;
    border-radius: var(--rialto-radius);
    overflow: hidden;
}

.rialto-pick-bg {
    position: absolute;
    inset: 0;
    opacity: 0.3;
}

.rialto-pick-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px);
}

.rialto-pick-content {
    position: relative;
    display: flex;
    gap: 24px;
    padding: 24px;
}

.rialto-pick-poster {
    flex: 0 0 200px;
    border-radius: var(--rialto-radius);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.rialto-pick-poster img {
    width: 100%;
    display: block;
}

.rialto-pick-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rialto-pick-label {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--rialto-secondary);
    color: var(--rialto-primary);
    border-radius: var(--rialto-radius);
    margin-bottom: 12px;
    align-self: flex-start;
}

.rialto-pick-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
}

.rialto-pick-synopsis {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 16px;
}

.rialto-pick-time {
    font-size: 18px;
    margin-bottom: 20px;
}

/* Auth Modal */
.rialto-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.rialto-modal {
    background: var(--rialto-bg);
    border-radius: var(--rialto-radius);
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

/* Small modals (auth, reminder, etc) */
.rialto-modal:not(.rialto-modal-large) {
    padding: 32px;
    max-width: 400px;
    width: 90%;
}

/* Large modals (trailer video) */
.rialto-modal.rialto-modal-large {
    width: 80vw;
    max-width: 1400px;
    padding: 0;
    background: #000;
}

.rialto-modal.rialto-modal-large .rialto-modal-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.rialto-modal.rialto-modal-large .rialto-modal-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.rialto-modal-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px;
}

.rialto-modal-desc {
    color: var(--rialto-text-light);
    margin-bottom: 24px;
}

.rialto-form-group {
    margin-bottom: 16px;
}

.rialto-form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
}

.rialto-form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--rialto-border);
    border-radius: var(--rialto-radius);
}

.rialto-form-input:focus {
    outline: none;
    border-color: var(--rialto-secondary);
}

.rialto-form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rialto-form-checkbox input {
    width: 18px;
    height: 18px;
}

.rialto-form-error {
    color: #e53935;
    font-size: 14px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: rgba(229, 57, 53, 0.1);
    border-radius: 6px;
}

.rialto-form-optional {
    font-weight: 400;
    color: var(--rialto-text-light, #888);
    font-size: 0.85em;
}

/* Slider */
.rialto-slider {
    position: relative;
}

.rialto-slider-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.rialto-slider-track::-webkit-scrollbar {
    display: none;
}

.rialto-slider-item {
    flex: 0 0 200px;
}

.rialto-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--rialto-bg);
    border: none;
    border-radius: 50%;
    box-shadow: var(--rialto-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.rialto-slider-nav.prev {
    left: -20px;
}

.rialto-slider-nav.next {
    right: -20px;
}

/* Responsive */
@media (max-width: 768px) {
    .rialto-film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .rialto-pick-content {
        flex-direction: column;
    }

    .rialto-pick-poster {
        flex: none;
        max-width: 200px;
    }

    .rialto-schedule-item {
        flex-direction: column;
    }

    .rialto-schedule-time {
        flex: none;
    }
}

@media (max-width: 480px) {
    .rialto-film-grid {
        grid-template-columns: 1fr;
    }

    .rialto-search-form {
        flex-direction: column;
    }

    .rialto-search-select {
        width: 100%;
    }
}
