/* =========================================================
   AIRSWAP PURCHASE MODAL
   Brand Colors
   Navy  : #160B68
   Green : #279B48
   Orange: #F79400
========================================================= */


/* =========================================================
   OVERLAY
========================================================= */

.purchase-overlay {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    z-index: 99999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    box-sizing: border-box;

    background: rgba(10, 8, 35, 0.62);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    animation: purchaseOverlayIn 0.2s ease;
}


/* =========================================================
   MODAL
========================================================= */

.purchase-modal {
    --airswap-navy: #160B68;
    --airswap-green: #279B48;
    --airswap-orange: #F79400;

    position: relative;

    width: 100%;

    max-width: 650px;

    /*
       Important for mobile:
       The modal cannot become taller than the screen.
    */
    max-height: calc(100dvh - 40px);

    overflow-y: auto;

    padding: 34px;

    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #ffffff 70%,
            #f5fbf7 100%
        );

    border: 1px solid rgba(255, 255, 255, 0.9);

    box-shadow:
        0 30px 80px rgba(22, 11, 104, 0.28);

    font-family: "Livvic", sans-serif;

    box-sizing: border-box;

    animation: purchaseModalIn 0.25s ease;

    /*
       Keeps scrollbar neat
    */
    scrollbar-width: thin;

    scrollbar-color:
        rgba(22, 11, 104, 0.2)
        transparent;
}


/* Chrome / Edge scrollbar */

.purchase-modal::-webkit-scrollbar {
    width: 5px;
}


.purchase-modal::-webkit-scrollbar-track {
    background: transparent;
}


.purchase-modal::-webkit-scrollbar-thumb {
    background: rgba(22, 11, 104, 0.18);

    border-radius: 10px;
}


/* =========================================================
   DECORATIVE AIRSWAP GRADIENT
========================================================= */

.purchase-modal::before {

    content: "";

    position: absolute;

    top: -110px;
    right: -100px;

    width: 250px;
    height: 250px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            rgba(39, 155, 72, 0.14),
            rgba(247, 148, 0, 0.06),
            transparent
        );

    pointer-events: none;
}


.purchase-modal::after {

    content: "";

    position: absolute;

    bottom: -100px;
    left: -120px;

    width: 260px;
    height: 190px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            rgba(22, 11, 104, 0.07),
            rgba(247, 148, 0, 0.10),
            transparent
        );

    pointer-events: none;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.purchase-close {

    position: absolute;

    top: 22px;
    right: 22px;

    z-index: 20;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 1px solid #e0e6f1;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f3f6fb
        );

    color: var(--airswap-navy);

    font-size: 17px;

    cursor: pointer;

    display: flex;

    align-items: center;
    justify-content: center;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.purchase-close:hover {

    background: var(--airswap-navy);

    color: #ffffff;

    transform: rotate(90deg);

}


/* =========================================================
   MODAL HEADER
========================================================= */

.purchase-modal-header {

    position: relative;

    z-index: 2;

    margin-bottom: 24px;

    padding-right: 55px;
}


.purchase-modal-header h2 {

    margin: 0;

    color: var(--airswap-navy);

    font-size: 34px;

    font-weight: 800;

    line-height: 1.15;

    letter-spacing: -1px;
}


.purchase-modal-header h2 span {

    color: var(--airswap-green);

}


.purchase-modal-header p {

    margin: 8px 0 0;

    color: #697697;

    font-size: 15px;

    line-height: 1.5;
}


/* =========================================================
   HEADER ACCENT
========================================================= */

.purchase-accent {

    width: 180px;

    height: 5px;

    margin-top: 15px;

    overflow: hidden;

    border-radius: 10px;

    background: #e8edf5;
}


.purchase-accent span {

    display: block;

    width: 100%;

    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--airswap-orange) 0%,
            var(--airswap-orange) 38%,
            var(--airswap-green) 38%,
            var(--airswap-green) 100%
        );
}


