/**
 * Estilos Frontend - Raffles Manager
 * Diseño responsive y adaptable a cualquier tema de WordPress
 */

/* ========================================
   ADAPTACIÓN AL TEMA (Theme Integration)
   ======================================== */

/* Asegurar que el contenido se adapte al container del tema */
.raffles-main-content {
    width: 100%;
    max-width: 100%;
}

.raffle-single-post {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Resetear estilos que puedan interferir */
.raffle-entry-header,
.raffle-entry-content {
    width: 100%;
    max-width: 100%;
}

.raffle-entry-content {
    padding: 20px 0;
}

.raffle-info-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

/* ========================================
   LAYOUT PRINCIPAL (Grid Responsive)
   ======================================== */

.raffle-main-layout {
    display: grid;
    grid-template-columns: minmax(280px, 400px) 1fr;
    gap: 30px;
    margin-bottom: 30px;
    width: 100%;
}

/* Columna Izquierda: Imagen Destacada */
.raffle-featured-image {
    position: relative;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.raffle-featured-image img.raffle-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.raffle-no-image {
    text-align: center;
    color: #999;
    padding: 40px;
}

.raffle-no-image .no-image-icon {
    font-size: 80px;
    display: block;
    margin-bottom: 15px;
    opacity: 0.3;
}

.raffle-no-image p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Columna Derecha: Información Principal */
.raffle-main-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.raffle-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

.raffle-prize {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #2271b1;
}

.raffle-prize strong {
    display: block;
    margin-bottom: 8px;
    color: #2271b1;
    font-size: 16px;
}

.raffle-prize p {
    margin: 0;
    color: #555;
    line-height: 1.6;
    font-size: 15px;
}

.raffle-price {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 6px;
    border: 2px dashed #ffc107;
}

.raffle-price strong {
    color: #856404;
    font-size: 16px;
}

.raffle-price .price {
    font-size: 32px;
    font-weight: 900;
    color: #2271b1;
}

.raffle-tickets {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 6px;
}

.raffle-tickets .tickets-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 16px;
}

.raffle-tickets .tickets-info strong {
    color: #2271b1;
}

.raffle-tickets .tickets-info span {
    font-weight: 600;
    color: #333;
}

.raffle-tickets .raffle-available-tickets {
    margin: 10px 0 0 0;
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
}

.raffle-date {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
}

.raffle-date strong {
    color: #333;
    font-size: 14px;
}

.raffle-date span {
    color: #666;
    font-size: 14px;
}

/* Sección de Detalles Adicionales */
.raffle-details {
    display: grid;
    gap: 20px;
}

/* Promociones */
.raffle-promotions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 12px;
    color: white;
}

.raffle-promotions h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: white;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.promotions-list {
    display: grid;
    gap: 12px;
}

