.omhvs-voting,
.omhvs-voting * {
    box-sizing: border-box;
}

.omhvs-voting {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Countdown ─────────────────────────────────────────── */

.omhvs-countdown {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 22px;
    padding: 28px 32px;
    margin-bottom: 28px;
    text-align: center;
}

.omhvs-countdown-label {
    color: #94a3b8;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 18px;
}

.omhvs-countdown-ended .omhvs-countdown-label {
    color: #fbbf24;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 0;
    animation: pulseGold 2s ease-in-out infinite;
}

.omhvs-countdown-units {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.omhvs-countdown-unit {
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    padding: 18px 22px;
    min-width: 90px;
    transition: transform .2s ease;
}

.omhvs-countdown-unit:hover {
    transform: translateY(-2px);
}

.omhvs-countdown-number {
    display: block;
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.omhvs-countdown-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.omhvs-countdown-separator {
    font-size: 36px;
    font-weight: 900;
    color: rgba(255, 255, 255, .3);
    line-height: 1;
    padding-bottom: 20px;
}

/* ── Message ───────────────────────────────────────────── */

.omhvs-message {
    display: none;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f3f6fb;
    border: 1px solid #dde6f2;
    color: #172033;
    font-weight: 700;
}

.omhvs-message.is-visible {
    display: block;
}

.omhvs-message.is-error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #991b1b;
}

/* ── Grid & Cards ──────────────────────────────────────── */

.omhvs-grid {
    display: grid;
    grid-template-columns: repeat(var(--omhvs-columns, 3), minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.omhvs-card {
    width: 100%;
    appearance: none;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
    overflow: hidden;
    padding: 0;
    text-align: left;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
    color: inherit;
    font: inherit;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.omhvs-card:hover,
.omhvs-card:focus-visible {
    transform: translateY(-3px);
    border-color: #0f172a;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .1);
    outline: none;
}

.omhvs-card:disabled {
    cursor: not-allowed;
    opacity: .72;
    transform: none;
    box-shadow: none;
}

.omhvs-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eef2f7;
    line-height: 0;
    flex: 0 0 auto;
}

.omhvs-image-wrap img {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
}

.omhvs-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: inherit;
    color: #475569;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1.2;
}

.omhvs-card-name {
    display: block;
    padding: 20px 22px 22px;
    font-size: clamp(16px, 1.7vw, 22px);
    line-height: 1.18;
    font-weight: 800;
    color: #111827;
}

/* ── Results ───────────────────────────────────────────── */

.omhvs-results {
    margin-top: 30px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
}

.omhvs-results h3 {
    margin: 0 0 18px;
    color: #111827;
    font-size: clamp(22px, 2.3vw, 30px);
    line-height: 1.15;
}

.omhvs-results-list {
    display: grid;
    gap: 16px;
}

.omhvs-result-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
    color: #111827;
}

.omhvs-result-name {
    font-weight: 800;
}

.omhvs-result-percent {
    font-weight: 900;
}

.omhvs-result-bar {
    height: 13px;
    border-radius: 999px;
    overflow: hidden;
    background: #e8eef6;
}

.omhvs-result-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #111827;
    transition: width .45s ease;
}

/* ── Winner Section ────────────────────────────────────── */

.omhvs-winner-section {
    position: relative;
    margin-top: 40px;
    padding: 56px 32px 48px;
    border-radius: 28px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4c1d95 70%, #2e1065 100%);
    overflow: hidden;
    animation: omhvsFadeInUp .6s ease-out;
}

.omhvs-confetti-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.omhvs-winner-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.omhvs-winner-badge {
    font-size: 72px;
    line-height: 1;
    margin-bottom: 12px;
    animation: omhvsBounceIn .8s ease-out;
    filter: drop-shadow(0 4px 24px rgba(251, 191, 36, .4));
}

.omhvs-winner-title {
    color: #fbbf24;
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 900;
    margin: 0 0 36px;
    text-shadow: 0 2px 20px rgba(251, 191, 36, .3);
    letter-spacing: -.01em;
}

.omhvs-winner-card {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, .07);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 2px solid rgba(251, 191, 36, .35);
    border-radius: 28px;
    padding: 40px 48px;
    max-width: 400px;
    margin: 0 auto;
    animation: omhvsScaleIn .6s ease-out .3s both;
}

.omhvs-winner-card.is-floating {
    animation: omhvsScaleIn .6s ease-out .3s both, omhvsFloat 3s ease-in-out 1.2s infinite;
}

