/* RadioSol Chart Voting Styles */

@font-face {
    font-family: "Katalogue";
    font-style: normal;
    font-weight: bold;
    font-display: swap;
    src: url("https://radiosol.co.il/wp-content/uploads/podcast1/2025/11/katalogueboldwebfont.woff") format("woff");
    unicode-range: U+0590-05FF, U+FB1D-FB4F;
}

/* Container */
.radiosol-chart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px;
    direction: rtl;
    font-family: "Roboto", "Arial", sans-serif;
    color: #0A1047;
}

/* Header */
.radiosol-chart-header {
    text-align: center;
    margin-bottom: 30px;
}

.radiosol-chart-title {
    font-family: "Katalogue", "Roboto", sans-serif;
    font-size: 36px;
    color: #0A1047;
    margin: 0 0 12px;
    line-height: 1.3;
}

.radiosol-chart-description {
    font-family: 'Open Sans Hebrew', Sans-serif;
    font-size: 18px;
    color: #0f0b43;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Voting Closed */
.radiosol-chart-closed {
    text-align: center;
    padding: 60px 20px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(10, 16, 71, 0.08);
}

.radiosol-chart-closed p {
    font-size: 22px;
    font-family: "Katalogue", "Roboto", sans-serif;
    color: #0A1047;
}

/* Progress Bar */
.radiosol-chart-progress {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #FFFFFF;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(10, 16, 71, 0.1);
}

.radiosol-chart-progress-text {
    font-family: "Katalogue", "Roboto", sans-serif;
    font-size: 18px;
    color: #0A1047;
    margin-bottom: 10px;
    text-align: center;
}

.radiosol-chart-count {
    color: #FF6644;
    font-weight: bold;
    font-size: 22px;
}

.radiosol-chart-progress-bar {
    background: #EFEDEE;
    border-radius: 10px;
    height: 14px;
    overflow: hidden;
    border: 1px solid #ddd;
    transition: border-color 0.3s ease;
}

.radiosol-chart-progress-bar.complete {
    border-color: #FF6644;
}

.radiosol-chart-progress-fill {
    background: linear-gradient(90deg, #FF6644, #0A1047);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Songs Grid - hidden until JS shuffles */
.radiosol-chart-songs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.radiosol-chart-songs-grid.shuffled {
    opacity: 1;
}

/* Song Card */
.radiosol-chart-song-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    user-select: none;
}

.radiosol-chart-song-card:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.radiosol-chart-song-card.selected {
    border-color: #FF6644;
    background: rgba(255, 102, 68, 0.06);
    box-shadow: 0 2px 12px rgba(255, 102, 68, 0.2);
}

.radiosol-chart-song-card.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Custom Checkbox */
.radiosol-chart-song-checkbox {
    flex-shrink: 0;
}

.radiosol-chart-song-checkbox input[type="checkbox"] {
    display: none;
}

.radiosol-chart-song-checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 2px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.radiosol-chart-song-card.selected .radiosol-chart-song-checkbox label {
    background: #FF6644;
    border-color: #FF6644;
}

.radiosol-chart-song-checkbox .checkmark {
    display: none;
}

.radiosol-chart-song-card.selected .radiosol-chart-song-checkbox .checkmark {
    display: block;
    width: 8px;
    height: 14px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

/* Song Info */
.radiosol-chart-song-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radiosol-chart-song-name {
    font-family: "Katalogue", "Roboto", sans-serif;
    font-size: 17px;
    font-weight: bold;
    color: #0A1047;
    line-height: 1.3;
}

.radiosol-chart-song-artist {
    font-family: 'Open Sans Hebrew', Sans-serif;
    font-size: 14px;
    color: #0f0b43;
    line-height: 1.3;
}

/* YouTube Thumbnail */
.radiosol-chart-song-video {
    flex-shrink: 0;
}

.radiosol-chart-yt-thumb {
    width: 130px;
    height: 73px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #000;
}

.radiosol-chart-yt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.radiosol-chart-yt-thumb:hover img {
    opacity: 0.8;
}

.radiosol-chart-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 102, 68, 0.85);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.radiosol-chart-yt-thumb:hover .radiosol-chart-play-icon {
    background: rgba(255, 102, 68, 1);
}

.radiosol-chart-play-icon svg {
    margin-right: -2px;
    width: 18px;
    height: 18px;
}

.radiosol-chart-yt-thumb.playing {
    width: 130px;
    height: 73px;
}

.radiosol-chart-yt-thumb.playing iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Submit Section */
.radiosol-chart-submit-section {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(10, 16, 71, 0.08);
}

.radiosol-chart-submit-title {
    font-family: "Katalogue", "Roboto", sans-serif;
    font-size: 22px;
    color: #0A1047;
    margin: 0 0 20px;
}

.radiosol-chart-voter-info {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.radiosol-chart-field {
    flex: 1;
    min-width: 220px;
    max-width: 320px;
}

.radiosol-chart-field input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #EFEDEE;
    border-radius: 10px;
    font-size: 16px;
    font-family: "Roboto", "Arial", sans-serif;
    direction: rtl;
    text-align: right;
    color: #0A1047;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.radiosol-chart-field input:focus {
    outline: none;
    border-color: #FF6644;
}

.radiosol-chart-field input::placeholder {
    color: #aaa;
}

.radiosol-chart-submit-btn {
    background: #FF6644;
    color: #FFFFFF;
    border: none;
    padding: 16px 50px;
    border-radius: 10px;
    font-size: 20px;
    font-family: "Katalogue", "Roboto", sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.radiosol-chart-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.radiosol-chart-submit-btn:hover:not(:disabled) {
    background: #e5552e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 102, 68, 0.3);
}

/* Submit Spinner */
.radiosol-chart-submit-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
    padding-right: 50px;
}

.radiosol-chart-submit-btn .spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: radiosol-spin 0.7s linear infinite;
    position: absolute;
    right: 18px;
    top: 50%;
    margin-top: -11px;
}

.radiosol-chart-submit-btn.loading .spinner {
    display: block;
}

@keyframes radiosol-spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.radiosol-chart-message {
    text-align: center;
    padding: 20px 24px;
    border-radius: 12px;
    margin-top: 24px;
    font-size: 18px;
    font-family: "Katalogue", "Roboto", sans-serif;
}

.radiosol-chart-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #a5d6a7;
}

