.voting-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    font-family: var(--ff-body);
    background-color: var(--light);
}

.vote-options-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color, #eee);
    border-radius: 8px;
    overflow: hidden;
}

/* ── Item de canción (partial votes/partials/song-option) ────────
   El contenedor .vote-item es la fila visual; el label solo cubre el
   texto para que los botones de play/compartir no marquen la canción. */
.voting-container .vote-item {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 10px 0 12px;
    min-height: 76px;
    background: #fff;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease;
}

.voting-container .vote-item:last-child {
    border-bottom: none;
}

.voting-container .vote-item:hover {
    background: #f9fafb;
}

.voting-container .vote-item:has(input:checked) {
    background: var(--highlight, #fbd0e6);
    box-shadow: inset 3px 0 0 #e91e8c;
}

.voting-container .vote-item.is-preselected {
    box-shadow: inset 0 0 0 3px #e91e8c;
}

.voting-container .vote-item:has(input:focus-visible) {
    outline: 2px solid #e91e8c;
    outline-offset: -2px;
}

.voting-container .vote-item input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.voting-container .vote-item-slot {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voting-container .vote-item-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.voting-container .vote-item-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: #9ca3af;
}

.voting-container .vote-item:has(input:checked) .vote-item-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: #9ca3af;
}

.voting-container .vote-item-btn:focus-visible {
    outline: 2px solid #e91e8c;
    outline-offset: 2px;
}

.voting-container .vote-item-share {
    position: relative;
}

.voting-container .vote-item-share.is-copied::after {
    content: "Link copiado";
    position: absolute;
    top: 50%;
    right: calc(100% + 6px);
    transform: translateY(-50%);
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--dark2);
    color: var(--light);
    font-size: var(--fs-label);
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
    z-index: 3;
}

.voting-container .vote-option {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 15px 8px 15px 32px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

/* app-shell.css pinta .vote-option como tarjeta blanca con !important;
   ahora el estilo visual vive en .vote-item y el label queda transparente. */
.voting-theme-light .vote-item .vote-option,
.voting-theme-light .vote-item .vote-option:hover {
    background: transparent !important;
    border: 0 !important;
    color: inherit !important;
}

.voting-container .vote-option::before {
    content: "";
    position: absolute;
    left: 8px;
    width: 20px;
    height: 20px;
    background-image: url('/images/defaults/web_icons/follow.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.voting-container .vote-item:has(input:checked) .vote-option::before {
    opacity: 1;
    filter: invert(1);
}

.voting-container .vote-option a {
    color: inherit;
    text-decoration: underline;
}

.voting-container .vote-option small {
    font-size: var(--fs-label);
    font-weight: 400;
}

.voting-container .vote-option > span {
    font-family: 'BarlowCondensed', var(--ff-body), sans-serif;
    font-weight: 600;
}

.voting-container .vote-option-artist {
    color: var(--top-text-muted, var(--text-muted));
}

.voting-container .vote-option-features {
    color: var(--top-text-muted, var(--text-secondary));
}

/* ── Secciones de votación ─────────────────────────────────────── */
.vote-section {
    margin-bottom: 32px;
}

.vote-section-hint {
    color: var(--text-secondary);
    font-size: var(--fs-label);
}

/* ── Aviso compacto de invitados ───────────────────────────────── */
.voting-container .vote-guest-notice {
    margin-bottom: 16px;
    padding: 10px 14px;
}

.vote-guest-notice-title {
    margin: 0 0 2px;
}

.vote-accent-link {
    color: #e91e8c;
    font-weight: 600;
}

/* ── Barra de voto (flujo normal en escritorio) ────────────────── */
.vote-bar {
    margin-top: 8px;
}

.vote-bar-email {
    margin-bottom: 16px;
}

.vote-bar-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.vote-bar-email input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--bg-dark);
    border-radius: 8px;
    font-size: 22px;
    box-sizing: border-box;
    background: #fff;
}

.vote-bar-email input[type="email"]::placeholder {
    color: var(--text-muted) !important;
    opacity: 1;
}

.vote-bar-error {
    color: red;
    margin-top: 4px;
}

.vote-bar-hint {
    color: var(--text-muted);
    font-size: var(--fs-label);
    margin-top: 6px;
}

.btn-votar {
    transition: background .2s ease-in-out;
    background: var(--dark);
    color: var(--light);
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-size: var(--fs-body);
    font-family: var(--ff-body);
    cursor: pointer;
}

.btn-votar:hover, .btn-votar-link:hover {
    background: var(--CTA) !important;
}

/* ── Previsualización (modal) ──────────────────────────────────── */
.vote-preview {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.vote-preview[hidden] {
    display: none;
}

.vote-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.vote-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(900px, 100%);
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.vote-preview-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.vote-preview-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.vote-preview-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

body.vote-preview-open,
body.vote-preview-open .main {
    overflow: hidden;
}

@media (max-width: 768px) {
    .voting-container .vote-option small {
        display: block;
    }

    /* Espacio al final del contenido para que la barra fija no tape el cierre de la página. */
    .main > .content:has(.vote-bar) {
        padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px));
    }

    /* Esto es un fix para celulares viejos como sansumg s8 esto me lo djio la AI*/
    body.has-vote-bar .main > .content {
    padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px));
}

    /* La barra se apoya justo encima del menú inferior del layout
       (80px de alto, z-index 10002). */
    .vote-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        z-index: 10001;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 8px 12px 10px;
        background: var(--light);
        border-top: 3px solid #e91e8c;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.14);
    }

    .vote-bar-email {
        display: contents;
    }

    .vote-bar-label {
        margin: 0;
        font-family: 'BarlowCondensed', sans-serif;
        font-size: 22px;
        font-weight: 600;
        line-height: 1.1;
    }

    .vote-bar-email input[type="email"] {
        width: 100%;
        min-height: 40px;
        margin: 0;
        padding: 6px 10px;
        font-family: 'BarlowCondensed', sans-serif;
        font-size: 22px;
        line-height: 1.15;
    }

    .vote-bar-error {
        margin: 0;
        font-size: var(--fs-label);
        line-height: 1.15;
    }

    .vote-bar-submit {
        width: 100%;
        padding: 8px 14px;
        background: #e91e8c;
        font-family: 'BarlowCondensed', sans-serif;
        font-size: calc(var(--fs-label) * 1.5);
        line-height: 1.15;
    }

    .vote-bar-submit:hover {
        background: var(--CTA) !important;
    }
}

@media (hover: none) {
    .voting-container .vote-item:hover {
        background: #fff;
    }
}

.voting-container .vote-item.is-selected {
    background: var(--highlight, #fbd0e6);
    box-shadow: inset 5px 0 0 #e91e8c;
    outline: 2px solid var(--dark2);
    outline-offset: -2px;
}

.voting-container .vote-item.is-selected .vote-option::before {
    opacity: 1;
    filter: invert(1);
}