/**
 * Frontend Styles for Radio Sol Schedule
 * RTL-optimized with Karantina font support
 * Updated to match reference design
 */

/* Katalogue Font Face Declarations */
@font-face {
    font-family: "Katalogue";
    font-style: normal;
    font-weight: normal;
    font-display: auto;
    src: url("https://radiosol.yaniv.tv/wp-content/uploads/podcast1/2025/11/katalogueboldwebfont.eot");
    src: url("https://radiosol.yaniv.tv/wp-content/uploads/podcast1/2025/11/katalogueboldwebfont.eot?#iefix") format("embedded-opentype"),
        url("https://radiosol.yaniv.tv/wp-content/uploads/podcast1/2025/11/katalogueboldwebfont.woff") format("woff"),
        url("https://radiosol.yaniv.tv/wp-content/uploads/podcast1/2025/11/katalogueboldwebfont.ttf") format("truetype"),
        url("https://radiosol.yaniv.tv/wp-content/uploads/podcast1/2025/11/katalogueboldwebfont.svg#Katalogue") format("svg");
}

/* Schedule Table Container */
.radiosol-schedule-container {
    margin: 30px 0;
    direction: rtl;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    font-family: "Katalogue", Sans-serif;
}

/* Day Filter Tabs - Blue/Orange Design */
.radiosol-day-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.radiosol-day-filter {
    padding: 12px 24px;
    background-color: #0f0b43;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Katalogue", Sans-serif;
    font-size: 20px;
    font-weight: 500;
    position: relative;
    min-width: 130px;
    text-align: center;
}

.radiosol-day-filter:hover {
    background-color: #1a1555;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(15, 11, 67, 0.4);
}

.radiosol-day-filter.active {
    background-color: #fc6d4b;
    color: #fff;
    box-shadow: 0 4px 8px rgba(252, 109, 75, 0.4);
}

.radiosol-day-filter.active:hover {
    background-color: #fd5a36;
    box-shadow: 0 6px 12px rgba(252, 109, 75, 0.5);
}

/* Schedule Grid - 3 Column Layout */
.radiosol-schedule-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Remove single-day max-width restriction */
.radiosol-schedule-grid.single-day {
    max-width: 1400px !important;
}

.radiosol-schedule-container .radiosol-day-schedule,
.radiosol-day-schedule {
    display: none !important;
    /* Hide all days by default */
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Show only active day */
.radiosol-day-schedule.active {
    display: grid !important;
}

/* Force 3 columns - prevent overflow */
.radiosol-day-schedule>.radiosol-show-card {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    box-sizing: border-box !important;
}

/* Card Link Wrapper */
.radiosol-show-card-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
    width: 100%;
    transition: all 0.3s ease;
}

.radiosol-show-card-link:hover {
    transform: translateY(-3px);
}

.radiosol-show-card-link:focus {
    outline: 2px solid #fc6d4b;
    outline-offset: 2px;
}

/* Show Cards - RTL Layout: Text Left (67%), Image Right (33%) */
.radiosol-show-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
    display: flex !important;
    flex-direction: row-reverse;
    /* RTL: Image on right */
    align-items: stretch;
    gap: 0;
    min-height: 126px;
    width: 100%;
    box-sizing: border-box;
}

.radiosol-show-card-link:hover .radiosol-show-card {
    opacity: 1;
    /* Hover effects applied through parent link */
}

.radiosol-show-card.live {
    /* Shadow removed from card - applied only to info section */
}

/* Show Info (Left Side - 67%) - Orange Border, White Background */
.radiosol-show-info {
    z-index: 10;
    margin-right: -15px;
    flex: 1 1 71%;
    max-width: 71%;
    display: flex;
    flex-direction: column;
    padding: 10px 37px 10px 10px;
    background: #fff;
    border: 4px solid #fc6d4b;
    /* Orange border */
    border-radius: 20px;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
    /* Remove right border where it meets image */
    box-sizing: border-box;
}

/* Live show glow effect - only on info section, not image */
.radiosol-show-card.live .radiosol-show-info {
    box-shadow: 0 6px 20px rgba(252, 109, 75, 0.4);
}

/* Show Image (Right Side - 33%) - Blue Border (Complete) */
.radiosol-show-image {
    z-index: 20;
    margin-left: -15px;
    flex: 1 1 33%;
    max-width: 33%;
    min-height: 126px;
    align-self: stretch;
    /* Stretch to match info section height */
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid #0f0b43;
    /* Blue border - complete all sides */
    box-sizing: border-box;
    background: transparent;
    position: relative;
    isolation: isolate;
    /* Create new stacking context to isolate from shadow */
}