.radiosol-chart-message.error {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #ef9a9a;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .radiosol-chart-container {
        padding: 20px 12px 50px;
    }

    .radiosol-chart-title {
        font-size: 26px;
    }

    .radiosol-chart-description {
        font-size: 16px;
    }

    .radiosol-chart-songs-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .radiosol-chart-song-card {
        padding: 12px;
        gap: 10px;
    }

    .radiosol-chart-song-name {
        font-size: 15px;
    }

    .radiosol-chart-song-artist {
        font-size: 13px;
    }

    .radiosol-chart-yt-thumb,
    .radiosol-chart-yt-thumb.playing {
        width: 100px;
        height: 56px;
    }

    .radiosol-chart-play-icon {
        width: 30px;
        height: 30px;
    }

    .radiosol-chart-play-icon svg {
        width: 14px;
        height: 14px;
    }

    .radiosol-chart-progress {
        padding: 12px 16px;
    }

    .radiosol-chart-progress-text {
        font-size: 16px;
    }

    .radiosol-chart-submit-section {
        padding: 20px 16px;
    }

    .radiosol-chart-voter-info {
        flex-direction: column;
        align-items: center;
    }

    .radiosol-chart-field {
        max-width: none;
        width: 100%;
    }

    .radiosol-chart-submit-btn {
        width: 100%;
        font-size: 18px;
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .radiosol-chart-title {
        font-size: 22px;
    }

    .radiosol-chart-song-checkbox label {
        width: 24px;
        height: 24px;
    }

    .radiosol-chart-yt-thumb,
    .radiosol-chart-yt-thumb.playing {
        width: 80px;
        height: 45px;
    }
}