.promotion-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promotion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.promo-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.promo-tickets {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.promo-tickets .tickets-count {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
}

.promo-tickets .tickets-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promo-opportunities {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #764ba2;
    font-weight: 600;
}

.promo-opportunities .opportunity-icon {
    font-size: 16px;
}

.promo-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.promo-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.promo-price .price-amount {
    font-size: 28px;
    font-weight: bold;
    color: #2271b1;
    line-height: 1;
}

.promo-price .price-currency {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.promo-discount {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.promo-per-ticket {
    font-size: 12px;
    color: #666;
}

.promotions-note {
    margin: 15px 0 0 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.15);
    padding: 10px;
    border-radius: 6px;
}

.promotions-note em {
    font-style: normal;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Pantallas grandes */
@media screen and (min-width: 1200px) {
    .raffle-main-layout {
        grid-template-columns: 420px 1fr;
    }
}

/* Tablets y pantallas medianas */
@media screen and (max-width: 1024px) {
    .raffle-main-layout {
        grid-template-columns: minmax(280px, 350px) 1fr;
        gap: 20px;
    }
}

/* Tablets pequeñas */
@media screen and (max-width: 900px) {
    .raffle-main-layout {
        grid-template-columns: 300px 1fr;
        gap: 15px;
    }
}

/* Móviles y tablets pequeñas */
@media screen and (max-width: 768px) {
    .raffle-single-post {
        padding: 0 12px;
    }

    .raffle-entry-content {
        padding: 15px 0;
    }

    .raffle-info-box {
        padding: 16px;
        margin-bottom: 20px;
    }

    /* Layout a una columna en móvil */
    .raffle-main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .raffle-featured-image {
        max-width: 100%;
        aspect-ratio: 16 / 9;
    }

    .raffle-header h3 {
        font-size: 20px;
    }

    .raffle-prize strong {
        font-size: 14px;
    }

    .raffle-prize p {
        font-size: 14px;
    }

    .raffle-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .raffle-price .price {
        font-size: 28px;
    }

    .raffle-tickets .tickets-info {
        font-size: 14px;
    }

    /* Responsive para promociones */
    .promotion-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .promo-right {
        align-items: flex-start;
        width: 100%;
    }

    .promo-price .price-amount {
        font-size: 24px;
    }

    .promo-tickets .tickets-count {
        font-size: 28px;
    }
}

/* Móviles pequeños */
@media screen and (max-width: 480px) {
    .raffle-single-post {
        padding: 0 10px;
    }

    .raffle-entry-content {
        padding: 10px 0;
    }

    .raffle-price .price {
        font-size: 24px;
    }

    .raffle-no-image .no-image-icon {
        font-size: 60px;
    }

    .promo-tickets .tickets-count {
        font-size: 24px;
    }

    .promo-price .price-amount {
        font-size: 20px;
    }
}

.raffle-tickets {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.tickets-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.progress-bar {
    background: #e0e0e0;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: linear-gradient(90deg, #2271b1 0%, #135e96 100%);
    height: 100%;
    transition: width 0.3s ease;
}

.raffle-available-tickets {
    text-align: center;
    margin: 10px 0 0 0;
    color: #666;
    font-weight: 500;
}

.raffle-date {
    padding: 10px;
    background: #fff9e6;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.raffle-purchase {
    text-align: center;
    margin-top: 20px;
}

.raffle-btn-purchase-ticket {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.raffle-btn-purchase-ticket:hover {
    background: #135e96;
}

.raffle-sold-out,
.raffle-closed {
    text-align: center;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 6px;
}

.raffle-sold-out .notice,
.raffle-closed .notice {
    margin: 0;
    font-weight: bold;
    color: #d63638;
}

/* Lista de Rifas */
.raffles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

.raffle-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.raffle-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.raffle-thumbnail {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 16 / 9;
    width: 100%;
}

.raffle-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.raffle-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.raffle-content {
    padding: 20px;
}

.raffle-title {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.raffle-title a {
    color: #333;
    text-decoration: none;
}

.raffle-title a:hover {
    color: #2271b1;
}

.raffle-excerpt {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.5;
}

.raffle-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-top: 1px solid #e0e0e0;
}

.raffle-meta .price {
    font-size: 20px;
    font-weight: bold;
    color: #2271b1;
}

.raffle-meta .tickets {
    color: #666;
    font-size: 14px;
}

.raffle-btn-view-raffle {
    display: block;
    text-align: center;
    background: #2271b1;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.raffle-btn-view-raffle:hover {
    background: #135e96;
    color: #fff;
}

/* Mis Boletos */
.my-tickets {
    margin: 20px 0;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tickets-table th,
.tickets-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.tickets-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.tickets-table tr:hover {
    background: #f8f9fa;
}

.status-completed {
    color: #28a745;
    font-weight: bold;
}

.status-pending {
    color: #ffc107;
    font-weight: bold;
}

.status-failed {
    color: #d63638;
    font-weight: bold;
}

/* Cuadrícula de Boletos */
.tickets-grid-container {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    margin: 20px 0;
    border: 2px solid #e0e0e0;
}

.tickets-grid-container h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
    text-align: center;
}

.tickets-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.legend-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.legend-box.raffle-available {
    background: #28a745;
}

.legend-box.raffle-sold {
    background: #dc3545;
}

.legend-box.raffle-reserved {
    background: #ffc107;
}

.legend-box.raffle-selected {
    background: #2271b1;
    border: 2px solid #135e96;
}

.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.raffle-ticket-number {
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    min-height: 44px; /* Tamaño mínimo touch-friendly según guías de iOS/Android */
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent; /* Eliminar highlight azul en iOS */
    user-select: none; /* Prevenir selección de texto */
    -webkit-user-select: none;
    -moz-user-select: none;
}

.raffle-ticket-number.raffle-available {
    background: #28a745;
    color: #fff;
}

.raffle-ticket-number.raffle-available:hover {
    background: #218838;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.raffle-ticket-number.raffle-sold {
    background: #dc3545;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.6;
}

.raffle-ticket-number.raffle-reserved {
    background: #ffc107;
    color: #333;
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
}

.raffle-ticket-number.raffle-reserved::before {
    content: '⏳';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
}

/* NUEVO: Boleto seleccionado por OTRO usuario (protegido 3 min) */
.raffle-ticket-number.raffle-selected {
    background: repeating-linear-gradient(
        45deg,
        #ffeb3b,
        #ffeb3b 10px,
        #fdd835 10px,
        #fdd835 20px
    );
    color: #333;
    cursor: not-allowed;
    opacity: 0.9;
    position: relative;
    animation: pulse-selected 2s ease-in-out infinite;
}

.raffle-ticket-number.raffle-selected::before {
    content: '👤';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
}

@keyframes pulse-selected {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.7; }
}

/* Boleto seleccionado por el usuario ACTUAL (clase agregada por JS) */
.raffle-ticket-number.my-selection {
    background: #2271b1;
    color: #fff;
    border-color: #135e96;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.4);
}

.raffle-ticket-number.my-selection:hover {
    background: #1a5a8a;
    border-color: #0f4066;
    transform: scale(1.08);
    box-shadow: 0 3px 12px rgba(34, 113, 177, 0.5);
}

/* ============================================
   ANIMACIONES DE TIEMPO REAL
   ============================================ */

/* Boleto recién seleccionado por el usuario actual */
@keyframes pop-in {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.raffle-ticket-number.just-selected {
    animation: pop-in 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Boleto recién tomado por otro usuario */
@keyframes flash-taken {
    0%, 100% {
        background: #ffeb3b;
    }
    50% {
        background: #ff9800;
        transform: scale(0.95);
    }
}

.raffle-ticket-number.just-taken {
    animation: flash-taken 0.6s ease;
}

/* Boleto liberado (expiró selección) */
@keyframes fade-freed {
    0% {
        opacity: 0.3;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.raffle-ticket-number.just-freed {
    animation: fade-freed 0.6s ease;
}

/* Boleto vendido (completado) */
@keyframes slide-sold {
    0% {
        background: #ffc107;
    }
    100% {
        background: #d32f2f;
    }
}

.raffle-ticket-number.just-sold {
    animation: slide-sold 0.8s ease;
}

.tickets-selection-info {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #2271b1;
}

.tickets-selection-info p {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.tickets-selection-info .raffle-selected-count {
    color: #2271b1;
    font-weight: bold;
    font-size: 20px;
}

.raffle-selected-tickets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
}

.raffle-selected-ticket-badge {
    background: #2271b1;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.raffle-btn-confirm-selection,
.raffle-btn-clear-selection {
    margin: 10px 5px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    min-height: 44px; /* Touch-friendly */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.raffle-btn-confirm-selection {
    background: #28a745;
    color: #fff;
}

.raffle-btn-confirm-selection:hover {
    background: #218838;
}

.raffle-btn-clear-selection {
    background: #6c757d;
    color: #fff;
}

.raffle-btn-clear-selection:hover {
    background: #5a6268;
}

.divider-or {
    text-align: center;
    position: relative;
    margin: 30px 0;
}

.divider-or::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
    z-index: 1;
}

.divider-or span {
    position: relative;
    z-index: 2;
    background: #fff;
    padding: 0 20px;
    color: #666;
    font-weight: bold;
    font-size: 18px;
}

/* Maquinita de la Suerte */
.lucky-machine-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.lucky-machine-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    margin-bottom: 20px;
}

.slot-machine-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    backdrop-filter: blur(10px);
}

.slot-machine-icon svg {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    animation: slotMachinePulse 2s ease-in-out infinite;
}

@keyframes slotMachinePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.lucky-machine-text {
    width: 100%;
    text-align: center;
}

.lucky-machine-container h4 {
    color: #fff;
    margin: 0 0 8px 0;
    font-size: 24px;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lucky-machine-container .description {
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.lucky-machine-controls {
    text-align: center;
    margin-bottom: 20px;
}

.lucky-machine-controls label {
    display: block;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 16px;
}

.lucky-quantity {
    padding: 10px 20px;
    font-size: 16px;
    border: 2px solid #fff;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    margin-right: 10px;
    cursor: pointer;
}

.raffle-btn-lucky-machine {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.raffle-btn-lucky-machine:hover {
    background: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.raffle-btn-lucky-machine:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.lucky-results {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.lucky-results h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    text-align: center;
}

.lucky-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.lucky-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.5s ease;
}

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

.lucky-timer {
    text-align: center;
    margin: 15px 0;
}

.timer-message {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.timer-active {
    color: #28a745;
    font-weight: bold;
}

.raffle-expired {
    color: #d63638;
    font-weight: bold;
}

/* Botones de acción de la maquinita */
.lucky-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.raffle-btn-proceed-purchase {
    display: block;
    width: 100%;
    background: #28a745;
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.raffle-btn-proceed-purchase:hover {
    background: #218838;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
    transform: translateY(-1px);
}

.raffle-btn-proceed-purchase:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.raffle-btn-regenerate-numbers {
    display: block;
    width: 100%;
    background: #fff;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.raffle-btn-regenerate-numbers:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.raffle-btn-regenerate-numbers:active {
    transform: translateY(0);
}

/* Responsive para botones de maquinita */
@media (min-width: 600px) {
    .lucky-actions {
        flex-direction: row;
        gap: 15px;
    }

    .raffle-btn-proceed-purchase,
    .raffle-btn-regenerate-numbers {
        flex: 1;
    }
}

/* Responsive General */
@media (max-width: 768px) {
    .raffles-list {
        grid-template-columns: 1fr;
    }

    .raffle-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tickets-table {
        font-size: 14px;
    }

    .tickets-table th,
    .tickets-table td {
        padding: 8px;
    }

    .lucky-machine-container {
        padding: 20px 16px;
        margin: 15px 0;
    }

    .lucky-number {
        padding: 12px 20px;
        font-size: 20px;
    }

    .lucky-quantity {
        width: 100%;
        padding: 12px 20px;
        font-size: 18px;
        margin: 0 0 12px 0;
    }

    .raffle-btn-lucky-machine {
        display: block;
        width: 100%;
        margin: 0;
        padding: 14px 30px;
        font-size: 17px;
    }

    .lucky-results {
        padding: 16px;
    }

    .lucky-results h5 {
        font-size: 17px;
    }

    .raffle-btn-proceed-purchase,
    .raffle-btn-regenerate-numbers {
        font-size: 16px;
        padding: 13px;
    }
}

/* Móviles medianos - Maquinita */
@media (max-width: 600px) {
    .lucky-machine-container {
        padding: 18px 14px;
    }

    .lucky-numbers {
        gap: 8px;
    }

    .lucky-number {
        padding: 10px 18px;
        font-size: 18px;
    }

    .lucky-timer {
        margin: 12px 0;
    }

    .timer-message {
        font-size: 15px;
    }
}

/* Móviles pequeños - Maquinita */
@media (max-width: 480px) {
    .lucky-machine-container {
        padding: 16px 12px;
        border-radius: 10px;
    }

    .lucky-machine-controls label {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .lucky-quantity {
        padding: 10px 16px;
        font-size: 16px;
    }

    .raffle-btn-lucky-machine {
        padding: 12px 24px;
        font-size: 15px;
    }

    .lucky-results {
        padding: 14px;
        margin-top: 15px;
    }

    .lucky-results h5 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .lucky-numbers {
        gap: 6px;
    }

    .lucky-number {
        padding: 8px 14px;
        font-size: 16px;
        border-radius: 6px;
    }

    .raffle-btn-proceed-purchase,
    .raffle-btn-regenerate-numbers {
        font-size: 15px;
        padding: 12px;
    }
}

/* Modal de Compra */
.purchase-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.raffle-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.raffle-modal-content {
    position: relative;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.raffle-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.raffle-modal-close:hover {
    color: #333;
}

.raffle-modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

.purchase-form .raffle-form-group {
    margin-bottom: 20px;
}

.purchase-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.purchase-form .required {
    color: #d63638;
}

.purchase-form .raffle-form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.purchase-form .raffle-form-control:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.purchase-form .raffle-form-text {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

.raffle-selected-tickets-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.raffle-selected-tickets-display h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.raffle-selected-tickets-display .tickets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.raffle-selected-tickets-display .ticket-badge {
    background: #2271b1;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.purchase-total {
    background: #fff9e6;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #ffc107;
}

.purchase-total .total-amount {
    font-size: 24px;
    font-weight: bold;
    color: #2271b1;
}

.payment-method {
    margin-bottom: 15px;
}

.payment-method input[type="radio"] {
    margin-right: 8px;
}

.payment-method label {
    display: inline;
    font-weight: normal;
    cursor: pointer;
}

.bank-transfer-info {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #2271b1;
}

.bank-transfer-info h4 {
    margin: 0 0 15px 0;
    color: #2271b1;
}

.bank-account-info {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bank-account-info p {
    margin: 8px 0;
    font-size: 14px;
}

.bank-instructions {
    margin-top: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    font-style: italic;
    font-size: 14px;
    color: #666;
}

.raffle-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.raffle-btn-submit-purchase {
    flex: 1;
    background: #28a745;
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.raffle-btn-submit-purchase:hover {
    background: #218838;
}

.raffle-btn-submit-purchase:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.raffle-btn-cancel-purchase {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.raffle-btn-cancel-purchase:hover {
    background: #5a6268;
}

/* Tablets grandes (landscape) */
@media (max-width: 1024px) {
    .tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
        gap: 7px;
    }

    .tickets-grid-container {
        padding: 20px;
    }

    .raffle-ticket-number {
        padding: 11px 7px;
        font-size: 13px;
    }
}

/* Tablets (portrait) */
@media (max-width: 900px) {
    .tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
        gap: 7px;
    }

    .tickets-legend {
        gap: 12px;
        padding: 12px;
    }

    .legend-item {
        font-size: 13px;
    }

    .tickets-selection-info {
        padding: 16px;
    }

    .raffle-btn-confirm-selection,
    .raffle-btn-clear-selection {
        padding: 10px 20px;
        font-size: 15px;
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    .tickets-grid-container {
        padding: 14px;
        margin: 15px 0;
    }

    .tickets-grid-container h4 {
        font-size: 17px;
        margin-bottom: 12px;
    }

    .tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
        gap: 5px;
    }

    .raffle-ticket-number {
        padding: 7px 3px !important;
        font-size: 9px !important;
        border-radius: 4px;
        min-height: 38px !important;
    }

    .tickets-legend {
        font-size: 12px;
        gap: 10px;
        padding: 10px;
    }

    .legend-box {
        width: 16px;
        height: 16px;
    }

    .legend-item {
        font-size: 12px;
    }

    /* Panel de selección */
    .tickets-selection-info {
        padding: 15px;
    }

    .tickets-selection-info p {
        font-size: 15px;
    }

    .tickets-selection-info .raffle-selected-count {
        font-size: 18px;
    }

    .raffle-selected-tickets-list {
        gap: 6px;
        margin: 12px 0;
    }

    .raffle-selected-ticket-badge {
        padding: 5px 10px;
        font-size: 13px;
    }

    .raffle-btn-confirm-selection,
    .raffle-btn-clear-selection {
        padding: 10px 18px;
        font-size: 14px;
        margin: 8px 4px;
    }

    /* Maquinita de la Suerte - Responsive */
    .lucky-machine-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .slot-machine-icon svg {
        width: 70px;
        height: 70px;
    }

    .lucky-machine-container h4 {
        text-align: center;
        font-size: 20px;
    }

    .lucky-machine-container .description {
        text-align: center;
        font-size: 13px;
    }

    .divider-or span {
        font-size: 16px;
    }

    .raffle-modal-content {
        margin: 20px;
        padding: 20px;
        max-height: 85vh;
    }

    .raffle-modal-content h3 {
        font-size: 20px;
    }

    .raffle-form-actions {
        flex-direction: column;
    }

    .purchase-total {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .purchase-total .total-amount {
        font-size: 22px;
    }
}

/* Móviles medianos */
@media (max-width: 600px) {
    .tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
        gap: 4px;
    }

    .raffle-ticket-number {
        padding: 6px 2px !important;
        font-size: 8px !important;
        min-height: 36px !important;
    }

    .tickets-grid-container {
        padding: 14px;
    }

    .tickets-legend {
        gap: 8px;
        flex-direction: row;
    }

    .raffle-btn-confirm-selection,
    .raffle-btn-clear-selection {
        width: 100%;
        margin: 5px 0;
        padding: 12px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .tickets-grid-container {
        padding: 10px;
        border-radius: 8px;
    }

    .tickets-grid-container h4 {
        font-size: 15px;
    }

    .tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
        gap: 3px;
    }

    .raffle-ticket-number {
        padding: 5px 2px !important;
        font-size: 8px !important;
        border-radius: 3px;
        min-height: 34px !important;
    }

    .raffle-ticket-number.raffle-reserved::before,
    .raffle-ticket-number.raffle-selected::before {
        font-size: 9px;
        top: 1px;
        right: 1px;
    }

    .tickets-legend {
        gap: 6px;
        padding: 8px;
        flex-wrap: wrap;
    }

    .legend-item {
        font-size: 11px;
        flex: 0 0 calc(50% - 3px);
    }

    .legend-box {
        width: 14px;
        height: 14px;
    }

    .tickets-selection-info {
        padding: 12px;
    }

    .tickets-selection-info p {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .raffle-selected-tickets-list {
        gap: 5px;
    }

    .raffle-selected-ticket-badge {
        padding: 4px 8px;
        font-size: 12px;
    }

    .divider-or {
        margin: 20px 0;
    }

    .divider-or span {
        font-size: 14px;
        padding: 0 15px;
    }

    .raffle-modal-content {
        margin: 10px;
        padding: 16px;
        border-radius: 10px;
    }

    .raffle-modal-content h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .raffle-modal-close {
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
        gap: 3px;
    }

    .raffle-ticket-number {
        padding: 4px 1px !important;
        font-size: 7px !important;
        min-height: 32px !important;
    }

    .tickets-grid-container {
        padding: 8px;
    }

    .tickets-grid-container h4 {
        font-size: 14px;
    }

    .legend-item {
        font-size: 10px;
    }

    .raffle-ticket-number.raffle-reserved::before,
    .raffle-ticket-number.raffle-selected::before {
        font-size: 6px;
        top: 0px;
        right: 0px;
    }
}

/* ============================================
   OPORTUNIDADES DOBLES
   ============================================ */

.double-chance-info {
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo sutil en el fondo */
.double-chance-info::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%);
    pointer-events: none;
}

.double-chance-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.double-chance-icon {
    font-size: 32px;
    animation: rotate-dice 3s ease-in-out infinite;
}

@keyframes rotate-dice {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.double-chance-header h4 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.double-chance-description {
    margin: 0 0 20px 0;
    line-height: 1.6;
    opacity: 0.95;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

/* Contenedor del ejemplo */
.complementary-example {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    position: relative;
    z-index: 1;
}

.example-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 15px;
    opacity: 0.9;
}

/* Grid de boletos de ejemplo */
.example-tickets {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.example-ticket {
    background: #fff;
    color: #333;
    border-radius: 10px;
    padding: 15px 20px;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.example-ticket:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.primary-ticket {
    border: 3px solid #ffd700;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 8px rgba(255, 215, 0, 0); }
}

.bonus-ticket {
    border: 3px solid #4ade80;
    background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
}

.example-ticket .ticket-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 8px;
}

.example-ticket .raffle-ticket-number {
    font-size: 28px;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    color: #2271b1;
    letter-spacing: 2px;
}

.example-plus {
    font-size: 32px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: bounce-plus 1.5s ease-in-out infinite;
}

@keyframes bounce-plus {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.example-result {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.result-icon {
    font-size: 20px;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* Responsive */
@media (max-width: 768px) {
    .double-chance-info {
        padding: 20px 15px;
    }

    .double-chance-header h4 {
        font-size: 18px;
    }

    .example-tickets {
        flex-direction: column;
        gap: 10px;
    }

    .example-ticket {
        min-width: 120px;
        padding: 12px 15px;
    }

    .raffle-ticket-number {
        font-size: 24px;
    }

    .example-plus {
        font-size: 24px;
        transform: rotate(90deg);
    }

    .example-result {
        font-size: 14px;
    }
}

/* ============================================
   GALERÍA DE IMÁGENES
   ============================================ */

.raffle-gallery {
    margin: 30px 0 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.raffle-gallery h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Responsive Galería */
@media (max-width: 768px) {
    .raffle-gallery {
        padding: 15px;
        margin: 20px 0 15px 0;
    }

    .raffle-gallery h4 {
        font-size: 16px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item img {
        height: 120px;
    }
}

/* ========================================
   VERIFICADOR DE BOLETOS
   ======================================== */

.ticket-verifier-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 24px;
    margin-top: 30px;
}

.ticket-verifier-container h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 20px;
}

.ticket-verifier-container .description {
    color: #666;
    font-size: 14px;
    margin: 0 0 20px 0;
}

.ticket-verifier-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.verify-ticket-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 18px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    letter-spacing: 2px;
    transition: border-color 0.3s;
}

.verify-ticket-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.raffle-btn-verify-ticket {
    background: #2271b1;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.raffle-btn-verify-ticket:hover {
    background: #1a5a8a;
}

.raffle-btn-verify-ticket:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Resultado de verificación */
.ticket-verify-result {
    margin-top: 20px;
}

.verify-result-card {
    background: white;
    border: 3px solid;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.verify-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.verify-header .status-icon {
    font-size: 28px;
    font-weight: bold;
}

.verify-header h5 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.verify-body {
    padding: 20px;
}

.status-label {
    font-size: 18px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    display: inline-block;
}

.owner-info,
.date-info {
    margin: 10px 0;
    color: #555;
    font-size: 15px;
}

.owner-info strong,
.date-info strong {
    color: #333;
}

.complementary-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Estados específicos */
.verify-result-card.status-available {
    border-color: #28a745;
}

.verify-result-card.status-sold {
    border-color: #dc3545;
}

.verify-result-card.status-reserved {
    border-color: #ffc107;
}

.verify-result-card.status-error {
    border-color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-verifier-form {
        flex-direction: column;
    }

    .verify-ticket-input {
        font-size: 16px;
    }

    .raffle-btn-verify-ticket {
        width: 100%;
    }

    .verify-header h5 {
        font-size: 18px;
    }

    .status-label {
        font-size: 16px;
    }
}

/* ========================================
   ANUNCIO DE GANADOR
   ======================================== */

.raffle-winner-announcement {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 3px solid #f4c430;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 0 30px rgba(255, 215, 0, 0.4);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.raffle-winner-announcement::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.1) 10px,
        rgba(255, 255, 255, 0.1) 20px
    );
    animation: shine 3s linear infinite;
    pointer-events: none;
}

@keyframes shine {
    0% {
        transform: translateX(-50%) translateY(-50%) rotate(0deg);
    }
    100% {
        transform: translateX(-50%) translateY(-50%) rotate(360deg);
    }
}

.winner-header {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}

.winner-trophy {
    font-size: 60px;
    display: block;
    margin-bottom: 10px;
    animation: bounce 1s ease-in-out infinite;
}

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

.winner-header h3 {
    margin: 0;
    font-size: 32px;
    color: #8b4513;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 800;
}

.winner-ticket-display {
    position: relative;
    z-index: 1;
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.winner-label {
    font-size: 16px;
    color: #666;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.winner-ticket-number {
    font-size: 72px;
    font-weight: 900;
    color: #d4af37;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 8px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
}

.winner-complementary-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.winner-details {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.winner-name {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.winner-status {
    margin-top: 10px;
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.status-badge.status-paid {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

.winner-not-sold {
    color: #856404;
    font-size: 16px;
    margin: 0;
    font-style: italic;
}

.winner-congratulations {
    position: relative;
    z-index: 1;
    margin-top: 20px;
}

.winner-congratulations p {
    font-size: 20px;
    color: #8b4513;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Responsive para anuncio de ganador */
@media (max-width: 768px) {
    .raffle-winner-announcement {
        padding: 20px;
    }

    .winner-trophy {
        font-size: 48px;
    }

    .winner-header h3 {
        font-size: 24px;
    }

    .winner-ticket-number {
        font-size: 48px;
        letter-spacing: 4px;
    }

    .winner-name {
        font-size: 20px;
    }

    .winner-congratulations p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .winner-ticket-number {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .winner-header h3 {
        font-size: 20px;
    }

    .winner-name {
        font-size: 18px;
    }
}

/* ========================================
   GALERÍA ESTILO WOOCOMMERCE
   ======================================== */

.raffle-gallery-container {
    position: relative;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.raffle-main-image {
    position: relative;
    aspect-ratio: 1 / 1 !important;
    background: #f5f5f5;
    overflow: hidden;
    margin-bottom: 10px;
    height: auto !important;
}

.raffle-main-image img.raffle-main-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Miniaturas */
.raffle-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    padding: 0 4px 4px 4px;
}

.thumbnail-item {
    position: relative;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #fff;
    height: auto !important;
}

.thumbnail-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.thumbnail-item:hover {
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.thumbnail-item.raffle-active {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
}

/* Responsive para miniaturas */
@media (max-width: 768px) {
    .raffle-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .raffle-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 4px;
    }
}

/* ============================================
   Políticas y Lineamientos - Enlace y Modal
   ============================================ */

/* Enlace discreto de políticas */
.raffle-policies-link {
    text-align: center;
    padding: 8px 0;
}

.raffle-policies-link a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.raffle-policies-link a:hover {
    color: #2271b1;
    text-decoration: underline;
}

/* Modal de Políticas */
.raffle-policies-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Overlay oscuro */
.policies-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

/* Contenedor del modal */
.policies-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header del modal */
.policies-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.policies-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: white;
}

.policies-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.policies-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Body del modal (contenido scrolleable) */
.policies-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Secciones de políticas */
.policy-section {
    margin-bottom: 32px;
}

.policy-section:last-child {
    margin-bottom: 0;
}

.policy-section h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
}

.policy-content {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}

.policy-content p {
    margin: 0 0 14px 0;
}

.policy-content ul,
.policy-content ol {
    margin: 0 0 14px 20px;
    padding: 0;
}

.policy-content li {
    margin-bottom: 8px;
}

.policy-content strong {
    color: #333;
    font-weight: 600;
}

.policy-content a {
    color: #2271b1;
    text-decoration: underline;
}

.policy-content a:hover {
    color: #135e96;
}

/* Footer del modal */
.policies-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    background: #f9f9f9;
    border-radius: 0 0 12px 12px;
}

.policies-modal-accept {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.policies-modal-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.policies-modal-accept:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .raffle-policies-modal {
        padding: 0;
    }

    .policies-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .policies-modal-header {
        border-radius: 0;
        padding: 16px 20px;
    }

    .policies-modal-header h2 {
        font-size: 18px;
    }

    .policies-modal-body {
        padding: 20px;
    }

    .policy-section h3 {
        font-size: 18px;
    }

    .policy-content {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .policies-modal-header h2 {
        font-size: 16px;
    }

    .policies-modal-body {
        padding: 16px;
    }

    .policy-section {
        margin-bottom: 24px;
    }

    .policy-section h3 {
        font-size: 16px;
    }

    .policies-modal-accept {
        width: 100%;
        padding: 14px 24px;
    }
}
