*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #0f172a;
    background: #ffffff;
}

.checkout-wrap {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px 64px;
}

.checkout-card {
    width: 100%;
    max-width: 480px;
}

.checkout-logo {
    display: block;
    max-width: 180px;
    height: auto;
    margin: 0 auto 24px;
}

.checkout-brand {
    text-align: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.checkout-package {
    text-align: center;
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0 0 8px;
}

.checkout-price {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 24px;
    color: #0f172a;
}

.checkout-price-original {
    display: block;
    font-size: 0.875rem;
    color: #94a3b8;
    text-decoration: line-through;
    margin-bottom: 2px;
}

.form-field {
    margin-bottom: 24px;
}

.form-field-payment {
    margin-bottom: 24px;
}

.form-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: #334155;
}

.form-field input[type="text"],
.form-field input[type="email"] {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font: inherit;
    color: #0f172a;
    background: #fff;
}

.form-field input:focus {
    outline: none;
    border-color: #89ae43;
    box-shadow: 0 0 0 3px rgba(137, 174, 67, 0.15);
}

#payment-element {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin: 0 0 16px;
}

.coupon-section {
    margin: 0 0 24px;
}

.coupon-toggle {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.coupon-panel {
    margin-top: 12px;
    transition: opacity 0.15s ease;
}

.coupon-panel label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.coupon-row {
    display: flex;
    gap: 8px;
}

.coupon-row input {
    flex: 1;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font: inherit;
}

.btn-secondary {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.coupon-message {
    font-size: 0.8125rem;
    margin: 8px 0 0;
}

.coupon-message.is-error {
    color: #dc2626;
}

.coupon-message.is-success {
    color: #15803d;
}

.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 24px;
    cursor: pointer;
}

.terms-check input {
    margin-top: 3px;
    flex-shrink: 0;
}

.terms-check a {
    color: #89ae43;
}

.btn-subscribe {
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 8px;
    background: #89ae43;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-subscribe:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-subscribe:not(:disabled):hover {
    background: #6f8c35;
}

.charge-notice {
    margin: 12px 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
    text-align: center;
}

.checkout-overlay[hidden] {
    display: none !important;
}

.checkout-overlay:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlay-fade-in 0.2s ease;
}

@keyframes overlay-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.checkout-overlay-inner {
    text-align: center;
    padding: 24px;
}

.overlay-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.overlay-sub {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.checkout-muted {
    text-align: center;
    color: #64748b;
}

.success-card {
    text-align: center;
}

.success-emoji {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 16px;
}

.success-card p {
    margin: 0 0 12px;
    color: #334155;
}

.success-thanks {
    margin-top: 20px !important;
    font-weight: 500;
}

.success-order-id {
    margin-top: 24px !important;
    font-size: 0.8125rem;
    color: #94a3b8 !important;
}
