/* Video Voting Plugin — style.css */

/* ── Reset & Base ─────────────────────────────── */
.vv-wrapper * { box-sizing: border-box; }

.vv-wrapper {
    font-family: 'Segoe UI', system-ui, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

/* ── Header ───────────────────────────────────── */
.vv-header {
    text-align: center;
    margin-bottom: 40px;
}
.vv-section-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #111;
}
.vv-section-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 0;
}
.vv-voted-banner {
    display: inline-block;
    margin-top: 16px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ── No videos ────────────────────────────────── */
.vv-no-videos {
    text-align: center;
    color: #888;
    font-size: 1.1rem;
    padding: 60px 0;
}

/* ── Grid ─────────────────────────────────────── */
.vv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

/* ── Card ─────────────────────────────────────── */
.vv-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.09);
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}
.vv-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}
.vv-card--top {
    border-color: #FFD700;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.25);
}

/* Rank Badge */
.vv-rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* Video Embed */
.vv-video-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
}
.vv-video-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* Card Body */
.vv-card-body {
    padding: 16px 18px 18px;
}
.vv-video-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px;
    line-height: 1.4;
}
.vv-vote-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.vv-vote-count {
    font-size: 0.9rem;
    color: #555;
}
.vv-vote-count strong {
    color: #111;
    font-size: 1.1rem;
}

/* Vote Button */
.vv-vote-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}
.vv-vote-btn:hover {
    opacity: 0.88;
    transform: scale(1.03);
}
.vv-vote-btn:active { transform: scale(0.97); }
.vv-vote-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    opacity: 1;
}
.vv-voted-label {
    font-size: 0.82rem;
    color: #999;
    font-style: italic;
}

/* ── Modal Overlay ────────────────────────────── */
.vv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: vv-fade-in 0.2s ease;
}
@keyframes vv-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal Box */
.vv-modal {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: vv-slide-up 0.25s ease;
}
@keyframes vv-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.vv-modal-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.vv-modal-close:hover { color: #333; }

.vv-modal-icon { font-size: 2.5rem; margin-bottom: 12px; }

.vv-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 10px;
}
.vv-modal-desc {
    font-size: 0.92rem;
    color: #666;
    margin: 0 0 22px;
    line-height: 1.6;
}

