/* ============================================
   WP CONCURSOS PRO - FRONTEND STYLES
   ============================================ */

/* Contenedores principales */
.wcp-concursos-container,
.wcp-detalle-concurso {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.wcp-section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: #1a1a1a;
    font-weight: 700;
}

/* Grid de concursos */
.wcp-concursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Tarjeta de concurso */
.wcp-concurso-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e5e7eb;
}

.wcp-concurso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.wcp-concurso-card.wcp-concurso-disabled {
    opacity: 0.7;
    pointer-events: none;
}

.wcp-concurso-card.wcp-concurso-disabled:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.wcp-concurso-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wcp-concurso-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: white;
}

.wcp-concurso-body {
    padding: 20px;
}

.wcp-concurso-desc {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.wcp-concurso-info {
    margin-bottom: 15px;
}

.wcp-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.wcp-info-label {
    font-weight: 600;
    color: #555;
}

.wcp-info-value {
    color: #333;
    font-weight: 500;
}

/* Barra de progreso */
.wcp-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.wcp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
}

.wcp-progress-text {
    font-size: 0.85rem;
    color: #888;
}

.wcp-concurso-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

/* Botones */
.wcp-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.wcp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.wcp-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.wcp-btn-primary {
    width: 100%;
    text-align: center;
}

.wcp-btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.wcp-btn-seleccionar-aleatorio {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.wcp-btn-comprar {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* Badges */
.wcp-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.wcp-badge-activo {
    background: #10b981;
    color: white;
}

.wcp-badge-pausado {
    background: #f59e0b;
    color: white;
}

.wcp-badge-finalizado {
    background: #6b7280;
    color: white;
}

/* Detalle del concurso */
.wcp-concurso-header-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 15px;
}

.wcp-concurso-header-detail h1 {
    margin: 0;
    font-size: 2rem;
    color: #1a1a1a;
    display: inline-block;
    margin-right: 15px;
}

/* Tabs */
.wcp-tabs-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.wcp-tabs {
    display: flex;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    flex-wrap: wrap;
}

.wcp-tab {
    padding: 16px 24px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-family: inherit;
    border-bottom: 3px solid transparent;
}

.wcp-tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.wcp-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.wcp-tab-content {
    display: none;
    padding: 30px;
}

.wcp-tab-content.active {
    display: block;
}

/* Tablero de números - GRID */
.wcp-tablero-header {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.wcp-leyenda {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.wcp-leyenda-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.wcp-leyenda-item .dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
}

.wcp-leyenda-item.disponible .dot {
    background: #10b981;
}

.wcp-leyenda-item.ocupado .dot {
    background: #ef4444;
}

.wcp-leyenda-item.seleccionado .dot {
    background: #667eea;
}

.wcp-leyenda-item.mio .dot {
    background: #f59e0b;
}

.wcp-seleccion-actual {
    display: flex;
    gap: 20px;
    font-size: 1rem;
    font-weight: 600;
}

.wcp-seleccion-actual strong {
    color: #667eea;
    font-size: 1.2rem;
}

/* GRID DEL TABLERO - 10 COLUMNAS */
.wcp-tablero {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.wcp-numero {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    color: #374151;
}

/* Números DISPONIBLES - VERDE */
.wcp-numero.disponible {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.wcp-numero.disponible:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    background: #a7f3d0;
    z-index: 10;
    position: relative;
}

/* Números OCUPADOS - ROJO */
.wcp-numero.ocupado {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
    cursor: not-allowed;
    opacity: 0.7;
}

.wcp-numero.ocupado:hover {
    transform: none;
}

/* Números SELECCIONADOS - AZUL */
.wcp-numero.seleccionado {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
    z-index: 10;
    position: relative;
}

/* Números MÍOS - AMARILLO/NARANJA */
.wcp-numero.mio {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: #f59e0b;
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
}

.wcp-numero.mio:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* CIFRA ALEATORIA */
.wcp-numero .wcp-cifra-aleatoria {
    position: absolute;
    top: 2px;
    right: 2px;
    background: white !important;
    color: #1a1a1a !important;
    font-size: 1.4rem !important;
    padding: 8px 12px !important;
    border-radius: 4px;
    font-weight: 900 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3) !important;
    border: 2px solid #1a1a1a !important;
}

/* Números RESERVADOS - AMARILLO CLARO */
.wcp-numero.reservado {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #92400e;
    cursor: not-allowed;
    opacity: 0.7;
}

.wcp-numero.reservado:hover {
    transform: none;
}

/* Acciones */
.wcp-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Información del concurso */
.wcp-info-concurso h3 {
    margin-bottom: 15px;
    color: #1a1a1a;
    font-size: 1.5rem;
}

.wcp-descripcion {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    line-height: 1.8;
    border: 1px solid #e5e7eb;
}

.wcp-detalles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.wcp-detalles-item {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: 1px solid #e5e7eb;
}

.wcp-detalles-item strong {
    color: #667eea;
    font-size: 0.9rem;
}

.wcp-detalles-item span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Mis números */
.wcp-mis-numeros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.wcp-mi-numero {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.wcp-mi-numero .numero {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.wcp-mi-numero small {
    font-size: 0.75rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.95);
}

.wcp-mi-numero small[style*="color: #000"] {
    color: #1a1a1a !important;
    font-weight: bold !important;
    font-size: 1.1rem !important;
    display: block !important;
    margin-top: 4px !important;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    text-shadow: none;
}

/* Resultados de sorteos */
.wcp-resultados-aleatorios {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 0.8rem;
}

.wcp-resultados-aleatorios strong {
    color: #667eea;
}

.wcp-badge-bono {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

/* Resultados aleatorios */
.wcp-resultados-aleatorios {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    font-size: 0.85rem;
}

.wcp-resultados-aleatorios .numeros-aleatorios {
    display: inline-block;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    color: #1a1a1a;
    font-weight: bold;
    margin-left: 8px;
}

.wcp-resultados-aleatorios .aciertos {
    color: #fbbf24;
    font-weight: bold;
}

.wcp-badge-bono {
    background: #f59e0b;
    color: white;
    margin-left: 8px;
}

/* Saldo y recarga */
.wcp-saldo-container {
    max-width: 600px;
    margin: 0 auto;
}

.wcp-saldo-balance {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    margin-bottom: 30px;
}

.wcp-saldo-balance h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    color: white;
}

.wcp-balance-amount {
    font-size: 3rem;
    font-weight: bold;
}

.wcp-recarga-section {
    background: #f9fafb;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

.wcp-recarga-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.wcp-form-recarga .wcp-form-group {
    margin-bottom: 20px;
}

.wcp-form-recarga label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.wcp-form-recarga input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
    box-sizing: border-box;
}

.wcp-form-recarga input:focus {
    outline: none;
    border-color: #667eea;
}

.wcp-form-recarga small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 0.85rem;
}

/* Estilos para campos de configuración */
#bono_participacion {
    width: 300px;
}

#numero_nequi {
    width: 600px;
}

