/* Pay Ticket Page Styles */
.buy-tickets-section {
    padding: 2rem 1rem;
    background: var(--background);
    min-height: 80vh;
}

.buy-tickets-container {
    max-width: 1000px;
    margin: 0 auto;
}

.buy-ticket-card {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    background: var(--surface);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px var(--shadow);
    border: 1px solid var(--border);
}

/* Ticket Info Section */
.ticket-info {
    text-align: center;
    padding: 1rem;
    border-right: 1px solid var(--border);
}

.ticket-image {
    margin-bottom: 1.5rem;
}

.ticket-image img {
    width: 100%;
    max-width: 200px;
    height: 150px;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.test-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success);
    margin: 1rem 0;
}

/* Payment Section */
.payment-section {
    padding: 1rem;
}

.purchase-info h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.purchase-info p {
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Payment Form */
.payment-form {
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--background);
    color: var(--text);
    transition: border-color 0.3s ease;
}

.form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 62, 114, 0.1);
}

.help-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 200px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--text-light);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-pay {
    width: 100%;
    margin-top: 1rem;
}

.btn-spinner {
    display: none;
    margin-left: 0.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Payment Redirect */
.payment-redirect {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.redirect-info h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.redirect-info p {
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* Security Info */
.security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 2rem;
}

.security-badge {
    font-size: 1.5rem;
}

.security-info p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .buy-ticket-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .ticket-info {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 2rem;
        margin-bottom: 1rem;
    }

    .test-title {
        font-size: 1.25rem;
    }

    .price {
        font-size: 1.75rem;
    }

    .ticket-image img {
        max-width: 150px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .buy-tickets-section {
        padding: 1rem 0.5rem;
    }

    .buy-ticket-card {
        padding: 1rem;
    }

    .btn {
        width: 100%;
        min-width: auto;
    }

    .payment-redirect {
        padding: 1.5rem;
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Success States */
.success-message {
    background: var(--success);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}

/* Error States */
.error-message {
    background: var(--danger);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}

/* Print Styles */
@media print {
    .buy-ticket-card {
        box-shadow: none;
        border: 1px solid #000;
    }

    .btn,
    .payment-form,
    .security-info {
        display: none;
    }
}

/* Dark theme adjustments */
[data-theme="dark"] .form-group input[type="email"] {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .ticket-image img {
    border-color: var(--border);
}

[data-theme="dark"] .security-info {
    background: var(--surface);
    border-color: var(--border);
}

/* Focus styles for accessibility */
.form-group input[type="email"]:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .buy-ticket-card {
        border: 2px solid;
    }

    .form-group input[type="email"] {
        border-width: 2px;
    }
}