/* Individual Event Payment Page Styles */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #ffffff;
    line-height: 1.6;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 22%;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.main-content {
    padding: 2rem 0;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.card-body {
    padding: 2rem;
}

.text-center {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: rgba(255, 255, 255, 0.7);
}

.error-icon,
.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
}

.error-icon svg {
    width: 100%;
    height: 100%;
    stroke: #ff6b6b;
}

.success-icon svg {
    width: 100%;
    height: 100%;
    stroke: #4ade80;
}

.cart-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    position: relative;
}
.cart-icon svg {
    width: 100%;
    height: 100%;
    stroke: #4ade80;
}
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff6b6b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-event-dates {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.page-subtitle strong {
    color: #ff6b6b;
}

.event-info {
    display: grid;
    gap: 0.75rem;
}

.event-dates {
    display: grid;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.event-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.event-date-label {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.event-date-value {
    font-weight: 600;
    text-align: right;
}

.event-meta {
    display: grid;
    gap: 0.35rem;
}

.event-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.event-meta-label {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.event-meta-value {
    font-weight: 600;
}

.event-meta-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

.pricing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.tier-label {
    font-size: 1.25rem;
    font-weight: 700;
}

.tier-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.tier-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b6b;
}

.pricing-list {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-bottom: 1.5rem;
}

.pricing-item,
.pricing-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.pricing-item.discount {
    color: #4ade80;
}

.pricing-total {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.pricing-duration {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
}

.voucher-section {
    margin-bottom: 1.5rem;
}

.voucher-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.voucher-divider::before,
.voucher-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.voucher-divider span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: lowercase;
}

.voucher-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.voucher-input-row {
    display: flex;
    gap: 0.5rem;
}

.voucher-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    color: #ffffff;
    font-family: 'Inter', monospace;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.voucher-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.voucher-input:focus {
    outline: none;
    border-color: rgba(255, 107, 107, 0.6);
}

.voucher-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.voucher-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
}

.voucher-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.payment-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#paypal-container {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0.75rem;
}

.payment-heading {
    text-align: center;
    padding: 0.5rem 0;
}

.payment-heading h3 {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

#login-state .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#auth-or-separator {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.08em;
}

.guest-checkout-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.access-code-display {
    margin: 0.25rem 0 0;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(74, 222, 128, 0.35);
    background: rgba(34, 197, 94, 0.12);
    color: #d1fae5;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.event-code-display {
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(37, 99, 235, 0.14);
    color: #dbeafe;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-green {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-green:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.btn-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

.success-instruction {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-bottom: 1.5rem !important;
}

.error-text {
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

#stripe-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }

    .card-body {
        padding: 1.5rem;
    }
}

/* Site Footer */
.site-footer {
    padding: 2.5rem 1rem;
    text-align: center;
}

.footer-event-code {
    margin: 0 0 0.75rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.93rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.footer-help-link {
    display: inline-block;
    margin-bottom: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 0.95rem;
}

.footer-help-link:hover {
    color: #ffffff;
}

.footer-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.06);
}

.footer-link-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}