/* Email Input */
.vv-form-group { margin-bottom: 14px; }
.vv-email-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    color: #111;
    outline: none;
    transition: border-color 0.2s;
}
.vv-email-input:focus { border-color: #667eea; }

/* Submit Button */
.vv-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-bottom: 12px;
}
.vv-submit-btn:hover { opacity: 0.9; }
.vv-submit-btn:active { transform: scale(0.98); }
.vv-submit-btn:disabled { background: #ccc; cursor: not-allowed; }

/* Modal Messages */
.vv-modal-message {
    font-size: 0.9rem;
    min-height: 20px;
    margin: 4px 0 0;
    font-weight: 600;
}
.vv-modal-message.success { color: #2e7d32; }
.vv-modal-message.error   { color: #c62828; }

.vv-privacy-note {
    font-size: 0.78rem;
    color: #bbb;
    margin: 8px 0 0;
}

/* ── Mobile ───────────────────────────────────── */
@media (max-width: 600px) {
    .vv-grid { grid-template-columns: 1fr; gap: 20px; }
    .vv-section-title { font-size: 1.5rem; }
    .vv-modal { padding: 30px 22px; }
}


/* ═══════════════════════════════════════════════
   PUBLIC DASHBOARD
═══════════════════════════════════════════════ */

.vv-dashboard {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 48px;
}

/* ── Stat cards ─────────────────────────────── */
.vvd-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.vvd-stat {
    background: #f7f7f5;
    border-radius: 12px;
    padding: 16px 18px;
}
.vvd-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.vvd-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #111;
    line-height: 1.1;
}
.vvd-stat-value--sm {
    font-size: 16px;
    padding-top: 5px;
    line-height: 1.3;
}
.vvd-stat-sub {
    font-size: 11px;
    color: #aaa;
    margin-top: 5px;
}

/* ── Podium ─────────────────────────────────── */
.vvd-podium-wrap {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #f0f0f0;
}
.vvd-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    height: 150px;
}
.vvd-pod {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    border-radius: 12px 12px 0 0;
    width: 110px;
    padding: 10px 8px 12px;
}
.vvd-pod--1 { background: #FAC775; }
.vvd-pod--2 { background: #D3D1C7; }
.vvd-pod--3 { background: #F0997B; }
.vvd-pod-medal { font-size: 18px; margin-bottom: 5px; }
.vvd-pod-name {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    max-width: 90px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.vvd-pod--1 .vvd-pod-name,
.vvd-pod--1 .vvd-pod-votes { color: #412402; }
.vvd-pod--2 .vvd-pod-name,
.vvd-pod--2 .vvd-pod-votes { color: #2C2C2A; }
.vvd-pod--3 .vvd-pod-name,
.vvd-pod--3 .vvd-pod-votes { color: #4A1B0C; }
.vvd-pod-votes {
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

/* ── Leaderboard table ──────────────────────── */
.vvd-lb-title {
    font-size: 11px;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.vvd-leaderboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.vvd-lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 10px 14px;
    transition: background 0.15s;
}
.vvd-lb-row:hover { background: #f4f4f2; }
.vvd-lb-rank {
    display: none; /* hidden — medal covers it for top 3 */
}
.vvd-lb-medal {
    font-size: 16px;
    width: 26px;
    text-align: center;
    flex-shrink: 0;
}
.vvd-lb-rank-num {
    font-size: 12px;
    color: #bbb;
    font-weight: 600;
}
.vvd-lb-info {
    flex: 1;
    min-width: 0;
}
.vvd-lb-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vvd-lb-bar-wrap {
    flex: 1;
    max-width: 180px;
}
.vvd-lb-bar-bg {
    background: #ebebeb;
    border-radius: 99px;
    height: 6px;
    overflow: hidden;
}
.vvd-lb-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.7s cubic-bezier(.4,0,.2,1);
}
.vvd-lb-votes {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    min-width: 56px;
    text-align: right;
    flex-shrink: 0;
}
.vvd-lb-pct {
    font-size: 11px;
    color: #aaa;
    font-weight: 600;
    min-width: 34px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Mobile ─────────────────────────────────── */
@media (max-width: 600px) {
    .vv-dashboard { padding: 18px 16px; }
    .vvd-podium { height: 120px; }
    .vvd-pod { width: 85px; }
    .vvd-lb-bar-wrap { display: none; }
    .vvd-lb-pct { display: none; }
}


/* ═══════════════════════════════════════════════
   SUBSCRIBE POPUP — Embedded Elementor Form
═══════════════════════════════════════════════ */

.vv-subscribe-modal {
    max-width: 520px;
}

.vv-elementor-form-wrap {
    margin: 16px 0 8px;
    text-align: left;
}

/* Strip Elementor's default padding/margin inside our modal */
.vv-elementor-form-wrap .elementor-section,
.vv-elementor-form-wrap .elementor-container,
.vv-elementor-form-wrap .elementor-row,
.vv-elementor-form-wrap .e-con,
.vv-elementor-form-wrap .e-con-inner {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: unset !important;
}

.vv-elementor-form-wrap .elementor-widget-wrap {
    padding: 0 !important;
}

/* Style form fields to match plugin */
.vv-elementor-form-wrap input[type="text"],
.vv-elementor-form-wrap input[type="email"],
.vv-elementor-form-wrap input[type="tel"] {
    width: 100% !important;
    padding: 13px 16px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    margin-bottom: 10px !important;
    box-sizing: border-box !important;
}

.vv-elementor-form-wrap input[type="text"]:focus,
.vv-elementor-form-wrap input[type="email"]:focus {
    border-color: #667eea !important;
    outline: none !important;
}

/* Style submit button to match plugin */
.vv-elementor-form-wrap button[type="submit"],
.vv-elementor-form-wrap input[type="submit"],
.vv-elementor-form-wrap .elementor-button {
    width: 100% !important;
    padding: 14px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: opacity 0.2s !important;
}

.vv-elementor-form-wrap button[type="submit"]:hover,
.vv-elementor-form-wrap .elementor-button:hover {
    opacity: 0.88 !important;
}

/* Success message */
.vv-elementor-form-wrap .elementor-message.elementor-message-success {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin-top: 10px !important;
    font-weight: 600 !important;
}

/* Subscribing spinner overlay on form after submit */
.vv-form-submitting {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

/* ── Elementor form inside subscribe popup ── */
.vv-elementor-form-wrap .elementor-form-fields-wrapper {
    margin: 0 !important;
}
.vv-elementor-form-wrap .elementor-field-group {
    padding: 0 !important;
    margin-bottom: 12px !important;
    width: 100% !important;
}

/* ── Rank medal badges ──────────────────────── */
.vvd-medal {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    line-height: 1.4;
}
.vvd-medal--1 { background: #FFD700; color: #5a3a00; }
.vvd-medal--2 { background: #C0C0C0; color: #2a2a2a; }
.vvd-medal--3 { background: #CD7F32; color: #fff; }

/* Pod medal inside podium — remove old emoji span */
.vvd-pod .vvd-medal {
    font-size: 10px;
    margin-bottom: 6px;
}

/* Leaderboard medal column */
.vvd-lb-medal .vvd-medal {
    font-size: 10px;
}

/* Tied podium — allow more than 3 pods gracefully */
.vvd-podium {
    flex-wrap: wrap;
    justify-content: center;
}
.vvd-pod {
    min-width: 80px;
    max-width: 120px;
    flex: 1;
}