/* Fix for live show image - ensure no background interference */
.radiosol-show-card.live .radiosol-show-image {
    background: transparent;
    box-shadow: none;
    /* Remove any shadow from image container */
}

.radiosol-show-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* Cover mode with center-top positioning - maintains aspect ratio, no stretching */
    display: block;
    /* Remove any inline spacing */
    background: transparent;
    /* Ensure no background on image */
}

/* Time Display - Blue Color */
.radiosol-show-time {
    letter-spacing: 0px;
    font-family: "Open Sans Hebrew", Sans-serif;
    font-size: 12px;
    color: #0f0b43;
    margin: 0;
    direction: ltr;
    font-weight: 500;
}

/* Title - Blue Color */
.radiosol-show-title {
    font-family: "Katalogue", Sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #0f0b43;
    /* Blue text */
    line-height: 1.2;
}

.radiosol-show-card-link:hover .radiosol-show-title {
    color: #fc6d4b;
}

.radiosol-show-card.live .radiosol-show-title {
    color: #fc6d4b;
}

/* Subtitle - Blue Color */
.radiosol-show-subtitle {
    font-family: 'Open Sans Hebrew', Sans-serif;
    font-size: 15px;
    color: #0f0b43;
    line-height: 1.2;
    margin: 0;
}

/* Live Badge - Enhanced Design */
.radiosol-live-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #fc6d4b 0%, #ff8a65 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 8px rgba(252, 109, 75, 0.3);
    margin-top: auto;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Now Playing Widget */
.radiosol-now-playing {
    background: transparent;
    padding: 0;
    color: #fff;
    direction: rtl;
}

/* H2 Heading - "עכשיו בשידור:" */
.radiosol-now-playing-heading {
    font-family: "Katalogue", Sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 3px 0;
    color: #fff;
    text-align: center;
}

/* Show Name */
.radiosol-now-playing-show-name {
    font-family: "Katalogue", Sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: #fff;
    text-align: center;
}

/* Description and Host Wrapper */
.radiosol-now-playing-description-host-wrapper {
    margin-bottom: 20px;
    text-align: center;
}

.radiosol-now-playing-description {
    font-family: 'Open Sans Hebrew', Sans-serif;
    text-align: center;
    font-size: 15px;
    color: #fff;
    line-height: 1;
    opacity: 0.95;
    margin-bottom: -10px;
}

