/* Super Astro & Coljuegos Brand Styles */

/* ==========================================================================
   Venta Page Super Astro Optimizations  
   ========================================================================== */

/* Asegurar que los elementos de sorteo sean clickeables */
.sorteo-option,
.sorteo-option *:not(input),
.sorteo-option label {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Asegurar que el input checkbox funcione */
.sorteo-option input[type="checkbox"] {
    pointer-events: auto !important;
}

/* Mejoras específicas para logos en página de venta/apuestas */
.sorteo-option .super-astro-logo-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid rgba(59, 130, 246, 0.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    /* Forzar padding mínimo para maximizar espacio del logo */
    padding: 0.25rem !important;
    pointer-events: auto !important;
}

.sorteo-option:hover .super-astro-logo-container {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.sorteo-option .super-astro-logo-enhanced {
    filter: contrast(1.2) saturate(1.3) brightness(1.1);
    /* Forzar que el logo ocupe todo el espacio disponible */
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-width: unset !important;
    min-height: unset !important;
    object-fit: contain !important;
    object-position: center !important;
    transition: filter 0.3s ease;
    pointer-events: none; /* Las imágenes no deben interceptar clicks */
}

.sorteo-option:hover .super-astro-logo-enhanced {
    filter: contrast(1.3) saturate(1.4) brightness(1.15);
}

/* Estilos específicos para sorteo seleccionado */
.sorteo-option input:checked ~ div .super-astro-logo-container {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

/* Responsivo específico para página de venta */
@media (max-width: 768px) {
    .sorteo-option .super-astro-logo-container {
        min-width: 5rem; /* 80px en móvil */
        min-height: 5rem; /* 80px en móvil */
        padding: 0.25rem !important; /* Padding mínimo para maximizar logo */
    }
    
    .sorteo-option .super-astro-logo-enhanced {
        min-width: 4.5rem; /* 72px en móvil */
        min-height: 4.5rem; /* 72px en móvil */
        width: 100% !important;
        height: 100% !important;
    }
}

@media (min-width: 768px) {
    .sorteo-option .super-astro-logo-container {
        min-width: 6rem; /* 96px en tablet+ */
        min-height: 6rem; /* 96px en tablet+ */
        padding: 0.25rem !important; /* Padding mínimo para maximizar logo */
    }
    
    .sorteo-option .super-astro-logo-enhanced {
        min-width: 5.5rem; /* 88px en tablet+ */
        min-height: 5.5rem; /* 88px en tablet+ */
        width: 100% !important;
        height: 100% !important;
    }
}

@media (min-width: 1024px) {
    .sorteo-option .super-astro-logo-container {
        min-width: 7rem; /* 112px en desktop */
        min-height: 7rem; /* 112px en desktop */
        padding: 0.25rem !important; /* Padding mínimo para maximizar logo */
    }
    
    .sorteo-option .super-astro-logo-enhanced {
        min-width: 6.5rem; /* 104px en desktop */
        min-height: 6.5rem; /* 104px en desktop */
        width: 100% !important;
        height: 100% !important;
    }
}

/* ==========================================================================
   Dashboard Super Astro Optimizations
   ========================================================================== */

/* Mejoras específicas para la sección de juegos disponibles en dashboard */
.dashboard-astro-card .super-astro-logo-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-astro-card .super-astro-logo-enhanced {
    filter: contrast(1.15) saturate(1.2) brightness(1.05);
    max-width: none;
    max-height: none;
}

/* Responsivo específico para dashboard móvil */
@media (max-width: 768px) {
    .dashboard-astro-card .super-astro-logo-container {
        min-width: 4.5rem; /* 72px en móvil */
        min-height: 4.5rem; /* 72px en móvil */
        padding: 0.625rem;
    }
    
    .dashboard-astro-card .super-astro-logo-enhanced {
        min-width: 3.25rem; /* 52px en móvil */
        min-height: 3.25rem; /* 52px en móvil */
    }
}

/* ==========================================================================
   Super Astro Logo Optimization
   ========================================================================== */

/* Mejoras específicas para logos Super Astro */
.super-astro-logo-enhanced {
    min-width: 4rem; /* 64px */
    min-height: 4rem; /* 64px */
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    image-rendering: optimizeQuality;
    filter: contrast(1.1) saturate(1.1);
    transition: all 0.2s ease;
}

.super-astro-logo-enhanced:hover {
    filter: contrast(1.2) saturate(1.2) brightness(1.05);
    transform: scale(1.02);
}

/* Contenedores de logos con mejor proporción */
.super-astro-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 4rem;
    min-height: 4rem;
    padding: 0.5rem;
}

/* Estilos responsivos para logos */
@media (max-width: 640px) {
    .super-astro-logo-enhanced {
        min-width: 3rem; /* 48px en móvil */
        min-height: 3rem; /* 48px en móvil */
    }
    
    .super-astro-logo-container {
        min-width: 3.5rem; /* 56px en móvil */
        min-height: 3.5rem; /* 56px en móvil */
        padding: 0.5rem; /* más padding en móvil */
    }
    
    /* Ajustes específicos para dashboard móvil */
    .super-astro-logo-container img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
    }
}

@media (min-width: 1024px) {
    .super-astro-logo-enhanced {
        min-width: 5rem; /* 80px en desktop */
        min-height: 5rem; /* 80px en desktop */
    }
    
    .super-astro-logo-container {
        min-width: 5.5rem; /* 88px en desktop */
        min-height: 5.5rem; /* 88px en desktop */
        padding: 0.75rem;
    }
}

/* ==========================================================================
   Super Astro Brand Styles
   ========================================================================== */

/* Gradientes de marca Super Astro */
.super-astro-gradient-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #fbbf24 100%);
}

