/* Affirm Modal CSS */

/* Overlay */
.affirm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* Modal Container */
.affirm-modal {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #F4F4F4;
    border-radius: 12px;
    max-width: 500px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 140px);
    z-index: 1001;
    pointer-events: auto;
    overflow: hidden;
}

/* Modal Content */
.affirm-modal-content {
    padding: 24px 12px 24px 24px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    box-sizing: border-box;
}

/* Close Button */
.affirm-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.affirm-close-btn:hover {
    background-color: #f0f0f0;
}

/* Header */
.affirm-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.affirm-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.affirm-logo-container {
    flex: 1;
}

.affirm-title {
    font-family: "Proxima Nova", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #1C1C1C;
}

.affirm-subtitle {
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    color: #68788E;
    margin: 0;
}

/* Price Section */
.affirm-price-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.affirm-price-label {
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    color: #1C1C1C;
}

.affirm-price-input-container {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: white;
    border: 1px solid #E5E5E5;
    padding: 8px 16px;
    border-radius: 24px;
}

.affirm-price-currency {
    font-family: "Proxima Nova", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1C1C1C;
}

.affirm-price-input {
    border: none;
    background: transparent;
    font-family: "Proxima Nova", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1C1C1C;
    width: 100px;
    outline: none;
}

.affirm-price-edit-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
}

/* Payment Plans */
.affirm-payment-plans {
    background-color: white;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    color: #1C1C1C;
    margin-bottom: 24px;
}

.affirm-plan {
    border-bottom: 1px solid #E5E5E5;
    padding: 16px;
}

.affirm-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.affirm-plan-price {
    font-family: "Proxima Nova", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #BE930B;
}

.affirm-plan-frequency {
    font-size: 14px;
    font-weight: 400;
    margin-left: 4px;
}

.affirm-plan-term {
    background-color: #BE930B;
    color: white;
    font-family: "Proxima Nova", sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.affirm-plan-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.affirm-plan-detail {
    display: flex;
    justify-content: space-between;
}

.affirm-detail-label {
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
}

.affirm-detail-value {
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    color: #1C1C1C;
    font-weight: 600;
}

.affirm-see-details-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 12px;
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.affirm-see-details-btn svg {
    transition: transform 0.2s ease;
}

.affirm-see-details-btn.expanded svg {
    transform: rotate(180deg);
}

/* Details Expandable Content */
.affirm-details-content {
    display: none;
    padding: 0 12px 12px;
}

.affirm-details-content.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

.affirm-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    color: #1C1C1C;
}

.affirm-detail-item svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* CTA Button */
.affirm-cta-btn {
    width: 100%;
    padding: 16px;
    background-color: #BE930B;
    color: white;
    font-family: "Proxima Nova", sans-serif;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 28px;
    cursor: pointer;
    margin-bottom: 24px;
    transition: background-color 0.2s ease;
}

.affirm-cta-btn:hover {
    background-color: #be9d2e;
}

/* How it works */
.affirm-how-it-works {
    padding-top: 20px;
    border-top: 1px solid #E5E5E5;
}

.affirm-how-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}

.affirm-how-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.affirm-how-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.affirm-how-title {
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1C1C1C;
}

.affirm-how-logo {
    flex-shrink: 0;
}

