/**
 * Checkout Page Styles
 * Split-screen Stripe-inspired checkout with brand colors
 * 
 * Brand colors:
 * - Primary: #43C848 (green)
 * - Dark bg: #020617 to #0f172a
 * - Text light: #e2e8f0
 * - Text muted: rgba(203, 213, 225, 0.75)
 */

/* Reset and base */
.na-checkout-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f6f9fc;
    min-height: 100vh;
}

.na-checkout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ========================================
   Left Column: Order Summary
   ======================================== */
.na-checkout-summary {
    width: 45%;
    background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
    color: #e2e8f0;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient overlay */
.na-checkout-summary::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse at top right, rgba(67, 200, 72, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* Logo */
.na-checkout-logo {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.na-checkout-logo a {
    display: inline-block;
}

.na-checkout-logo img {
    max-width: 60px;
    height: auto;
    filter: brightness(1.1);
    border-radius: 8px;
}

/* Summary content */
.na-summary-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.na-summary-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(203, 213, 225, 0.6);
    margin-bottom: 24px;
}

/* Plan details card */
.na-summary-plan {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.na-plan-details {
    margin-bottom: 8px;
}

.na-plan-details strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.na-plan-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.na-plan-price {
    font-size: 28px;
    font-weight: 700;
    color: #43C848;
}

.na-plan-cycle {
    font-size: 14px;
    color: rgba(203, 213, 225, 0.6);
    white-space: nowrap;
}

/* Plan features */
.na-plan-features {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.na-plan-features-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(203, 213, 225, 0.5);
    margin-bottom: 12px;
}

.na-plan-features-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.na-plan-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(203, 213, 225, 0.75);
    line-height: 1.5;
}

.na-feature-check-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: rgba(67, 200, 72, 0.6);
    stroke-width: 2;
}

.na-plan-feature-item span {
    flex: 1;
}

/* Promo code */
.na-summary-promo {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.na-summary-promo input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.5);
    color: #e2e8f0;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.na-summary-promo input:focus {
    outline: none;
    border-color: rgba(67, 200, 72, 0.5);
    box-shadow: 0 0 0 3px rgba(67, 200, 72, 0.1);
}

.na-summary-promo input::placeholder {
    color: rgba(203, 213, 225, 0.4);
}

.na-btn-promo {
    padding: 12px 20px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: rgba(203, 213, 225, 0.8);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.na-btn-promo:hover {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

/* Totals */
.na-summary-total {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    padding-top: 20px;
}

.na-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    color: rgba(203, 213, 225, 0.7);
}

.na-total-final {
    font-size: 18px;
    color: #fff;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.na-total-final strong {
    font-weight: 700;
}

.na-summary-note {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(67, 200, 72, 0.08);
    border: 1px solid rgba(67, 200, 72, 0.15);
    border-radius: 8px;
}

.na-summary-note p {
    margin: 0;
    font-size: 13px;
    color: rgba(203, 213, 225, 0.8);
}

/* ========================================
   Right Column: Payment Form
   ======================================== */
.na-checkout-form {
    width: 55%;
    padding: 48px 60px;
    background: #fff;
    overflow-y: auto;
}

.na-checkout-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 8px;
}

.na-checkout-subtitle {
    font-size: 15px;
    color: #697386;
    margin-bottom: 32px;
}

/* Payment request button (Apple Pay, Google Pay) */
#payment-request-button {
    margin-bottom: 24px;
}

#payment-request-button .StripeElement {
    border-radius: 8px;
}

/* Divider */
.na-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    color: #8898aa;
    font-size: 13px;
}

.na-divider::before,
.na-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #e6ebf1;
}

.na-divider span {
    padding: 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Form groups */
.na-form-group {
    margin-bottom: 20px;
}

.na-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1f36;
    margin-bottom: 8px;
}

.na-form-group input[type="email"],
.na-form-group input[type="text"],
.na-form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e6ebf1;
    border-radius: 8px;
    font-size: 16px;
    color: #1a1f36;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.na-form-group input:focus {
    outline: none;
    border-color: #43C848;
    box-shadow: 0 0 0 3px rgba(67, 200, 72, 0.1);
}

.na-form-group input::placeholder {
    color: #aab7c4;
}

.na-email-readonly {
    background: #e2e8f0 !important;
    cursor: not-allowed;
    border-color: #cbd5e1 !important;
    position: relative;
    color: #64748b !important;
}

.na-email-readonly:focus {
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
}

.na-email-note {
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* Payment Method Tabs */
.na-payment-methods {
    margin: 28px 0;
}

.na-payment-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid #e6ebf1;
}

.na-payment-tab {
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #697386;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.na-payment-tab:hover {
    color: #1a1f36;
}