/* =========================================================
   SELECTED BUNDLE
========================================================= */

.selected-bundle {

    position: relative;

    z-index: 2;

    display: flex;

    align-items: center;

    gap: 17px;

    min-height: 125px;

    padding: 20px;

    margin-bottom: 24px;

    border-radius: 16px;

    border: 1px solid rgba(39, 155, 72, 0.20);

    background:
        linear-gradient(
            135deg,
            #f0fbf4 0%,
            #f8fcff 72%,
            #fff8ec 100%
        );

    box-sizing: border-box;
}


/* =========================================================
   SELECTED BUNDLE ICON
========================================================= */

.selected-bundle-icon {

    width: 68px;
    height: 68px;

    min-width: 68px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #d8f4e1,
            #eaf9ef
        );

    color: var(--airswap-green);

    font-size: 27px;
}


/* =========================================================
   SELECTED BUNDLE INFORMATION
========================================================= */

.selected-bundle-info {

    flex: 1;

    min-width: 0;
}


.selected-bundle-info h3 {

    margin: 0 0 4px;

    color: var(--airswap-navy);

    font-size: 22px;

    font-weight: 800;

    line-height: 1.25;
}


.selected-bundle-info p {

    margin: 0 0 8px;

    color: #657398;

    font-size: 14px;
}


.selected-validity {

    display: flex;

    align-items: center;

    gap: 7px;

    color: #52648a;

    font-size: 13px;
}


.selected-validity i {

    color: var(--airswap-navy);

}


/* =========================================================
   SELECTED PRICE
========================================================= */

.selected-bundle-price {

    padding-left: 24px;

    min-width: 90px;

    border-left: 1px solid #d6e6dc;

    display: flex;

    flex-direction: column;

    align-items: center;
}


.selected-bundle-price span {

    color: #657398;

    font-size: 12px;

    font-weight: 700;
}


.selected-bundle-price strong {

    color: var(--airswap-navy);

    font-size: 36px;

    font-weight: 800;

    line-height: 1;
}


/* =========================================================
   PURCHASE FIELD
========================================================= */

.purchase-field {

    position: relative;

    z-index: 2;

    margin-bottom: 22px;
}


.purchase-field label {

    display: block;

    margin-bottom: 8px;

    color: var(--airswap-navy);

    font-size: 14px;

    font-weight: 800;
}


/* =========================================================
   PHONE INPUT
========================================================= */

.purchase-phone {

    height: 56px;

    display: flex;

    align-items: center;

    overflow: hidden;

    border: 1px solid #d4ddeb;

    border-radius: 11px;

    background: #ffffff;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.purchase-phone:focus-within {

    border-color: var(--airswap-green);

    box-shadow:
        0 0 0 3px rgba(39, 155, 72, 0.08);
}


.country-code {

    height: 100%;

    min-width: 92px;

    padding: 0 15px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    border-right: 1px solid #e0e5ee;

    background: #f7f9fc;

    color: var(--airswap-navy);

    font-size: 15px;

    font-weight: 800;
}


.country-code i {

    font-size: 11px;
}


.purchase-phone input {

    flex: 1;

    width: 100%;

    height: 100%;

    padding: 0 16px;

    border: none;

    outline: none;

    background: transparent;

    color: var(--airswap-navy);

    font-family: inherit;

    font-size: 16px;

    box-sizing: border-box;
}


.purchase-phone input::placeholder {

    color: #9ba5ba;

}


/* =========================================================
   PAYMENT SUMMARY
========================================================= */

.payment-summary {

    position: relative;

    z-index: 2;

    display: flex;

    gap: 15px;

    padding: 18px;

    margin-bottom: 20px;

    border: 1px solid #dce5f1;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #f5f8ff,
            #fbfdff
        );

    box-sizing: border-box;
}