.radiosol-now-playing-host {
    margin: 8px auto -9px;
    font-family: 'Open Sans Hebrew', Sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

/* Show Image - Square Format with Orange Border */
.radiosol-now-playing-show-image {
    margin: auto;
    width: 90%;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    border: 11px solid #fc6d4b;
    box-sizing: border-box;
}

.radiosol-now-playing-show-image img {
    background-color: #ffffff;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Live Video Button */
.radiosol-now-playing-live-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-family: "Katalogue", Sans-serif;
    font-size: 38px;
    font-weight: 500;
    padding: 0px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px -5px;
    text-align: center;
    direction: rtl;
}

.radiosol-now-playing-live-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.radiosol-now-playing-live-button:active {
    transform: translateY(0);
}

.radiosol-now-playing-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.radiosol-now-playing-button-icon svg {
    width: 60px;
    height: 60px;
    fill: #fc6d4b;
    flex-shrink: 0;
    top: -2px;
    position: relative;
}

.radiosol-now-playing-button-text {
    display: inline-block;
}

/* Next Show Section */
.radiosol-now-playing-next-heading {
    font-family: "Katalogue", Sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 0 10px 0 0;
    color: #fff;
    text-align: right;
}

.radiosol-now-playing-next-name {
    font-family: "Katalogue", Sans-serif;
    font-size: 20px;
    font-weight: 500;
    margin: 0 10px 0 0;
    color: #fff;
    text-align: right;
    line-height: 0.9;
}

.radiosol-now-playing-next-description-host-wrapper {
    text-align: right;
    margin: 0 10px 0 0;
}

.radiosol-now-playing-next-description {
    font-family: 'Open Sans Hebrew', Sans-serif;
    font-size: 14px;
    color: #fff;
    line-height: 1;
}

.radiosol-now-playing-next-host {
    font-family: 'Open Sans Hebrew', Sans-serif;
    font-size: 14px;
    color: #fff;
    text-align: right;
    line-height: 1;
}

/* No Show State */
.radiosol-no-show {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    opacity: 0.9;
    color: #fff;
}

/* Empty State - Enhanced */
.radiosol-empty-schedule {
    text-align: center;
    padding: 50px 20px;
    color: #666;
    font-style: italic;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    font-size: 16px;
    font-weight: 500;
}

.radiosol-empty-schedule::before {
    content: '📻';
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Mobile Day Navigation (Hidden on Desktop) */
.radiosol-day-navigation-mobile {
    display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {

    /* Hide desktop day filters, show mobile navigation */
    .radiosol-day-filters-desktop {
        display: none !important;
    }

    .radiosol-day-navigation-mobile {
        margin-left: 1em;
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 20px;
        margin-bottom: 30px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 12px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    /* Force single column on mobile */
    .radiosol-schedule-container .radiosol-day-schedule,
    .radiosol-day-schedule,
    .radiosol-day-schedule.active {
        grid-template-columns: 1fr !important;
    }

    /* Adjust image width for mobile */
    .radiosol-show-image {
        max-width: 36% !important;
        flex: 1 1 36% !important;
    }

    /* Adjust text info width accordingly */
    .radiosol-show-info {
        flex: 1 1 64% !important;
        max-width: 64% !important;
    }

    .radiosol-day-nav-arrow {
        background: #0f0b43;
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        font-size: 24px;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(15, 11, 67, 0.3);
    }

    .radiosol-day-nav-arrow:hover {
        background: #1a1555;
        transform: scale(1.1);
    }

    .radiosol-day-nav-arrow:active {
        transform: scale(0.95);
    }

    /* Previous day (<) on left side for RTL */
    .radiosol-day-nav-prev {
        order: 1;
    }

    /* Current day in center */
    .radiosol-current-day-display {
        order: 2;
        font-family: "Katalogue", Sans-serif;
        font-size: 28px;
        font-weight: 700;
        color: #0f0b43;
        min-width: 120px;
        text-align: center;
    }

    /* Next day (>) on right side for RTL */
    .radiosol-day-nav-next {
        order: 3;
    }

    /* Single column layout */
    .radiosol-day-schedule {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .radiosol-schedule-grid {
        padding: 10px !important;
    }

    /* Keep card internal layout the same */
    .radiosol-show-card {
        width: 90%;
        margin-left: 2em;
    }

    .radiosol-show-title {
        font-size: 22px;
    }

    /* Now Playing Widget - Mobile Styles */
    .radiosol-now-playing-heading {
        font-size: 28px;
    }

    .radiosol-now-playing-show-name {
        font-size: 20px;
    }

    .radiosol-now-playing-live-button {
        font-size: 16px;
        padding: 10px 20px;
    }

    .radiosol-now-playing-next-heading {
        font-size: 20px;
    }

    .radiosol-now-playing-next-name {
        font-size: 18px;
    }

    .radiosol-live-badge {
        margin-top: 10px;
    }
}

/* RTL Adjustments */
body.rtl .radiosol-schedule-container {
    direction: rtl;
}

body.rtl .radiosol-show-time {
    text-align: right;
}

body.rtl .radiosol-live-badge {
    right: 15px;
    left: auto;
}

/* Grid Layout for Multiple Days */
.radiosol-schedule-grid.multi-day {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.radiosol-schedule-grid.multi-day .radiosol-day-schedule {
    display: block;
}

/* Single Day View - Removed conflicting styles */

/* Time-based Layout (like reference photo) */
.radiosol-schedule-grid.time-based {
    display: grid;
    grid-template-columns: 120px repeat(7, 1fr);
    gap: 10px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.radiosol-schedule-grid.time-based .radiosol-time-slot {
    background: #fff;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    color: #666;
    border-radius: 6px;
}

.radiosol-schedule-grid.time-based .radiosol-day-column {
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    min-height: 200px;
}

.radiosol-schedule-grid.time-based .radiosol-day-header {
    font-family: "Katalogue", Sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6644;
}

.radiosol-schedule-grid.time-based .radiosol-show-card {
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 8px;
}

.radiosol-schedule-grid.time-based .radiosol-show-image {
    width: 60px;
    height: 60px;
}

.radiosol-schedule-grid.time-based .radiosol-show-title {
    font-size: 16px;
    margin-bottom: 5px;
}

.radiosol-schedule-grid.time-based .radiosol-show-subtitle {
    font-size: 13px;
    margin-bottom: 5px;
}

.radiosol-schedule-grid.time-based .radiosol-show-hosts {
    font-size: 12px;
}