.na-payment-tab.active {
    color: #43C848;
    border-bottom-color: #43C848;
}

.na-payment-panel {
    display: none;
    padding: 24px 0;
}

.na-payment-panel.active {
    display: block;
}

/* Stripe Elements container */
#stripe-payment-element {
    padding: 16px;
    border: 1px solid #e6ebf1;
    border-radius: 8px;
    background: #fafafa;
}

/* Separate Stripe card fields */
.na-stripe-card-fields {
    margin-top: 8px;
}

.na-stripe-field-group {
    margin-bottom: 16px;
}

.na-stripe-field-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1f36;
    margin-bottom: 8px;
}

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

#stripe-card-number,
#stripe-card-expiry,
#stripe-card-cvc {
    padding: 14px 16px;
    border: 1px solid #e6ebf1;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#stripe-card-number:focus-within,
#stripe-card-expiry:focus-within,
#stripe-card-cvc:focus-within {
    border-color: #43C848;
    box-shadow: 0 0 0 3px rgba(67, 200, 72, 0.1);
}

#stripe-error-message {
    color: #df1b41;
    font-size: 14px;
    margin-top: 12px;
    padding: 12px 16px;
    background: #fef2f4;
    border-radius: 6px;
}

/* PayPal Button container */
#paypal-button-container {
    margin: 20px 0;
}

/* PayPal Info Section - Modern Design */
.na-paypal-info {
    padding: 20px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e6ebf1;
}

.na-paypal-logo-container {
  
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 24px;
}



.na-paypal-logo {
    max-width: 90px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.na-paypal-info-block {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin: 0 16px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e6ebf1;
}

.na-paypal-main-text {
    text-align: center;
    display: flex;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1f36;
    margin: 0;
    line-height: 1.5;
    align-items: center;
}

.na-paypal-or {
    display: inline-block;
    margin: 6px 0;
    padding: 3px 10px;
    background: #f6f9fc;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: #697386;
    text-transform: lowercase;
}

.na-paypal-card-text {
    display: inline-block;
}

.na-paypal-optional-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
}

.na-paypal-optional-inline svg {
    color: #64748b;
    flex-shrink: 0;
}

/* Terms checkbox */
.na-checkbox-group {
    margin: 24px 0;
}

.na-checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: #697386;
    cursor: pointer;
    line-height: 1.5;
}

.na-checkbox-group input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #43C848;
    flex-shrink: 0;
}

.na-checkbox-group a {
    color: #43C848;
    text-decoration: none;
    font-weight: 500;
}

.na-checkbox-group a:hover {
    text-decoration: underline;
}

/* Submit Button */
.na-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.na-btn-primary {
    background: #0f172a;
    color: #fff;
}

.na-btn-primary:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.na-btn-primary:active {
    transform: translateY(0);
}

.na-btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.na-btn-paypal {
    background: #FFC439;
    color: #003087;
    border: 1px solid #FFC439;
}

.na-btn-paypal:hover {
    background: #FFB800;
    border-color: #FFB800;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 196, 57, 0.3);
}

.na-btn-paypal:active {
    transform: translateY(0);
}

