/* Checkout Page Styles - LoricaVallo Theme */
:root {
    --checkout-bg: #f8fafc;
    --checkout-card: #ffffff;
    --checkout-border: #e2e8f0;
    --checkout-text: #0f172a;
    --checkout-text-secondary: #64748b;
    --checkout-primary: #0f172a;       /* Deep Roman Slate */
    --checkout-primary-dark: #020617;
    --checkout-gold: #c5a059;          /* Muted Centurion Gold */
    --checkout-gold-light: #d4b76a;
    --checkout-success: #10b981;
    --checkout-warning: #c5a059;
    --checkout-danger: #ef4444;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--checkout-bg);
    color: var(--checkout-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.checkout-header {
    background: var(--checkout-card);
    border-bottom: 1px solid var(--checkout-border);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--checkout-text);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--checkout-primary), var(--checkout-primary-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
}

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

.secure-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--checkout-success);
    font-size: 0.85rem;
    font-weight: 500;
}

.secure-badge svg {
    width: 18px;
    height: 18px;
}

/* Main Content */
.checkout-main {
    flex: 1;
    padding: 40px 24px;
}

.checkout-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Order Section */
.order-section {
    background: var(--checkout-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.order-section h2,
.payment-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.order-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--checkout-text);
}

/* Plan Selector */
.plan-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.plan-option {
    cursor: pointer;
}

.plan-option input {
    display: none;
}

.plan-card {
    border: 2px solid var(--checkout-border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: all 0.2s ease;
    position: relative;
}

.plan-option:hover .plan-card {
    border-color: var(--checkout-primary);
}

.plan-option.selected .plan-card,
.plan-option input:checked + .plan-card {
    border-color: var(--checkout-primary);
    background: rgba(197, 160, 89, 0.05);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.plan-name {
    font-weight: 600;
    font-size: 1rem;
}

.plan-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--checkout-primary);
}

.plan-price span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--checkout-text-secondary);
}

