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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #f6f9fc;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
}

/* Payment Layout - Two Column */
.payment-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    min-height: 600px;
}

/* Left Column - Order Summary */
.order-summary {
    background: #fafafa;
    padding: 40px;
    border-right: 1px solid #e5e7eb;
}

.merchant-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.merchant-icon {
    width: 32px;
    height: 32px;
    background: #e5e7eb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.merchant-name {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
}

.payment-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.amount-display {
    font-size: 48px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 32px;
}

.product-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: start;
    margin-bottom: 24px;
}

.product-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    flex: 1;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.product-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.summary-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 20px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

.summary-row.total-row {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-top: 16px;
}

.total-amount {
    font-size: 18px;
}

.promo-code {
    margin: 16px 0;
}

.promo-btn {
    background: #f3f4f6;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s;
}

.promo-btn:hover {
    background: #e5e7eb;
}

/* Right Column - Payment Form */
.payment-form-container {
    padding: 40px;
    background: white;
}

.continue-with-link {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 32px;
}

.link-btn {
    color: #6b7280;
    font-size: 14px;
    text-decoration: underline;
    transition: color 0.2s;
}

.link-btn:hover {
    color: #111827;
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
}

.info-icon {
    cursor: help;
    display: inline-flex;
    align-items: center;
}

.form-group input,
.form-group select {
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    background: white;
    transition: all 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Input with Icon */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    padding-left: 42px;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 14px;
    pointer-events: none;
}

.flag-icon {
    position: absolute;
    left: 14px;
    font-size: 18px;
}

.input-with-icon .info-icon {
    position: absolute;
    right: 14px;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-method-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.payment-method-option:hover {
    border-color: #d1d5db;
}

.payment-method-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #0066ff;
}

.payment-method-option input[type="radio"]:checked ~ .payment-method-content {
    font-weight: 500;
}

.payment-method-option:has(input:checked) {
    border-color: #0066ff;
    background: #f0f7ff;
}

.payment-method-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.payment-method-label {
    font-size: 15px;
    color: #111827;
}

.card-logos {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.card-logos img {
    height: 20px;
    width: auto;
}

.payment-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.cashapp-icon {
    background: #00d632;
    color: white;
}

.klarna-icon {
    background: #ffb3c7;
    color: #fff;
}

.cashback-badge {
    margin-left: auto;
    background: #00d632;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Payment Method Forms */
.payment-method-form {
    margin-top: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.payment-method-info {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
    text-align: center;
}

.payment-method-error {
    font-size: 13px;
    color: #dc2626;
    text-align: center;
    padding: 12px;
    background: #fef2f2;
    border-radius: 6px;
}

/* Card Input Container */
.card-input-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Moov Drop Styling */
moov-card-link,
.moov-drop-input,
#moov-card-number,
#moov-card-expiry,
#moov-card-cvv {
    display: block;
    width: 100%;
    min-height: 300px;
}

moov-card-link {
    /* The moov-card-link component contains its own styling via iframe */
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.moov-drop-input iframe {
    width: 100%;
    height: 44px;
    border: none;
}

.moov-drop-input:focus-within,
#moov-card-number:focus-within,
#moov-card-expiry:focus-within,
#moov-card-cvv:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Apple Pay Button */
#apple-pay-button-container {
    margin: 16px 0;
    min-height: 48px;
}

/* Link Saved Payment Methods */
.saved-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.saved-payment-method {
    display: flex;
    align-items: center;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.saved-payment-method:hover {
    border-color: #d1d5db;
}

.saved-payment-method input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #00d924;
}

.saved-payment-method:has(input:checked) {
    border-color: #00d924;
    background: #f0fdf4;
}

.saved-payment-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.payment-type {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
}

.payment-last4 {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Form Section */
.form-section {
    margin-top: 16px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.form-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
}

/* Terms Checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.terms-checkbox label {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    cursor: pointer;
}

.terms-link {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s;
}

.terms-link:hover {
    color: #2563eb;
}

/* Program Selection */
.program-selection,
.cycle-selection {
    margin-bottom: 32px;
}

.program-option,
.cycle-option {
    display: block;
    margin-bottom: 12px;
    cursor: pointer;
}

.program-option input[type="radio"],
.cycle-option input[type="radio"] {
    display: none;
}

.program-content,
.cycle-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
}

.program-option input[type="radio"]:checked + .program-content,
.cycle-option input[type="radio"]:checked + .cycle-content {
    border-color: #3b82f6;
    background: #eff6ff;
}

.program-option:hover .program-content,
.cycle-option:hover .cycle-content {
    border-color: #3b82f6;
}

.program-icon,
.cycle-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.program-info {
    flex: 1;
}

.program-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.program-description {
    font-size: 13px;
    color: #6b7280;
}

.cycle-label {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
}

/* Submit Button */
.submit-btn {
    background: #0066ff;
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.submit-btn:hover {
    background: #0052cc;
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Payment Disclaimer */
.payment-disclaimer {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
    margin-top: 16px;
    text-align: center;
}

/* Success Card Styles */
.success-card {
    background: white;
    border-radius: 12px;
    padding: 60px 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    text-align: center;
    animation: fadeIn 0.5s ease;
}

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

.success-icon {
    margin-bottom: 30px;
}

.checkmark-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #e8f5e9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.checkmark-large {
    color: #4caf50;
    font-size: 50px;
    font-weight: bold;
}

.success-title {
    color: #1e3a5f;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.success-message {
    color: #374151;
    font-size: 16px;
    margin-bottom: 8px;
}

.success-submessage {
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .payment-layout {
        grid-template-columns: 1fr;
    }

    .order-summary {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
}

@media (max-width: 768px) {
    .container {
        margin: 20px auto;
    }

    .order-summary,
    .payment-form-container {
        padding: 30px 24px;
    }

    .amount-display {
        font-size: 36px;
    }

    .success-card {
        padding: 40px 30px;
    }

    .success-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .order-summary,
    .payment-form-container {
        padding: 24px 20px;
    }

    .amount-display {
        font-size: 32px;
    }

    .payment-layout {
        border-radius: 8px;
    }
}
