/* Remove ALL existing modal positioning CSS and replace with this clean version */

/* Let Bootstrap handle modal positioning - NO custom modal positioning */
.modal-dialog {
    /* Remove any custom margin, width, height overrides */
}

/* Only style the content, not the positioning */
.ticket-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
    text-align: center;
}

.success-header-content {
    width: 100%;
}

.success-icon {
    font-size: 3rem;
    color: #4ade80;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.success-subtitle {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Digital Ticket Styles */
.digital-ticket {
    background: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ticket-header {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: white;
    padding: 1.5rem;
    border-bottom: 3px solid #fbbf24;
}

.header-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 50px;
    height: 50px;
    background: #fbbf24;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #1f2937;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.brand-tagline {
    color: #d1d5db;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.ticket-badge {
    background: #fbbf24;
    color: #1f2937;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.ticket-body {
    padding: 1.5rem;
}

.entry-section {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.section-icon {
    font-size: 2rem;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fbbf24;
}

.entry-numbers {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    word-break: break-word;
}

.entry-count {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.participant-info {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.participant-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.participant-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0;
}

.user-contact-details {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.contact-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.contact-label {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.contact-value {
    font-size: 0.85rem;
    color: #1f2937;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.detail-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.detail-card-full {
    grid-column: 1 / -1;
}

.detail-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.detail-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.detail-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 0.9rem;
    color: #1f2937;
    font-weight: 600;
    line-height: 1;
}

.qr-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-code-container {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-code-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
    background: white;
    display: block;
    margin: 0 auto;
}

.qr-info {
    margin-top: 0.5rem;
}

.qr-label {
    display: block;
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.qr-id {
    display: block;
    font-size: 0.65rem;
    color: #9ca3af;
    font-weight: 400;
}

.ticket-footer-info {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.footer-timestamp {
    text-align: center;
    color: #6b7280;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.footer-note {
    color: #6b7280;
    font-size: 0.75rem;
    padding: 0.75rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
}

.ticket-modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

.action-grid {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive - NO positioning overrides */
@media (max-width: 768px) {
    .ticket-modal-header {
        padding: 1rem;
    }
    
    .success-icon {
        font-size: 2.5rem;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .ticket-header {
        padding: 1rem;
    }
    
    .header-layout {
        flex-direction: column;
        text-align: center;
    }
    
    .ticket-body {
        padding: 1rem;
    }
    
    .entry-section {
        padding: 1rem;
    }
    
    .entry-numbers {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .participant-info {
        padding: 1rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .detail-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .detail-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .qr-code-image {
        width: 90px;
        height: 90px;
    }
    
    .action-grid {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-btn {
        width: 100%;
        min-width: auto;
    }
}

/* Print Styles */
@media print {
    .modal-header,
    .modal-footer {
        display: none !important;
    }
    
    .digital-ticket {
        box-shadow: none;
        padding: 1rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .qr-code-image {
        width: 80px !important;
        height: 80px !important;
    }
}

.ticket-page {
    page-break-after: always;
    /* Optionally add padding/margin for each page */
}
.ticket-page:last-child {
    page-break-after: auto;
}