.summary-icon {

    width: 46px;
    height: 46px;

    min-width: 46px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #e5edff,
            #f1f5ff
        );

    color: var(--airswap-navy);

    font-size: 19px;
}


.summary-content {

    flex: 1;

    min-width: 0;
}


.summary-content h3 {

    margin: 0 0 10px;

    color: var(--airswap-navy);

    font-size: 16px;

    font-weight: 800;
}


.summary-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;
}


.summary-row span {

    color: #697697;

    font-size: 13px;
}


.summary-row strong {

    color: var(--airswap-navy);

    font-size: 14px;

    text-align: right;
}


.summary-divider {

    height: 1px;

    margin: 10px 0;

    background: #dce3ed;
}


.summary-row.total span {

    color: var(--airswap-navy);

    font-size: 14px;

    font-weight: 700;
}


.summary-row.total strong {

    color: var(--airswap-green);

    font-size: 20px;

    font-weight: 800;
}


/* =========================================================
   PROCEED PAYMENT BUTTON
========================================================= */

.proceed-payment {

    position: relative;

    z-index: 2;

    width: 100%;

    height: 56px;

    border: none;

    border-radius: 11px;

    background:
        linear-gradient(
            100deg,
            #279B48 0%,
            #21a74b 55%,
            #16883a 100%
        );

    color: #ffffff;

    font-family: inherit;

    font-size: 16px;

    font-weight: 800;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 13px;

    box-shadow:
        0 8px 20px rgba(39, 155, 72, 0.20);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.proceed-payment:hover {

    transform: translateY(-2px);

    background:
        linear-gradient(
            100deg,
            #21883f 0%,
            #279B48 55%,
            #147832 100%
        );

    box-shadow:
        0 12px 28px rgba(39, 155, 72, 0.28);
}


.proceed-payment i {

    font-size: 14px;

    transition:
        transform 0.2s ease;
}


.proceed-payment:hover i {

    transform: translateX(4px);

}


/* =========================================================
   SECURE PAYMENT
========================================================= */

.secure-payment {

    position: relative;

    z-index: 2;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    margin-top: 13px;

    color: #7b86a1;

    font-size: 11px;
}


.secure-payment i {

    color: var(--airswap-green);

}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes purchaseOverlayIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


@keyframes purchaseModalIn {

    from {

        opacity: 0;

        transform:
            translateY(20px)
            scale(0.97);

    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 700px) {

    .purchase-overlay {

        padding: 15px;

        align-items: center;

        justify-content: center;

    }


    .purchase-modal {

        max-width: 560px;

        max-height: calc(100dvh - 30px);

        padding: 28px 24px;

        border-radius: 22px;

    }


    .purchase-modal-header h2 {

        font-size: 30px;

    }


    .selected-bundle {

        min-height: 115px;

        padding: 16px;

    }


    .selected-bundle-icon {

        width: 60px;
        height: 60px;

        min-width: 60px;

        font-size: 23px;

    }


    .selected-bundle-info h3 {

        font-size: 19px;

    }


    .selected-bundle-price {

        min-width: 75px;

        padding-left: 15px;

    }


    .selected-bundle-price strong {

        font-size: 31px;

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 480px) {

    /*
       IMPORTANT:
       Keep modal centered on mobile.
       Do NOT use align-items: flex-end.
    */

    .purchase-overlay {

        position: fixed;

        inset: 0;

        width: 100%;

        height: 100vh;

        height: 100dvh;

        padding: 10px;

        display: flex;

        align-items: center;

        justify-content: center;

        overflow: hidden;

        box-sizing: border-box;

    }


    .purchase-modal {

        width: 100%;

        max-width: 390px;

        max-height: calc(100dvh - 20px);

        overflow-y: auto;

        padding: 24px 18px 20px;

        border-radius: 20px;

        box-sizing: border-box;

    }


    /* Close */

    .purchase-close {

        top: 16px;

        right: 16px;

        width: 37px;

        height: 37px;

        font-size: 15px;

    }


    /* Header */

    .purchase-modal-header {

        padding-right: 45px;

        margin-bottom: 18px;

    }


    .purchase-modal-header h2 {

        font-size: 25px;

        letter-spacing: -0.5px;

    }


    .purchase-modal-header p {

        font-size: 13px;

        line-height: 1.4;

    }


    .purchase-accent {

        width: 140px;

        height: 4px;

        margin-top: 12px;

    }


    /* Bundle */

    .selected-bundle {

        gap: 11px;

        min-height: 105px;

        padding: 13px;

        margin-bottom: 18px;

    }


    .selected-bundle-icon {

        width: 50px;

        height: 50px;

        min-width: 50px;

        font-size: 20px;

    }


    .selected-bundle-info h3 {

        margin-bottom: 3px;

        font-size: 16px;

    }


    .selected-bundle-info p {

        margin-bottom: 5px;

        font-size: 12px;

    }


    .selected-validity {

        gap: 5px;

        font-size: 11px;

    }


    .selected-bundle-price {

        min-width: 55px;

        padding-left: 8px;

    }


    .selected-bundle-price span {

        font-size: 10px;

    }


    .selected-bundle-price strong {

        font-size: 24px;

    }


    /* Field */

    .purchase-field {

        margin-bottom: 17px;

    }


    .purchase-field label {

        margin-bottom: 6px;

        font-size: 13px;

    }


    /* Phone */

    .purchase-phone {

        height: 52px;

        border-radius: 10px;

    }


    .country-code {

        min-width: 78px;

        padding: 0 11px;

        font-size: 14px;

    }


    .purchase-phone input {

        padding: 0 12px;

        font-size: 15px;

    }


    /* Summary */

    .payment-summary {

        gap: 10px;

        padding: 13px;

        margin-bottom: 17px;

        border-radius: 12px;

    }


    .summary-icon {

        width: 40px;

        height: 40px;

        min-width: 40px;

        font-size: 16px;

    }


    .summary-content h3 {

        margin-bottom: 8px;

        font-size: 14px;

    }


    .summary-row {

        gap: 10px;

    }


    .summary-row span {

        font-size: 11px;

    }


    .summary-row strong {

        max-width: 170px;

        font-size: 12px;

    }


    .summary-row.total span {

        font-size: 12px;

    }


    .summary-row.total strong {

        font-size: 18px;

    }


    .summary-divider {

        margin: 8px 0;

    }


    /* Payment */

    .proceed-payment {

        height: 52px;

        border-radius: 10px;

        font-size: 14px;

    }


    .secure-payment {

        margin-top: 10px;

        font-size: 10px;

    }

}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 360px) {

    .purchase-overlay {

        padding: 6px;

    }


    .purchase-modal {

        max-height: calc(100dvh - 12px);

        padding: 21px 14px 17px;

        border-radius: 17px;

    }


    .purchase-modal-header h2 {

        font-size: 22px;

    }


    .purchase-modal-header p {

        font-size: 12px;

    }


    .selected-bundle {

        gap: 8px;

        padding: 11px;

    }


    .selected-bundle-icon {

        width: 45px;

        height: 45px;

        min-width: 45px;

        font-size: 18px;

    }


    .selected-bundle-info h3 {

        font-size: 14px;

    }


    .selected-bundle-info p {

        font-size: 11px;

    }


    .selected-validity {

        font-size: 10px;

    }


    .selected-bundle-price {

        min-width: 48px;

        padding-left: 6px;

    }


    .selected-bundle-price strong {

        font-size: 21px;

    }


    .country-code {

        min-width: 70px;

        font-size: 13px;

    }


    .payment-summary {

        padding: 11px;

    }


    .summary-icon {

        width: 36px;

        height: 36px;

        min-width: 36px;

    }


    .proceed-payment {

        height: 49px;

        font-size: 13px;

    }

}