/**
 * Lodgify Ticket-Style Success Popup
 * Premium boarding-pass style confirmation
 */

/* Ticket Overlay */
.lodgify-ticket-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

/* Ticket Container */
.lodgify-ticket-container {
    background: white;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: slideUpBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUpBounce {
    0% { transform: translateY(100px) scale(0.9); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Close Button */
.ticket-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
    z-index: 10;
}

.ticket-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

/* Success Icon */
.ticket-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px auto 20px auto;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    animation: scaleIn 0.5s ease-out 0.2s backwards;
}

.ticket-error-icon {
    font-size: 60px;
    margin: 40px auto 20px auto;
    text-align: center;
    animation: shake 0.5s ease-out;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Title & Subtitle */
.ticket-title {
    text-align: center;
    font-size: 32px;
    font-weight: 900;
    color: #1f2937;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1f2937, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.5s ease-out 0.3s backwards;
}

.ticket-subtitle {
    text-align: center;
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 30px 0;
    animation: fadeInUp 0.5s ease-out 0.4s backwards;
}

/* Ticket Divider */
.ticket-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 30px 0;
    position: relative;
}

.ticket-divider::before,
.ticket-divider::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.ticket-divider::before { left: -15px; }
.ticket-divider::after { right: -15px; }

/* Confirmation Code */
.ticket-confirmation {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 30px 30px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    animation: fadeInUp 0.5s ease-out 0.5s backwards;
}

.conf-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.conf-code {
    font-size: 28px;
    font-weight: 900;
    color: white;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Ticket Sections */
.ticket-section {
    padding: 20px 30px;
    border-bottom: 2px dashed #e5e7eb;
    animation: fadeInUp 0.5s ease-out backwards;
}

.ticket-section:nth-child(5) { animation-delay: 0.6s; }
.ticket-section:nth-child(6) { animation-delay: 0.7s; }

.ticket-section-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #6b7280;
    margin-bottom: 8px;
}

.ticket-section-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.6;
}

/* Details Grid */
.ticket-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 25px 30px;
    background: linear-gradient(135deg, #f9fafb, #ffffff);
    border-bottom: 2px dashed #e5e7eb;
    animation: fadeInUp 0.5s ease-out 0.8s backwards;
}

.ticket-detail {
    text-align: center;
}

.detail-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.detail-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

/* Total Price */
.ticket-total {
    padding: 30px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    text-align: center;
    border-bottom: 2px dashed #e5e7eb;
    animation: fadeInUp 0.5s ease-out 0.9s backwards;
}

.total-label {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #92400e;
    margin-bottom: 10px;
}

.total-amount {
    font-size: 48px;
    font-weight: 900;
    color: #78350f;
    letter-spacing: -2px;
    text-shadow: 0 2px 4px rgba(120, 53, 15, 0.1);
}

/* Email Notice */
.ticket-email-notice {
    padding: 25px 30px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-bottom: 2px dashed #e5e7eb;
    animation: fadeInUp 0.5s ease-out 1s backwards;
}

.email-icon {
    font-size: 32px;
    line-height: 1;
}

.email-text strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 10px;
}

.email-list {
    font-size: 13px;
    color: #1e3a8a;
    line-height: 1.8;
}

.email-list div {
    margin: 4px 0;
}

/* Next Steps */
.ticket-next-steps {
    padding: 30px;
    animation: fadeInUp 0.5s ease-out 1.1s backwards;
}

.ticket-next-steps h3 {
    font-size: 18px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.ticket-next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ticket-next-steps li {
    padding: 12px 0;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
}

.ticket-next-steps li strong {
    color: #667eea;
    font-weight: 700;
}

/* OK Button */
.ticket-ok-btn {
    width: calc(100% - 60px);
    margin: 0 30px 30px 30px;
    padding: 18px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    animation: fadeInUp 0.5s ease-out 1.2s backwards;
}

.ticket-ok-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5);
}

.ticket-ok-btn:active {
    transform: translateY(-1px);
}

/* Error Variant */
.lodgify-ticket-container.error {
    border-top: 8px solid #ef4444;
}

.lodgify-ticket-container.error .ticket-ok-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ticket-title {
        font-size: 24px;
    }
    
    .conf-code {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .total-amount {
        font-size: 36px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

