/* 
 * Estilos CSS para SORTEOS WOO
 * Author: Yorgen Galvis
 */

/* ========================================
   Variables CSS
   ======================================== */
:root {
    --sorteos-primary: #4CAF50;
    --sorteos-secondary: #667eea;
    --sorteos-accent: #764ba2;
    --sorteos-gold: #FFD700;
    --sorteos-purple: #9C27B0;
    --sorteos-dark: #333;
    --sorteos-light: #f9f9f9;
    --sorteos-border-radius: 8px;
    --sorteos-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --sorteos-transition: all 0.3s ease;
}

/* ========================================
   Componentes Generales
   ======================================== */
.sorteos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.input-radio {
    margin: 15px !important;
}

.sorteos-card {
    background: white;
    border-radius: var(--sorteos-border-radius);
    box-shadow: var(--sorteos-box-shadow);
    padding: 25px;
    margin-bottom: 20px;
    transition: var(--sorteos-transition);
}

.sorteos-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Tickets Display
   ======================================== */
.sorteos-tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.sorteos-ticket {
    background: linear-gradient(135deg, var(--sorteos-secondary) 0%, var(--sorteos-accent) 100%);
    color: white;
    padding: 20px;
    border-radius: var(--sorteos-border-radius);
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: var(--sorteos-box-shadow);
    transition: var(--sorteos-transition);
    position: relative;
    overflow: hidden;
}

.sorteos-ticket::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: rotate(45deg);
}

.sorteos-ticket:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.sorteos-ticket-number {
    position: relative;
    z-index: 1;
}

/* ========================================
   Raffle Information Cards
   ======================================== */
.sorteos-raffle-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.sorteos-info-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--sorteos-box-shadow);
    transition: var(--sorteos-transition);
}

.sorteos-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.sorteos-info-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.sorteos-info-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.sorteos-info-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--sorteos-dark);
}

/* ========================================
   Buttons
   ======================================== */
.sorteos-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--sorteos-primary);
    color: white;
    border: none;
    border-radius: var(--sorteos-border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--sorteos-transition);
    text-decoration: none;
    text-align: center;
}

.sorteos-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sorteos-btn-secondary {
    background: var(--sorteos-secondary);
}

.sorteos-btn-secondary:hover {
    background: #5568d3;
}

.sorteos-btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

/* ========================================
   Progress Bars
   ======================================== */
.sorteos-progress-wrapper {
    margin: 25px 0;
}

.sorteos-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sorteos-progress-label {
    font-weight: 600;
    color: var(--sorteos-dark);
}

.sorteos-progress-percentage {
    font-weight: bold;
    color: var(--sorteos-primary);
    font-size: 18px;
}

.sorteos-progress-bar-container {
    background: #e0e0e0;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.sorteos-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sorteos-primary) 0%, #66BB6A 100%);
    transition: width 1s ease-in-out;
    position: relative;
    overflow: hidden;
}

.sorteos-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ========================================
   Forms
   ======================================== */
.sorteos-form-group {
    margin-bottom: 20px;
}

.sorteos-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--sorteos-dark);
}

.sorteos-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: var(--sorteos-border-radius);
    font-size: 16px;
    transition: var(--sorteos-transition);
}

