/**
 * Black Friday coupon popup.
 * Scoped with the .bfc- prefix so it cannot affect existing popups.
 */

.bfc-overlay {
    display: none;
    position: fixed;
    z-index: 10000000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.8);
}

.bfc-overlay.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bfc-modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: auto;
    padding: 32px;
    box-sizing: border-box;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    font-family: "Inter", sans-serif !important;
    animation: bfc-fade-in 200ms ease-out;
}

@keyframes bfc-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.bfc-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.bfc-close:focus-visible,
.bfc-button:focus-visible,
.bfc-field input:focus-visible {
    outline: 2px solid #26BC6A;
    outline-offset: 2px;
}

.bfc-step[hidden] {
    display: none !important;
}

.bfc-title {
    margin: 0 40px 8px 0;
    color: #26404E;
    font-family: "Inter", sans-serif !important;
    font-size: 24px;
    font-weight: 700;
    line-height: 34px;
}

.bfc-description {
    margin: 0 0 24px;
    color: #6F6C90;
    font-family: "Inter", sans-serif !important;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.bfc-field label {
    display: block;
    margin-bottom: 8px;
    color: #26404E;
    font-family: "Inter", sans-serif !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.bfc-field input {
    width: 100%;
    padding: 14px 16px;
    box-sizing: border-box;
    border: 1px solid #D1D2DB;
    border-radius: 4px;
    color: #26404E;
    font-family: "Inter", sans-serif !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.bfc-field input::placeholder {
    color: #85949C;
    opacity: 1;
    font-weight: 500;
}

.bfc-field input:focus {
    border-color: #26BC6A;
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 188, 106, 0.15);
}

.bfc-field input.is-invalid {
    border-color: #FF5656;
}

.bfc-input-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.bfc-input-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.bfc-message {
    min-height: 20px;
    margin: 8px 0 0;
    color: #FF5656;
    font-family: "Inter", sans-serif !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.bfc-message.is-success {
    color: #26BC6A;
}

.bfc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 18px;
    padding: 12px 16px;
    border: 1px solid #26BC6A;
    border-radius: 4px;
    background-color: #26BC6A;
    color: #FFFFFF;
    font-family: "Inter", sans-serif !important;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.bfc-button:hover {
    border-color: #219653;
    background-color: #219653;
}

.bfc-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.bfc-input-row .bfc-button {
    flex: 0 0 auto;
    width: auto;
    margin-top: 0;
    padding: 12px;
    white-space: nowrap;
    font-size: 14px;
    max-height: 50px;
}

.bfc-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: bfc-spin 700ms linear infinite;
}

.bfc-submit.is-loading .bfc-loader {
    display: inline-block;
}

.bfc-code-row {
    padding: 16px;
    box-sizing: border-box;
    border: 1px dashed #26BC6A;
    border-radius: 8px;
    background: #E2FFEF;
    text-align: center;
}

.bfc-code {
    display: inline-block;
    color: #075E42;
    font-family: "Inter", sans-serif !important;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 32px;
    user-select: all;
}

.bfc-countdown {
    margin: 14px 0 0;
    color: #6F6C90;
    font-family: "Inter", sans-serif !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .bfc-overlay {
        padding: 16px;
    }

    .bfc-modal {
        max-width: 440px;
        padding: 24px;
    }

    .bfc-title {
        font-size: 24px;
        line-height: 32px;
    }
}

@media (max-width: 480px) {
    .bfc-overlay {
        padding: 12px;
    }

    .bfc-modal {
        padding: 20px;
        border-radius: 8px;
    }

    .bfc-title {
        margin-right: 32px;
        font-size: 22px;
        line-height: 30px;
    }

    .bfc-description {
        margin-bottom: 20px;
        font-size: 15px;
        line-height: 22px;
    }

    .bfc-input-row {
        flex-direction: column;
    }

    .bfc-input-row .bfc-button {
        width: 100%;
    }

    .bfc-code {
        font-size: 20px;
        letter-spacing: 1px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bfc-modal {
        animation: none;
    }

    .bfc-loader {
        animation-duration: 1200ms;
    }

    .bfc-button,
    .bfc-field input {
        transition: none;
    }
}