/**
 * Estilos Públicos (Frontend) de la Polla Futbolera - Adaptados a 733.com.co
 */

.polla-frontend-container {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #222;
    margin: 20px 0;
    width: 100%;
}

.polla-main-title {
    font-size: 28px;
    font-weight: 800;
    color: #4f5c93; /* Slate Blue oficial */
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 8px;
}

.polla-main-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: #ffb900; /* Amarillo dorado de 733 */
    border-radius: 2px;
}

/* No matches styling */
.polla-no-matches-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(79, 92, 147, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

.polla-no-matches-card .ball-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

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

.polla-no-matches-card h3 {
    font-size: 20px;
    color: #4f5c93;
    margin-bottom: 10px;
}

.polla-no-matches-card p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.5;
}

/* Layout */
.polla-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .polla-layout {
        grid-template-columns: 1fr;
    }
}

.polla-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.polla-section-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #4f5c93;
    margin: 0;
}

.badge-active-count {
    font-size: 12px;
    background: rgba(79, 92, 147, 0.1);
    color: #4f5c93;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* Listado de Partidos */
.polla-matches-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.polla-match-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.polla-match-card:hover {
    border-color: #4f5c93;
    box-shadow: 0 10px 20px rgba(79, 92, 147, 0.06);
    transform: translateY(-2px);
}

.polla-match-card.active {
    border-color: #4f5c93;
    box-shadow: 0 0 0 1px #4f5c93, 0 10px 25px rgba(79, 92, 147, 0.08);
}

.polla-match-card.active::before {
    content: 'Elegido';
    position: absolute;
    top: -10px;
    right: 15px;
    background: #ffb900;
    color: #222;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.match-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.match-date {
    font-weight: 600;
}

.match-time {
    font-weight: 700;
    color: #4f5c93;
}

/* Grid de Equipos */
.match-teams-grid {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    align-items: center;
    text-align: center;
    margin-bottom: 18px;
}

.team-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.polla-logo.team-logo-front {
    width: 50px;
    height: 60px;
}

.polla-flag-img.team-logo-front {
    width: 50px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.team-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.vs-divider {
    font-size: 12px;
    font-weight: 800;
    color: #94a3b8;
    background: #f1f5f9;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto;
}

/* Inputs de Marcador (Contadores) */
.prediction-inputs-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.input-counter {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.btn-counter {
    border: 0;
    background: none;
    color: #4f5c93;
    font-size: 18px;
    font-weight: 700;
    width: 32px;
    height: 36px;
    cursor: pointer;
    transition: background 0.2s;
    outline: none;
}

.btn-counter:hover {
    background: #e2e8f0;
}

.score-input {
    border: 0;
    background: transparent;
    width: 35px;
    height: 36px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    padding: 0;
    pointer-events: none;
    -moz-appearance: textfield;
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-vs-dash {
    font-size: 20px;
    font-weight: 700;
    color: #cbd5e1;
}

.match-card-footer {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 12px;
}

.btn-select-match {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    cursor: pointer;
}

.btn-select-match:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

.polla-match-card.active .btn-select-match {
    background: #4f5c93 !important;
    border-color: #4f5c93 !important;
    color: #ffffff !important;
}

/* Columna de Formulario */
.polla-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(79, 92, 147, 0.04);
    position: sticky;
    top: 30px;
}

.polla-form-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: #4f5c93;
    margin-top: 0;
    margin-bottom: 8px;
}

.form-desc {
    color: #64748b;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 20px;
}

.selected-match-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #ffb900; /* Acento dorado */
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.selected-match-summary strong {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
}

.selected-match-summary .summary-text {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.selected-match-summary .summary-score {
    font-size: 16px;
    font-weight: 800;
    color: #4f5c93;
}

/* Inputs Formulario */
.form-group-front {
    margin-bottom: 16px;
}

.form-group-front label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #334155;
    margin-bottom: 6px;
}

.form-group-front input[type="text"],
.form-group-front input[type="tel"],
.form-group-front input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    background: #fff;
    color: #1e293b;
}

.form-group-front input:focus {
    border-color: #4f5c93;
    box-shadow: 0 0 0 3px rgba(79, 92, 147, 0.1);
}

.field-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    display: block;
}

/* Botón de Envío */
.polla-btn-primary {
    background: #ffb900 !important; /* Dorado */
    color: #222222 !important;
    border: 1px solid #ffb900 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(255, 185, 0, 0.2) !important;
    transition: all 0.2s;
    outline: none;
}

.polla-btn-primary:hover {
    background: #e2a500 !important;
    border-color: #e2a500 !important;
    box-shadow: 0 6px 14px rgba(255, 185, 0, 0.35) !important;
    transform: translateY(-1px);
}

.polla-btn-primary:active {
    transform: translateY(0);
}

.form-response-msg {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    display: none;
}

.form-response-msg.success {
    color: #8ebc0c;
    background: rgba(142, 188, 12, 0.1);
    padding: 10px;
    border-radius: 6px;
    display: block;
}

.form-response-msg.error {
    color: #ff574b;
    background: rgba(255, 87, 75, 0.1);
    padding: 10px;
    border-radius: 6px;
    display: block;
}

