/* Estilos específicos para la página de preview de rifas */
/* Basado en el diseño de Sketch/preview/rifa-purchase.css */

/* ========== TOOLTIPS Y VALIDACIONES ========== */
.tooltip-trigger {
    position: relative;
    cursor: help;
    margin-left: 0.5rem;
}

.tooltip-trigger i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.tooltip-trigger:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    border: 1px solid #ff5200;
    background: #000000;
    color: #ffffff;
}

.tooltip-trigger:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% - 0.25rem);
    left: 50%;
    transform: translateX(-50%);
    border: 0.5rem solid transparent;
    border-top-color: #000;
    z-index: 1001;
}

.field-hint {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* Estilos para validación de formulario */
.form-input.valid {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.05);
}

.form-input.invalid {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

.validation-message {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.validation-message.valid {
    color: var(--success-color);
}

.validation-message.invalid {
    color: var(--error-color);
}

/* ========== UPLOAD DE COMPROBANTE MEJORADO ========== */
.payment-proof-upload {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.payment-proof-upload:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 53, 0.02);
}

.upload-placeholder {
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
}

.upload-placeholder i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.upload-placeholder span {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

.upload-placeholder small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.upload-preview {
    padding: 1.5rem;
    border: none;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.preview-image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.preview-image-container img {
    max-width: 300px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: block;
}

.change-image-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-image-container:hover .change-image-btn {
    opacity: 1;
}

.change-image-btn:hover {
    background: var(--primary-dark);
}

.image-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========== ESTILOS BASE EXISTENTES ========== */

.preview-page {
    min-height: 100vh;
    background: var(--bg-primary);
    background-image: radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.05) 0%, transparent 50%),
                     radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    padding-top: 93px;
    padding-bottom: 2rem;
}

.preview-header {
    background: var(--bg-secondary);
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.preview-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Sección principal de información */
.raffle-main-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Carrusel de imágenes */
.raffle-carousel {
    position: relative;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.carousel-inner {
    height: 100%;
    width: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
}

.carousel-item.active {
    opacity: 1;
    z-index: 2;
}

.carousel-item img {
    max-width: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.placeholder-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 1rem;
    text-align: center;
}

.placeholder-image i {
    font-size: 4rem;
    opacity: 0.5;
}

.placeholder-image span {
    font-size: 1.1rem;
    font-weight: 500;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 1.2rem;
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

.carousel-control:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Información de la rifa */
.raffle-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.raffle-name {
    margin: 0 0 1rem;
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.raffle-prize {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.prize-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.prize-value {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.raffle-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    max-height: 550px;
    overflow: auto;
}

/* Contador de tickets */
.tickets-counter {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.counter-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.counter-value {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.progress-bar {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.6s ease;
    position: relative;
}

.progress-fill::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Estado de la rifa */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.draft {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

.status-badge.active {
    background: rgba(255, 107, 53, 0.2);
    color: var(--primary-color);
}

.status-badge.completed {
    background: rgba(0, 200, 81, 0.2);
    color: var(--success-color);
}

.status-badge.cancelled {
    background: rgba(255, 71, 87, 0.2);
    color: var(--danger-color);
}

/* Información de finalización */
.raffle-end-type {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.raffle-end-type h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.raffle-end-type p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.raffle-end-type i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Títulos de sección */
.section-title {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

/* Grid de tickets */
.tickets-grid-container {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.tickets-grid-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.8rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.ticket {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.ticket.available:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
    transform: scale(1.05);
    color: var(--primary-color);
}

.ticket.selected {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
    transform: scale(1.05);
}

.ticket.sold {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.ticket.sold:hover {
    transform: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .raffle-main-info {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .preview-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .preview-content {
        padding: 0 1rem;
        gap: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .raffle-name {
        font-size: 2rem;
    }
    
    .tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 0.5rem;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .preview-title {
        font-size: 1.5rem;
    }
    
    .raffle-name {
        font-size: 1.8rem;
    }
    
    .tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    }
    
    .ticket {
        font-size: 0.8rem;
    }
}

/* Hint para métodos de pago */
.payment-method-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.2rem;
}

/* Tickets seleccionados */
.selected-tickets-display {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
}

.selected-tickets-display h4 {
    color: var(--primary-color);
    margin: 0 0 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selected-tickets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.selected-ticket-badge {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.selected-tickets-count {
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.selected-tickets-count .count {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Estilos para botones de cantidad con promociones */
.ticket-quantity-btn.has-promo {
    background: linear-gradient(45deg, var(--success-color), #00cc70);
    border-color: var(--success-color);
    color: white;
    position: relative;
}

.ticket-quantity-btn.has-promo:hover {
    border-color: var(--success-color);
    background: linear-gradient(45deg, #00cc70, var(--success-color));
}

.promo-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--warning-color);
    color: var(--bg-primary);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Contador de tickets compacto */
.tickets-counter-compact {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
}

.counter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.counter-header .counter-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.counter-header .counter-value {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.remaining-tickets {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    color: var(--success-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.remaining-tickets i {
    font-size: 0.8rem;
}

/* Sección de Precios y Promociones Inteligentes */
.pricing-promotions-section {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.pricing-promotions-section h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-promotions-section h3 i {
    color: var(--primary-color);
}

/* Tarjeta de precio base */
.base-price-card {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
}

.price-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.3rem;
}

/* Tarjetas de promociones */
.promotions-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.promotion-card {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(0, 212, 255, 0.1));
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.promotion-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

.promotion-card.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(0, 212, 255, 0.2));
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.promotion-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(45deg, var(--success-color), #00cc70);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promotion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.promotion-quantity {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.promotion-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3rem;
}

.promotion-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.promotion-efficiency {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.promotion-savings {
    color: var(--success-color);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Cálculo dinámico */
.dynamic-calculation {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--primary-color);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.calculation-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.calculation-breakdown {
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

.breakdown-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

.breakdown-line:last-child {
    border-bottom: none;
}

.breakdown-description {
    color: var(--text-secondary);
    font-weight: 500;
}

.breakdown-amount {
    color: var(--text-primary);
    font-weight: 700;
}

.breakdown-promo {
    background: rgba(0, 212, 255, 0.1);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    margin: 0.2rem 0;
}

.calculation-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.total-label {
    color: var(--text-primary);
}

.total-amount {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.total-savings {
    color: var(--success-color);
    font-size: 1rem;
    margin-left: 0.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .promotions-cards {
        grid-template-columns: 1fr;
    }
    
    .promotion-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .calculation-total {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Nota preventiva de compra */
.purchase-warning {
    background: linear-gradient(135deg, rgba(255, 235, 59, 0.1), rgba(255, 193, 7, 0.1));
    border: 1px solid var(--warning-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 193, 7, 0); }
}

.warning-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--warning-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.warning-content {
    flex: 1;
}

.warning-content h4 {
    color: var(--warning-color);
    margin: 0 0 0.8rem;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-content p {
    color: var(--text-secondary);
    margin: 0 0 0.8rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.warning-content p:last-child {
    margin-bottom: 0;
}

.warning-tip {
    background: rgba(255, 193, 7, 0.1);
    padding: 0.8rem;
    border-radius: 8px;
    border-left: 3px solid var(--warning-color);
}

.warning-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive para warning */
@media (max-width: 768px) {
    .purchase-warning {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .warning-icon {
        align-self: center;
    }
    
    .warning-content h4 {
        justify-content: center;
    }
}

/* Modal de Resolución de Conflictos */
.conflict-resolution-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
}

.conflict-resolution-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 0;
}

.conflict-resolution-modal .modal-container {
    position: relative;
    background: var(--bg-card);
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--warning-color);
    animation: conflictModalSlide 0.3s ease;
}

@keyframes conflictModalSlide {
    from { opacity: 0; transform: translateY(-50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.conflict-resolution-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 235, 59, 0.1));
    border-bottom: 1px solid var(--warning-color);
    border-radius: 15px 15px 0 0;
}

.conflict-resolution-modal .modal-header h3 {
    color: var(--warning-color);
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.conflict-resolution-modal .modal-header i {
    color: var(--warning-color);
    font-size: 1.1rem;
}

.conflict-resolution-modal .modal-content {
    padding: 2rem;
}

.conflict-summary {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid var(--danger-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.conflict-summary h4 {
    color: var(--danger-color);
    margin: 0 0 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conflict-tickets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.conflict-ticket {
    background: var(--danger-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.resolution-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resolution-option {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.resolution-option:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 53, 0.05);
}

.resolution-option.selected {
    border-color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.2);
}

.resolution-option .option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.resolution-option .option-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resolution-option .option-badge {
    background: var(--success-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.resolution-option .option-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.resolution-details {
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

.tickets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.ticket-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.alternative-ticket-badge {
    background: var(--success-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.valid-ticket-badge {
    background: #28a745; /* Verde para tickets conservados */
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.replacement-ticket-badge {
    background: #17a2b8; /* Azul para reemplazos */
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.conflict-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.conflict-modal-actions .btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-conflict-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-conflict-cancel:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-conflict-accept {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-conflict-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.btn-conflict-accept:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive para modal de conflictos */
@media (max-width: 768px) {
    .conflict-resolution-modal .modal-container {
        width: 95%;
        margin: 1rem;
    }
    
    .resolution-option .option-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    
    .conflict-modal-actions {
        flex-direction: column;
    }
}

/* Modal de información de pago */
.payment-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 11000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 0;
}

.modal-container {
    position: relative;
    background: var(--bg-card);
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header i {
    color: var(--primary-color);
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: rgba(255, 71, 87, 0.1);
    color: var(--danger-color);
}

.modal-content {
    padding: 1.5rem;
}

.payment-instructions h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.amount-to-pay {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.amount-to-pay .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.amount-to-pay .amount {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3rem;
}

.payment-data {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: monospace;
    line-height: 1.6;
}

/* Nuevos estilos para campos de pago con botones copiar */
.payment-intro {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.payment-fields-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.payment-field-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.payment-field-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
    transform: translateY(-1px);
}

.payment-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.payment-field-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-field-value {
    padding: 1rem;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 500;
    word-break: break-all;
    line-height: 1.4;
    background: var(--bg-card);
    user-select: all;
}

.copy-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

.copy-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: var(--success-color);
    animation: copySuccess 0.3s ease;
}

.copy-btn.copy-error {
    background: var(--danger-color);
    animation: copyError 0.3s ease;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes copyError {
    0% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
    100% { transform: translateX(0); }
}

.payment-no-info {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid var(--warning-color);
    border-radius: 12px;
    color: var(--text-secondary);
}

.payment-no-info i {
    font-size: 2rem;
    color: var(--warning-color);
    margin-bottom: 1rem;
    display: block;
}

.payment-no-info p {
    margin: 0.5rem 0;
    line-height: 1.5;
}

/* Responsive para campos de pago */
@media (max-width: 768px) {
    .payment-field-header {
        padding: 0.6rem 0.8rem;
    }
    
    .payment-field-value {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .payment-field-label {
        font-size: 0.8rem;
    }
    
    .copy-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .payment-fields-grid {
        gap: 0.8rem;
    }
    
    .payment-field-item {
        border-radius: 8px;
    }
    
    .payment-field-value {
        font-size: 0.85rem;
    }
}

.important-note {
    background: rgba(255, 235, 59, 0.1);
    border: 1px solid var(--warning-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.important-note i {
    color: var(--warning-color);
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.important-note p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.btn-secondary, .btn-primary {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}