.plan-desc {
    font-size: 0.85rem;
    color: var(--checkout-text-secondary);
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--checkout-warning);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.plan-badge.best {
    background: linear-gradient(135deg, var(--checkout-success), #059669);
}

/* Team Toggle */
.team-toggle {
    margin-bottom: 20px;
    padding: 16px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
}

.toggle-label input {
    display: none;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.toggle-label input:checked + .toggle-switch {
    background: var(--checkout-primary);
}

.toggle-label input:checked + .toggle-switch::after {
    left: 22px;
}

/* Team Size */
.team-size-section {
    padding: 16px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.team-size-section label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.team-size-input {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.size-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--checkout-border);
    background: white;
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-btn:hover {
    background: var(--checkout-primary);
    color: white;
    border-color: var(--checkout-primary);
}

.team-size-input input {
    width: 80px;
    height: 40px;
    border: 1px solid var(--checkout-border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.team-discount {
    font-size: 0.85rem;
    color: var(--checkout-success);
}

/* Order Details */
.order-details {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: var(--radius-md);
}

.order-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.order-item {
    font-size: 0.95rem;
    color: var(--checkout-text-secondary);
}

.order-price {
    font-size: 0.95rem;
    font-weight: 600;
}

.order-line.promo .order-item,
.order-line.promo .order-price {
    color: var(--checkout-success);
}

.order-divider {
    height: 1px;
    background: var(--checkout-border);
    margin: 10px 0;
}

.order-line.total .order-item {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--checkout-text);
}

.order-line.total .order-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--checkout-primary);
}

/* Promo Section */
.promo-section {
    margin-bottom: 24px;
}

.promo-input-group {
    display: flex;
    gap: 10px;
}

.promo-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--checkout-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.promo-input-group button {
    padding: 12px 20px;
    background: var(--checkout-text);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.promo-input-group button:hover {
    background: #0f172a;
}

.promo-message {
    font-size: 0.85rem;
    margin-top: 8px;
}

.promo-message.success {
    color: var(--checkout-success);
}

.promo-message.error {
    color: var(--checkout-danger);
}

/* Features Summary */
.features-summary h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--checkout-text-secondary);
}

.features-list .check {
    color: var(--checkout-success);
    font-weight: 700;
}

/* Payment Section */
.payment-section {
    background: var(--checkout-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

/* Payment Tabs */
.payment-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.payment-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--checkout-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-tab svg {
    width: 20px;
    height: 20px;
}

.payment-tab:hover {
    background: #e2e8f0;
}

.payment-tab.active {
    background: white;
    border-color: var(--checkout-primary);
    color: var(--checkout-primary);
}

/* Payment Form */
.payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--checkout-text);
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    border: 1px solid var(--checkout-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--checkout-primary);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

/* Stripe Elements container */
.stripe-element {
    padding: 14px 16px;
    border: 1px solid var(--checkout-border);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: all 0.2s ease;
}

.stripe-element.StripeElement--focus {
    border-color: var(--checkout-primary);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.stripe-element.StripeElement--invalid {
    border-color: var(--checkout-danger);
}

.card-errors {
    color: var(--checkout-danger);
    font-size: 0.85rem;
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card-input-wrapper {
    position: relative;
}

.card-input-wrapper input {
    width: 100%;
    padding-right: 120px;
}

.card-brands {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 6px;
}

.card-brand {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 3px;
    opacity: 0.4;
}

.card-brand.visa { background: #1a1f71; color: white; }
.card-brand.mc { background: #eb001b; color: white; }
.card-brand.amex { background: #006fcf; color: white; }

/* Pay Button */
.pay-button {
    padding: 18px 32px;
    background: linear-gradient(135deg, var(--checkout-primary), var(--checkout-primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.4);
}

.pay-button:active {
    transform: translateY(0);
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

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

.payment-providers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--checkout-text-secondary);
}

.stripe-logo {
    font-weight: 700;
    background: linear-gradient(135deg, #c5a059, #d4b76a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* PayPal Form */
.paypal-info {
    text-align: center;
    margin-bottom: 24px;
}

.paypal-logo {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.paypal-logo .pay { color: #003087; }
.paypal-logo .pal { color: #009cde; }

.paypal-info p {
    color: var(--checkout-text-secondary);
    font-size: 0.9rem;
}

.paypal-button {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #003087, #009cde);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.paypal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 48, 135, 0.4);
}

.paypal-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.paypal-btn-content svg {
    width: 24px;
    height: 24px;
}

/* Crypto Form */
.crypto-info {
    margin-bottom: 24px;
}

.crypto-info p {
    font-size: 0.95rem;
    color: var(--checkout-text-secondary);
    margin-bottom: 16px;
}

.crypto-options {
    display: flex;
    gap: 12px;
}

.crypto-option {
    flex: 1;
    cursor: pointer;
}

.crypto-option input {
    display: none;
}

.crypto-card {
    border: 2px solid var(--checkout-border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.crypto-option:hover .crypto-card {
    border-color: var(--checkout-primary);
}

.crypto-option.selected .crypto-card,
.crypto-option input:checked + .crypto-card {
    border-color: var(--checkout-primary);
    background: rgba(197, 160, 89, 0.05);
}

.crypto-icon {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.crypto-icon.btc { color: #f7931a; }
.crypto-icon.eth { color: #627eea; }
.crypto-icon.usdc { color: #2775ca; }

.crypto-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.crypto-amount {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.amount-label {
    font-size: 0.9rem;
    color: var(--checkout-text-secondary);
}

.amount-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--checkout-text);
}

.amount-usd {
    font-size: 0.85rem;
    color: var(--checkout-text-secondary);
}

.crypto-button {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #f7931a, #ffb700);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crypto-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 147, 26, 0.4);
}

.crypto-payment-details {
    margin-top: 24px;
    padding: 24px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    text-align: center;
}

.qr-code {
    margin-bottom: 20px;
}

.qr-placeholder {
    width: 180px;
    height: 180px;
    background: white;
    border: 1px solid var(--checkout-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--checkout-text-secondary);
    font-size: 0.85rem;
}

.wallet-address {
    margin-bottom: 16px;
}

.wallet-address label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.address-box {
    display: flex;
    gap: 10px;
    background: white;
    border: 1px solid var(--checkout-border);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.address-box code {
    flex: 1;
    font-size: 0.75rem;
    word-break: break-all;
    color: var(--checkout-text-secondary);
}

.copy-btn {
    padding: 6px 12px;
    background: var(--checkout-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.crypto-note {
    font-size: 0.8rem;
    color: var(--checkout-text-secondary);
}

/* Security Info */
.security-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--checkout-border);
}

.security-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--checkout-text-secondary);
}

.security-item svg {
    width: 18px;
    height: 18px;
    color: var(--checkout-success);
}

/* Trust Section */
.trust-section {
    max-width: 1100px;
    margin: 40px auto 0;
    padding: 0 24px;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 60px;
}

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

.trust-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--checkout-text);
}

.trust-label {
    font-size: 0.85rem;
    color: var(--checkout-text-secondary);
}

/* Footer */
.checkout-footer {
    background: var(--checkout-card);
    border-top: 1px solid var(--checkout-border);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.checkout-footer p {
    font-size: 0.85rem;
    color: var(--checkout-text-secondary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--checkout-text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--checkout-primary);
}

/* Success Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--checkout-success), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--checkout-text-secondary);
    margin-bottom: 24px;
}

.success-details {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
}

.detail-row span:first-child {
    color: var(--checkout-text-secondary);
}

.detail-row span:last-child {
    font-weight: 600;
}

.btn-success {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--checkout-primary), var(--checkout-primary-dark));
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.4);
}

/* Responsive */
@media (max-width: 900px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }

    .payment-section {
        order: -1;
    }
}

@media (max-width: 600px) {
    .checkout-main {
        padding: 20px 16px;
    }

    .order-section,
    .payment-section {
        padding: 24px 20px;
    }

    .payment-tabs {
        flex-wrap: wrap;
    }

    .payment-tab {
        flex: 1 1 100%;
    }

    .crypto-options {
        flex-direction: column;
    }

    .trust-badges {
        flex-direction: column;
        gap: 24px;
    }

    .checkout-footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