/* ==========================================
   TABLA DE POSICIONES (LEADERBOARD)
   ========================================== */
.polla-leaderboard-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(79, 92, 147, 0.04);
}

.card-header-front {
    display: flex;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-header-front .header-icon {
    font-size: 36px;
}

.card-header-front h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #4f5c93;
}

.card-header-front p {
    margin: 3px 0 0 0;
    color: #64748b;
    font-size: 13px;
}

.no-leaders {
    color: #64748b;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.table-responsive-front {
    width: 100%;
    overflow-x: auto;
}

.polla-table-front {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.polla-table-front th {
    background: #f8fafc;
    padding: 12px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.polla-table-front td {
    padding: 14px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.polla-table-front tbody tr:hover {
    background: #f8fafc;
}

/* Column sizes */
.col-rank { width: 10%; text-align: center; }
.col-name { width: 50%; }
.col-stats { width: 25%; text-align: center; }
.col-pts { width: 15%; text-align: right; }

.polla-table-front th.col-rank, 
.polla-table-front th.col-stats {
    text-align: center;
}

.polla-table-front th.col-pts {
    text-align: right;
}

/* Rank Medals */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-weight: 800;
    font-size: 13px;
    border-radius: 50%;
    color: #475569;
}

.rank-gold { background: rgba(255, 185, 0, 0.05); }
.rank-gold .rank-badge { background: none; }
.rank-gold .col-pts { color: #d97706; }

.rank-silver { background: rgba(148, 163, 184, 0.05); }
.rank-silver .rank-badge { background: none; }

.rank-bronze { background: rgba(180, 83, 9, 0.05); }
.rank-bronze .rank-badge { background: none; }

/* Player columns styling */
.player-name {
    display: block;
    font-weight: 700;
    color: #1e293b;
    font-size: 14px;
}

.player-phone {
    font-size: 11px;
    color: #94a3b8;
    font-family: monospace;
}

/* Stats Badges */
.badge-stat {
    display: inline-block;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    margin: 0 2px;
}

.badge-stat.exact {
    background-color: rgba(142, 188, 12, 0.15);
    color: #8ebc0c;
}

.badge-stat.partial {
    background-color: rgba(79, 92, 147, 0.15);
    color: #4f5c93;
}

.col-pts strong {
    font-size: 15px;
    color: #1e293b;
}

/* ==========================================
   TICKER DE ACTIVIDAD EN VIVO (MARQUEE)
   ========================================== */
.polla-ticker-wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    height: 52px !important;
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    box-shadow: 0 4px 12px rgba(79, 92, 147, 0.03) !important;
}

.polla-ticker-label {
    background: #ffb900 !important;
    color: #222222 !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 0 16px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    z-index: 5 !important;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.08) !important;
}

.polla-ticker-container {
    overflow: hidden !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    flex-grow: 1 !important;
    position: relative !important;
    height: 100% !important;
    align-items: center !important;
    width: 100% !important;
}

/* Efecto degradado a los lados para entrada/salida suave */
.polla-ticker-container::before,
.polla-ticker-container::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    width: 50px !important;
    height: 100% !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

.polla-ticker-container::before {
    left: 0 !important;
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) !important;
}

.polla-ticker-container::after {
    right: 0 !important;
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) !important;
}

.polla-ticker-empty {
    padding-left: 20px !important;
    font-style: italic !important;
    color: #64748b !important;
    font-size: 13px !important;
}

/* Forzar ancho sin límites para evitar bloqueos de temas WordPress */
.polla-ticker-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    max-width: none !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    will-change: transform !important;
}

.polla-ticker-track.speed-slow {
    animation: pollaMarquee 45s linear infinite !important;
}

.polla-ticker-track.speed-normal {
    animation: pollaMarquee 30s linear infinite !important;
}

.polla-ticker-track.speed-fast {
    animation: pollaMarquee 15s linear infinite !important;
}

.polla-ticker-track:hover {
    animation-play-state: paused !important;
}

.polla-ticker-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 40px !important;
    padding-right: 40px !important;
    white-space: nowrap !important;
    width: max-content !important;
    max-width: none !important;
    flex-shrink: 0 !important;
}

.polla-ticker-item {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    color: #475569 !important;
    white-space: nowrap !important; /* Evita saltos de línea dentro del item */
}

.ticker-dot {
    color: #ffb900 !important;
    font-weight: bold !important;
    font-size: 16px !important;
    animation: flash 1.5s infinite !important;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.ticker-user {
    color: #1e293b !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

.ticker-score {
    background: rgba(79, 92, 147, 0.08) !important;
    color: #4f5c93 !important;
    font-weight: 800 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 12px !important;
    border: 1px solid rgba(79, 92, 147, 0.05) !important;
    white-space: nowrap !important;
}

.ticker-match {
    color: #4f5c93 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

/* Animación fluida acelerada por hardware (3D transform) */
@keyframes pollaMarquee {
    0% {
        transform: translate3d(0, 0, 0) !important;
    }
    100% {
        transform: translate3d(-50%, 0, 0) !important;
    }
}