.super-astro-gradient-secondary {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 50%, #ef4444 100%);
}

.super-astro-gradient-cosmic {
    background: radial-gradient(ellipse at center, #1e3a8a 0%, #0f172a 100%);
}

/* Texto con gradiente Super Astro */
.super-astro-text-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Efectos de hover para elementos Super Astro */
.super-astro-hover-effect {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.super-astro-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.2), transparent);
    transition: left 0.5s;
}

.super-astro-hover-effect:hover::before {
    left: 100%;
}

/* Partículas flotantes */
.super-astro-particles {
    position: relative;
}

.super-astro-particles::after {
    content: '✨';
    position: absolute;
    top: 20%;
    right: 10%;
    font-size: 1rem;
    animation: float-particle 4s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-15px) rotate(180deg);
        opacity: 0.8;
    }
}

/* Efectos de brillo astral */
.super-astro-glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transition: box-shadow 0.3s ease;
}

.super-astro-glow:hover {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.5);
}

/* Cards con temática astral */
.super-astro-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border: 2px solid #fbbf24;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.super-astro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* ==========================================================================
   Coljuegos Brand Styles  
   ========================================================================== */

/* Colores oficiales Coljuegos */
:root {
    --coljuegos-primary: #003366;
    --coljuegos-secondary: #0066CC;
    --coljuegos-gray: #666666;
    --coljuegos-light: #f8fafc;
}

/* Badge base Coljuegos */
.coljuegos-badge-base {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--coljuegos-primary);
    color: white;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 2px solid var(--coljuegos-primary);
    transition: all 0.2s ease;
}

.coljuegos-badge-base:hover {
    box-shadow: 0 4px 8px rgba(0, 51, 102, 0.2);
    transform: translateY(-1px);
}

/* Variantes de tema para Coljuegos */
.coljuegos-theme-light {
    background-color: var(--coljuegos-primary);
    color: white;
    border-color: var(--coljuegos-primary);
}

.coljuegos-theme-dark {
    background-color: white;
    color: var(--coljuegos-primary);
    border-color: #e5e7eb;
}

.coljuegos-theme-transparent {
    background-color: rgba(0, 51, 102, 0.9);
    color: white;
    border-color: rgba(0, 102, 204, 0.7);
    backdrop-filter: blur(4px);
}

.coljuegos-theme-minimal {
    background-color: transparent;
    color: var(--coljuegos-primary);
    border-color: var(--coljuegos-primary);
}

/* ==========================================================================
   Animaciones Compartidas
   ========================================================================== */

/* Efecto de aparición suave */
.brand-fade-in {
    animation: brandFadeIn 0.6s ease-out;
}

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

/* Efecto de pulso suave */
.brand-pulse {
    animation: brandPulse 2s ease-in-out infinite;
}

@keyframes brandPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Hover lift effect */
.brand-hover-lift {
    transition: all 0.3s ease;
}

.brand-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

/* Mobile adjustments */
@media (max-width: 640px) {
    .super-astro-text-gradient {
        background: #1e3a8a;
        -webkit-text-fill-color: #1e3a8a;
        color: #1e3a8a;
    }
    
    .super-astro-particles::after {
        display: none;
    }
    
    .coljuegos-badge-base {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .super-astro-text-gradient {
        background: none !important;
        -webkit-text-fill-color: #1e3a8a !important;
        color: #1e3a8a !important;
    }
    
    .super-astro-glow {
        box-shadow: none;
        border: 2px solid #1e3a8a;
    }
    
    .coljuegos-badge-base {
        border-width: 2px;
        background-color: var(--coljuegos-primary) !important;
        color: white !important;
    }
}

/* Print styles */
@media print {
    .super-astro-glow,
    .super-astro-particles::after,
    .brand-pulse {
        animation: none;
        box-shadow: none;
    }
    
    .super-astro-text-gradient {
        background: none !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
    }
    
    .coljuegos-badge-base {
        background: var(--coljuegos-primary) !important;
        color: white !important;
        border: 1px solid var(--coljuegos-primary) !important;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Spacing para elementos de marca */
.brand-spacing-sm { margin: 0.5rem; }
.brand-spacing-md { margin: 1rem; }
.brand-spacing-lg { margin: 1.5rem; }

/* Z-index para layers de marca */
.brand-layer-base { z-index: 10; }
.brand-layer-elevated { z-index: 20; }
.brand-layer-overlay { z-index: 30; }

/* Shadows específicas */
.brand-shadow-sm { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.brand-shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.brand-shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }
.brand-shadow-astro { box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25); }
.brand-shadow-coljuegos { box-shadow: 0 4px 14px rgba(0, 51, 102, 0.25); }
