/* ============================================================
   voting/css/voting.css
   Estilos para el sistema de votación (staff QR + formulario público)
   ============================================================ */

/* ---- Vista staff ---- */
.staff-qr-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    min-height: 60vh;
}

.staff-qr-header {
    text-align: center;
    margin-bottom: 2rem;
}

.staff-qr-subtitle {
    color: #888;
    font-size: 0.95rem;
    line-height: 1.6;
}

#qr-container {
    display: flex;
    justify-content: center;
    min-height: 360px;
}

.qr-loading {
    color: #aaa;
    font-size: 1rem;
    align-self: center;
}

.qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.qr-image {
    border: 4px solid #222;
    border-radius: 8px;
    display: block;
}

.qr-timer {
    font-size: 0.9rem;
    color: #666;
}

.qr-url-hint {
    word-break: break-all;
    color: #aaa;
    max-width: 320px;
    text-align: center;
}

/* ---- Vista votación pública ---- */

/* Hero — espejo de .title-section en passport */
.title-section {
    display: flex;
    justify-content: center;
    background-image: var(--gradient-primary);
    color: var(--light-text);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4vw), 0% 100%);
    position: relative;
    z-index: 1;
}

.vote-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
}

.vote-raffle-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--light-text);
    border-radius: 999px;
    padding: 0.4rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.vote-hero h1 {
    font-size: 3.5rem;
    margin: 0;
}

.vote-hero-subtitle {
    font-size: 1rem;
    color: var(--light-text);
    opacity: 0.85;
    margin: 0;
    text-wrap: balance;
}

/* Content section */
.vote-content-section {
    min-height: 60vh;
}

/* Error */
.vote-error {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 94, 91, 0.08);
    border: 1px solid rgba(255, 94, 91, 0.3);
    border-left: 4px solid var(--accent-color);
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    color: var(--accent-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Not eligible */
.vote-not-eligible {
    text-align: center;
    padding: 2.5rem 1.75rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    border-left: 4px solid var(--highlight-color);
}

.vote-not-eligible-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
    animation: bounce-icon 1.5s ease-in-out infinite alternate;
    text-align: center;
    color: var(--highlight-color);
}

.vote-not-eligible-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.vote-not-eligible p {
    color: var(--muted-text);
    line-height: 1.6;
    margin-bottom: 0.25rem;
}

.vote-not-eligible strong {
    color: var(--primary-color);
}

/* Form hint */
.vote-form-hint {
    font-size: 0.88rem;
    color: var(--muted-text);
    margin: 0 0 1.25rem;
    text-align: center;
}

/* Options list */
.vote-options {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
}

/* Espejo de .stamp-item en passport */
.vote-option {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    border-left: 4px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.vote-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(108, 74, 226, 0.2);
}

.vote-option:has(input:checked) {
    border-left-color: var(--secondary-color);
    background: linear-gradient(90deg, rgba(0, 225, 217, 0.08) 0%, white 60%);
    box-shadow: 0 6px 18px rgba(0, 225, 217, 0.15);
    transform: translateY(-3px);
}

.vote-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vote-option-photo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #f0f0f0;
    transition: border-color 0.2s ease;
}

.vote-option:has(input:checked) .vote-option-photo {
    border-color: var(--secondary-color);
}

.vote-option-photo-placeholder {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    border: 2px solid #f0f0f0;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.vote-option-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-text);
    flex: 1;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.vote-option:has(input:checked) .vote-option-name {
    color: var(--secondary-dark);
}

.vote-option-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--light-bg);
    color: var(--muted-text);
    text-decoration: none;
    flex-shrink: 0;
    font-size: 0.78rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.vote-option-link:hover {
    background: rgba(108, 74, 226, 0.12);
    color: var(--primary-color);
}

.vote-option-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--light-bg);
    border: 1.5px solid #ddd;
    color: transparent;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.vote-option:has(input:checked) .vote-option-check {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 225, 217, 0.4);
}

.vote-empty {
    text-align: center;
    color: var(--muted-text);
    padding: 2rem 0;
    font-size: 0.95rem;
}

/* Submit button — espejo de .btn-passport-download */
.vote-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem;
    background: var(--gradient-primary);
    color: var(--light-text);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(108, 74, 226, 0.4);
    transition: all 0.3s ease;
    width: 100%;
    letter-spacing: 0.3px;
}

.vote-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 74, 226, 0.55);
}

.vote-submit-btn:active {
    transform: translateY(0);
}

/* Bounce keyframe */
@keyframes bounce-icon {
    from { transform: translateY(0) scale(1); }
    to   { transform: translateY(-8px) scale(1.08); }
}

@media (max-width: 768px) {
    .vote-hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .vote-hero h1 {
        font-size: 1.75rem;
    }
}

/* ---- Páginas de estado (error / éxito) ---- */
.vote-error-page,
.vote-success-page {
    text-align: center;
    padding: 4rem 1.5rem;
    min-height: 100vh;
    background: linear-gradient(160deg, var(--dark-bg) 0%, var(--dark-bg-light) 100%);
    color: var(--light-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.vote-error-icon,
.vote-success-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    display: block;
}

/* ---- Contenedor de tarjetas de estado ---- */
.vote-status-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

/* ---- Vista "ya votaste" sin tarjetas ---- */
.vote-already-summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
}

/* Número de participación — protagonista */
.vote-already-raffle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    background: white;
    border: 5px solid var(--accent-color);
    box-shadow: 0 4px 20px rgba(255, 94, 91, 0.3);
}

.vote-already-raffle-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(20, 20, 31, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vote-already-raffle-number {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 900;
    color: var(--dark-text);
    line-height: 1;
    letter-spacing: -1px;
}

.vote-already-raffle .raffle-info-link {
    color: rgba(20, 20, 31, 0.65);
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.vote-already-raffle .raffle-info-link:hover {
    color: var(--dark-text);
}

/* Confirmación de voto registrado */
.vote-already-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--secondary-dark);
    font-weight: 600;
    font-size: 1rem;
    border-left: 4px solid var(--secondary-color);
    background: white;
    border-radius: 10px;
}

.vote-already-check i {
    font-size: 1.3rem;
    flex-shrink: 0;
    color: var(--secondary-dark);
}

/* Fila del estudio votado — espejo de .vote-option / .stamp-item */
.vote-already-entity {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.vote-already-entity:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(108, 74, 226, 0.2);
}

.vote-already-entity-photo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(108, 74, 226, 0.25);
}

.vote-already-entity-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    font-size: 1.4rem;
}

.vote-already-entity-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
}

.vote-already-entity-label {
    font-size: 0.8rem;
    color: var(--muted-text);
}

.vote-already-entity-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-text);
}