.na-btn-paypal:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.na-btn-paypal-logo {
    height: 24px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.na-btn-lg {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

/* Trust badges section - Reduced width */
.na-trust-badges {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e6ebf1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.na-trust-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f6f9fc;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #1a1f36;
}

.na-trust-header .na-lock-icon {
    color: #1a1f36;
    margin-right: 8px;
    flex-shrink: 0;
}

.na-trust-header span:not(.na-powered-by) {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.na-trust-header strong {
    font-weight: 600;
}

.na-powered-by {
    background: #1a1f36;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.na-powered-by strong {
    font-weight: 700;
}

.na-card-icons {
    width: 44%;
    margin: auto;
}

.na-card-image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* No gateway warning */
.na-no-gateway {
    padding: 32px;
    text-align: center;
    background: #fef2f4;
    border: 1px solid #fcd5db;
    border-radius: 8px;
    color: #df1b41;
}

/* Loading state */
.na-btn.loading {
    position: relative;
    color: transparent;
}

.na-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Responsive Styles
   ======================================== */
@media (max-width: 1024px) {
    .na-checkout-wrapper {
        flex-direction: column;
    }

    .na-checkout-summary,
    .na-checkout-form {
        width: 100%;
    }

    .na-checkout-summary {
        padding: 32px 24px;
    }

    .na-checkout-form {
        padding: 32px 24px;
    }

    .na-checkout-logo {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .na-checkout-summary {
        padding: 20px 16px;
    }

    .na-checkout-form {
        padding: 20px 16px;
    }

    /* Reduce logo size on mobile */
    .na-checkout-logo {
        margin-bottom: 10px;
    }

    .na-checkout-logo img {
        max-width: 50px;
    }

    .na-checkout-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .na-checkout-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    /* Hide promo code on mobile or make it more compact */
    .na-summary-promo {
        flex-direction: column;
        margin-bottom: 16px;
    }

    .na-summary-promo input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .na-btn-promo {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Reduce spacing in summary */
    .na-summary-title {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .na-summary-plan {
        padding: 16px;
        margin-bottom: 16px;
    }

    .na-plan-details strong {
        font-size: 18px;
    }

    .na-plan-price {
        font-size: 24px;
    }

    .na-plan-cycle {
        font-size: 13px;
    }

    .na-plan-features {
        margin-top: 16px;
        padding-top: 16px;
    }

    .na-plan-features-title {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .na-plan-features-list {
        gap: 6px;
    }

    .na-plan-feature-item {
        font-size: 12px;
        gap: 8px;
    }

    .na-feature-check-icon {
        width: 14px;
        height: 14px;
    }

    /* Hide features on mobile */
    .na-plan-features {
        display: none;
    }

    .na-summary-total {
        padding-top: 16px;
    }

    /* Stripe fields on mobile */
    .na-stripe-field-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .na-stripe-field-group {
        margin-bottom: 12px;
    }

    .na-total-row {
        margin-bottom: 8px;
        font-size: 14px;
    }

    .na-total-final {
        font-size: 16px;
        margin-top: 12px;
        padding-top: 12px;
    }

    .na-summary-note {
        margin-top: 12px;
        padding: 10px 12px;
    }

    .na-summary-note p {
        font-size: 12px;
    }

    /* Payment tabs */
    .na-payment-tabs {
        flex-wrap: wrap;
    }

    .na-payment-tab {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
        font-size: 13px;
    }

    .na-payment-panel {
        padding: 16px 0;
    }

    /* Reduce form group spacing */
    .na-form-group {
        margin-bottom: 16px;
    }

    .na-form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .na-form-group input[type="email"],
    .na-form-group input[type="text"],
    .na-form-group input[type="password"] {
        padding: 12px 14px;
        font-size: 15px;
    }

    /* Reduce checkbox group spacing */
    .na-checkbox-group {
        margin: 20px 0;
    }

    .na-checkbox-group label {
        font-size: 13px;
        gap: 10px;
    }

    /* Reduce trust badges */
    .na-trust-badges {
        margin-top: 20px;
        padding-top: 16px;
    }

    .na-trust-header {
        padding: 10px 12px;
        font-size: 12px;
        margin-bottom: 12px;
    }

    .na-trust-header .na-lock-icon {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }

    .na-powered-by {
        padding: 3px 10px;
        font-size: 9px;
    }

    .na-card-icons {
        width: 100%;
    }

    .na-card-image {
        max-width: 200px;
    }

    /* Footer links */
    .na-checkout-footer {
        padding-top: 24px;
    }

    .na-checkout-footer-links {
        gap: 12px;
        font-size: 11px;
    }
}

/* ========================================
   Card input styling (Stripe Elements)
   ======================================== */
.StripeElement {
    padding: 14px 16px;
    border: 1px solid #e6ebf1;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.StripeElement--focus {
    border-color: #43C848;
    box-shadow: 0 0 0 3px rgba(67, 200, 72, 0.1);
}

.StripeElement--invalid {
    border-color: #df1b41;
}

/* ========================================
   Trial badge
   ======================================== */
.na-trial-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(67, 200, 72, 0.15);
    border: 1px solid rgba(67, 200, 72, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #43C848;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
}

/* ========================================
   Footer links
   ======================================== */
.na-checkout-footer {
    margin-top: auto;
    padding-top: 32px;
    position: relative;
    z-index: 1;
}

.na-checkout-footer-links {
    display: flex;
    gap: 16px;
    font-size: 12px;
}

.na-checkout-footer-links a {
    color: rgba(203, 213, 225, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.na-checkout-footer-links a:hover {
    color: rgba(203, 213, 225, 0.8);
}

/* ========================================
   Messages (error/success)
   ======================================== */
.na-checkout-error {
    padding: 14px 18px;
    background: #fef2f4;
    border: 1px solid #fcd5db;
    border-radius: 8px;
    color: #df1b41;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

.na-checkout-error:not(:empty) {
    display: block;
}

.na-checkout-success {
    padding: 14px 18px;
    background: rgba(67, 200, 72, 0.1);
    border: 1px solid rgba(67, 200, 72, 0.3);
    border-radius: 8px;
    color: #2d8a32;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

.na-checkout-success:not(:empty) {
    display: block;
}