.omhvs-winner-glow {
    position: absolute;
    inset: -4px;
    border-radius: 30px;
    background: linear-gradient(135deg, #f59e0b, #ef4444, #8b5cf6, #06b6d4, #f59e0b);
    background-size: 400% 400%;
    animation: omhvsShimmer 3s linear infinite;
    z-index: -1;
    filter: blur(10px);
    opacity: .55;
}

.omhvs-winner-image-wrap {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 24px;
    border: 4px solid #fbbf24;
    box-shadow: 0 0 50px rgba(251, 191, 36, .35), 0 0 100px rgba(251, 191, 36, .15);
    background: rgba(255, 255, 255, .05);
}

.omhvs-winner-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.omhvs-winner-info {
    text-align: center;
}

.omhvs-winner-name {
    display: block;
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -.01em;
}

.omhvs-winner-stats {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #fbbf24;
    letter-spacing: .01em;
}

/* ── Confirm Dialog ────────────────────────────────────── */

.omhvs-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .48);
}

.omhvs-confirm-dialog {
    width: min(420px, 100%);
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
    color: #111827;
    text-align: left;
}

.omhvs-confirm-dialog strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
    line-height: 1.15;
}

.omhvs-confirm-dialog p {
    margin: 0 0 20px;
    color: #475569;
    font-weight: 700;
    line-height: 1.45;
}

.omhvs-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.omhvs-confirm-actions button {
    appearance: none;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 900;
    font: inherit;
}

.omhvs-confirm-cancel {
    background: #fff;
    color: #111827;
}

.omhvs-confirm-accept {
    background: #111827;
    border-color: #111827 !important;
    color: #fff;
}

/* ── Empty state ───────────────────────────────────────── */

.omhvs-empty {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

/* ── Keyframes ─────────────────────────────────────────── */

@keyframes omhvsFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes omhvsScaleIn {
    from {
        opacity: 0;
        transform: scale(.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes omhvsBounceIn {
    0% {
        opacity: 0;
        transform: scale(.3);
    }
    50% {
        transform: scale(1.15);
    }
    70% {
        transform: scale(.92);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes omhvsFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes omhvsShimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulseGold {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(251, 191, 36, .2);
    }
    50% {
        opacity: .85;
        text-shadow: 0 0 20px rgba(251, 191, 36, .5);
    }
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 900px) {
    .omhvs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .omhvs-countdown-units {
        gap: 8px;
    }

    .omhvs-countdown-unit {
        padding: 14px 16px;
        min-width: 70px;
    }

    .omhvs-countdown-number {
        font-size: 32px;
    }

    .omhvs-countdown-separator {
        font-size: 28px;
    }
}

@media (max-width: 640px) {
    .omhvs-voting {
        padding-left: 12px;
        padding-right: 12px;
    }

    .omhvs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .omhvs-card {
        border-radius: 16px;
    }

    .omhvs-image-wrap {
        aspect-ratio: 1 / 1;
    }

    .omhvs-card-name {
        padding: 12px 12px 14px;
        font-size: 14px;
        line-height: 1.18;
    }

    .omhvs-results {
        padding: 16px;
        border-radius: 18px;
    }

    .omhvs-countdown {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .omhvs-countdown-units {
        gap: 6px;
    }

    .omhvs-countdown-unit {
        padding: 12px 10px;
        min-width: 60px;
        border-radius: 12px;
    }

    .omhvs-countdown-number {
        font-size: 26px;
    }

    .omhvs-countdown-text {
        font-size: 10px;
    }

    .omhvs-countdown-separator {
        font-size: 22px;
        padding-bottom: 16px;
    }

    .omhvs-winner-section {
        padding: 36px 20px 32px;
        border-radius: 22px;
    }

    .omhvs-winner-card {
        padding: 28px 24px;
        border-radius: 22px;
    }

    .omhvs-winner-image-wrap {
        width: 140px;
        height: 140px;
    }

    .omhvs-winner-badge {
        font-size: 56px;
    }
}

@media (max-width: 380px) {
    .omhvs-grid {
        gap: 10px;
    }

    .omhvs-card-name {
        padding: 10px 10px 12px;
        font-size: 13px;
    }

    .omhvs-countdown-unit {
        padding: 10px 8px;
        min-width: 52px;
    }

    .omhvs-countdown-number {
        font-size: 22px;
    }
}

/* Las imágenes deben verse enteras dentro de cada tarjeta. */
.omhvs-voting .omhvs-card .omhvs-image-wrap > img {
    object-fit: contain !important;
    object-position: center center !important;
}