.wcp-instructions {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.wcp-instructions h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.wcp-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.wcp-instructions li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Login notice */
.wcp-login-notice {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.wcp-login-notice a {
    color: #667eea;
    font-weight: 600;
}

/* No concursos */
.wcp-no-concursos {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 16px;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

/* Formulario de registro */
.wcp-formulario-registro {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.wcp-formulario-registro h2 {
    margin-top: 0;
    text-align: center;
    color: #1d2327;
    margin-bottom: 25px;
}

.wcp-form-group {
    margin-bottom: 15px;
}

.wcp-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1d2327;
}

.wcp-form-group input.wcp-input,
.wcp-form-group select.wcp-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.wcp-form-group input.wcp-input:focus,
.wcp-form-group select.wcp-input:focus {
    border-color: #667eea;
    outline: none;
}

.wcp-form-group small {
    display: block;
    margin-top: 5px;
    color: #646970;
    font-size: 12px;
}

.wcp-terminos-container {
    margin: 20px 0;
}

.wcp-terminos-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.wcp-terminos-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
}

.wcp-terminos-text {
    font-size: 14px;
    line-height: 1.5;
}

.wcp-terminos-text a {
    color: #667eea;
    text-decoration: none;
}

.wcp-terminos-text a:hover {
    text-decoration: underline;
}

.wcp-submit-container {
    margin-top: 20px;
    text-align: center;
}

.wcp-login-link {
    text-align: center;
    margin-top: 20px;
    color: #646970;
}

.wcp-login-link a {
    color: #667eea;
    font-weight: 600;
}

.wcp-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.wcp-message-success {
    background: #d1fae5;
    color: #065f46;
}

.wcp-error-container {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    display: none;
}

.wcp-error-list {
    margin: 0;
    padding-left: 20px;
    color: #991b1b;
}

.wcp-error-list li {
    margin-bottom: 5px;
}

.wcp-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .wcp-tablero {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        padding: 10px;
    }
    
    .wcp-numero {
        font-size: 0.85rem;
    }
    
    .wcp-concursos-grid {
        grid-template-columns: 1fr;
    }
    
    .wcp-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .wcp-tab {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .wcp-actions {
        flex-direction: column;
    }
    
    .wcp-balance-amount {
        font-size: 2rem;
    }
    
    .wcp-concurso-header-detail {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wcp-formulario-registro {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .wcp-tablero {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Estilos para saldo de bonos */
.wcp-saldos-display {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.wcp-saldo-item {
    background: #f9fafb;
    padding: 15px 20px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    color: #1a1a1a;
}

/* Cuando está dentro de saldo-balance, cambiar estilos para mejor visibilidad */
.wcp-saldo-balance .wcp-saldo-item {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.wcp-saldo-balance .wcp-saldo-item strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.wcp-saldo-item.strong {
    font-weight: 600;
}

.wcp-saldo-bonos {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-color: #f59e0b;
}

.wcp-saldo-balance .wcp-saldo-bonos {
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.wcp-saldo-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: inherit;
}

.wcp-bono-amount {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 600px) {
    .wcp-saldos-display {
        flex-direction: column;
    }
}