.affirm-carousel-prev,
.affirm-carousel-next {
    width: 36px;
    height: 36px;
    border: 1px solid #E5E5E5;
    background-color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.affirm-carousel-prev:hover,
.affirm-carousel-next:hover {
    background-color: #F4F4F4;
    border-color: #CCCCCC;
}

.affirm-steps-container {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.affirm-step {
    display: none;
    flex: 1;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background-color: #FFF;
    padding: 20px;
    border-radius: 8px;
}

.affirm-step.active {
    display: flex;
}

.affirm-step-number {
    width: 32px;
    height: 32px;
    background-color: white;
    color: #BE930B;
    border: 2px solid #BE930B;
    font-family: "Proxima Nova", sans-serif;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.affirm-step-text {
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    color: #1C1C1C;
    text-align: center;
    margin: 0;
}

.affirm-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.affirm-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #E5E5E5;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.affirm-indicator.active {
    background-color: #1C1C1C;
}

/* Legal Disclaimer */
.affirm-legal {
    margin-top: 16px;
}

.affirm-legal p {
    font-family: "Proxima Nova", sans-serif;
    font-size: 12px;
    color: #1C1C1C;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.affirm-legal p:last-child {
    margin-bottom: 0;
}

.affirm-link {
    color: #1C1C1C;
    text-decoration: underline;
}

.affirm-link:hover {
    color: #BE930B;
}

/* Login View */
.affirm-login-view {
    margin-top: 24px;
}

.affirm-login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.affirm-login-logo-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.affirm-back-btn,
.affirm-help-btn {
    width: 36px;
    height: 36px;
    border: none;
    background-color: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.affirm-back-btn:hover,
.affirm-help-btn:hover {
    background-color: #E5E5E5;
}

.affirm-partnership {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
}

.affirm-partnership span {
    font-family: "Proxima Nova", sans-serif;
    font-size: 12px;
    color: #68788E;
}

.affirm-partner-name {
    font-weight: 600;
    color: #1C1C1C !important;
}

.affirm-login-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.affirm-login-title {
    font-family: "Proxima Nova", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #1C1C1C;
    margin: 0;
}

.affirm-login-description {
    font-family: "Proxima Nova", sans-serif;
    font-size: 16px;
    color: #1C1C1C;
    margin: 0;
}

.affirm-login-notice {
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    color: #68788E;
    margin: 0;
    line-height: 1.5;
}

.affirm-login-notice strong {
    color: #1C1C1C;
    font-weight: 600;
}

.affirm-phone-input-container {
    background-color: white;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    padding: 0 16px;
}

.affirm-phone-input {
    width: 100%;
    padding: 14px 0;
    font-family: "Proxima Nova", sans-serif;
    font-size: 16px;
    color: #1C1C1C;
    border: none;
    outline: none;
    background: transparent;
}

.affirm-phone-input::placeholder {
    color: #68788E;
}

.affirm-phone-hint {
    font-family: "Proxima Nova", sans-serif;
    font-size: 12px;
    color: #68788E;
    margin: 0;
    line-height: 1.5;
}

.affirm-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.affirm-remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.affirm-remember-me span {
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    color: #1C1C1C;
}

.affirm-continue-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background-color: #BE930B;
    color: white;
    font-family: "Proxima Nova", sans-serif;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 28px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.affirm-continue-btn:hover {
    background-color: #333333;
}

.affirm-login-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.affirm-login-link {
    font-family: "Proxima Nova", sans-serif;
    font-size: 14px;
    color: #1C1C1C;
    text-decoration: underline;
}

.affirm-login-link:hover {
    color: #BE930B;
}

.affirm-passkey-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.affirm-passkey-divider::before,
.affirm-passkey-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #E5E5E5;
}

.affirm-passkey-divider span {
    font-family: "Proxima Nova", sans-serif;
    font-size: 12px;
    color: #68788E;
}

.affirm-passkey-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background-color: white;
    color: #BE930B;
    font-family: "Proxima Nova", sans-serif;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #BE930B;
    border-radius: 28px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.affirm-passkey-btn:hover {
    background-color: #BE930B;
    color: white;
}

.affirm-terms {
    font-family: "Proxima Nova", sans-serif;
    font-size: 12px;
    color: #68788E;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

.affirm-term-link {
    color: #1C1C1C;
    text-decoration: underline;
}

.affirm-term-link:hover {
    color: #BE930B;
}

/* Responsive */
@media (max-width: 767px) {
    .affirm-modal {
        padding: 16px;
        border-radius: 8px;
    }

    .affirm-title {
        font-size: 20px;
    }

    .affirm-price-section {
        flex-direction: row;
        gap: 12px;
        align-items: center;
    }

    .affirm-plan-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .affirm-step {
        min-width: auto;
        width: 100%;
    }
}