.sorteos-input:focus {
    outline: none;
    border-color: var(--sorteos-primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.sorteos-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ========================================
   Badges & Tags
   ======================================== */
.sorteos-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sorteos-badge-success {
    background: #E8F5E9;
    color: #2E7D32;
}

.sorteos-badge-warning {
    background: #FFF3E0;
    color: #E65100;
}

.sorteos-badge-info {
    background: #E3F2FD;
    color: #1565C0;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sorteos-fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.sorteos-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .sorteos-tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }

    .sorteos-ticket {
        padding: 15px;
        font-size: 20px;
    }

    .sorteos-raffle-info {
        grid-template-columns: 1fr;
    }

    .sorteos-info-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .sorteos-tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }

    .sorteos-ticket {
        padding: 10px;
        font-size: 18px;
    }

    .sorteos-btn {
        width: 100%;
        padding: 15px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .sorteos-ticket {
        background: white !important;
        color: black !important;
        border: 2px solid #333;
        page-break-inside: avoid;
    }

    .sorteos-no-print {
        display: none !important;
    }
}

/* ========================================
   Loading States
   ======================================== */
.sorteos-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.sorteos-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--sorteos-primary);
    animation: spin 1s ease-in-out infinite;
    margin-right: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.sorteos-text-center {
    text-align: center;
}

.sorteos-text-right {
    text-align: right;
}

.sorteos-text-left {
    text-align: left;
}

.sorteos-mt-1 {
    margin-top: 10px;
}

.sorteos-mt-2 {
    margin-top: 20px;
}

.sorteos-mt-3 {
    margin-top: 30px;
}

.sorteos-mb-1 {
    margin-bottom: 10px;
}

.sorteos-mb-2 {
    margin-bottom: 20px;
}

.sorteos-mb-3 {
    margin-bottom: 30px;
}

.sorteos-p-1 {
    padding: 10px;
}

.sorteos-p-2 {
    padding: 20px;
}

.sorteos-p-3 {
    padding: 30px;
}

/* ========================================
   WooCommerce My Account Styling - MODERN REDESIGN
   ======================================== */
.woocommerce-account .woocommerce {
    display: flex;
    flex-direction: row;
    gap: 30px;
    margin: 40px 0;
    align-items: flex-start;
    background: transparent;
}

.woocommerce-MyAccount-navigation {
    flex: 0 0 260px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 20px 0;
    border: 1px solid rgba(0,0,0,0.03);
    position: sticky;
    top: 20px;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-MyAccount-navigation-link {
    margin: 4px 15px;
}

.woocommerce-MyAccount-navigation-link a {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 14px 20px !important;
    color: #4a5568 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Iconos Modernos con Colores */
.woocommerce-MyAccount-navigation-link a::before {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.woocommerce-MyAccount-navigation-link--dashboard a::before { content: '📊'; }
.woocommerce-MyAccount-navigation-link--orders a::before { content: '📦'; }
.woocommerce-MyAccount-navigation-link--mis-numeros a::before { content: '🎫'; }
.woocommerce-MyAccount-navigation-link--downloads a::before { content: '💾'; }
.woocommerce-MyAccount-navigation-link--edit-address a::before { content: '🏠'; }
.woocommerce-MyAccount-navigation-link--payment-methods a::before { content: '💳'; }
.woocommerce-MyAccount-navigation-link--edit-account a::before { content: '👤'; }
.woocommerce-MyAccount-navigation-link--customer-logout a::before { content: '🚪'; }

.woocommerce-MyAccount-navigation-link:not(.is-active) a:hover {
    background: #f7fafc !important;
    color: #2d3748 !important;
    transform: translateX(5px);
}

.woocommerce-MyAccount-navigation-link.is-active a {
    background: #000000 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.woocommerce-MyAccount-content {
    flex: 1;
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.02);
}

/* Contenido Principal */
.woocommerce-MyAccount-content h2, 
.woocommerce-MyAccount-content h3 {
    font-size: 26px;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
    position: relative;
}

.woocommerce-MyAccount-content p {
    color: #718096;
    line-height: 1.7;
    font-size: 15px;
}

/* Tablas Modernas */
.woocommerce-MyAccount-content .shop_table {
    border: none !important;
    border-radius: 0 !important;
    margin-top: 30px;
}

.woocommerce-MyAccount-content .shop_table thead th {
    background: #f8fafc !important;
    color: #4a5568 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 18px 20px !important;
    border: none !important;
}

.woocommerce-MyAccount-content .shop_table tbody td {
    padding: 20px !important;
    border-top: 1px solid #edf2f7 !important;
    color: #2d3748 !important;
    font-size: 14px !important;
}

/* Botones Premium */
.woocommerce-MyAccount-content .button {
    background: #edf2f7 !important;
    color: #2d3748 !important;
    padding: 10px 20px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border: none !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
}

.woocommerce-MyAccount-content .button:hover {
    background: #000 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Dashboard Cards Internas */
.sorteos-dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 25px !important;
}

.dashboard-card {
    background: #ffffff !important;
    border: 2px solid #f1f5f9 !important;
    padding: 30px 20px !important;
    border-radius: 20px !important;
}

.dashboard-card.highlight {
    background: #000000 !important;
    border-color: #000000 !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .woocommerce-account .woocommerce {
        flex-direction: column;
    }
    .woocommerce-MyAccount-navigation {
        flex: none;
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }
    .woocommerce-MyAccount-navigation ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    .woocommerce-MyAccount-navigation-link {
        margin: 5px;
        flex: 1 1 150px;
    }
}
