/* =========================================================
   ELIMUKENYAHUB
   SUBSCRIPTION / MANUAL M-PESA POPUP
   PROFESSIONAL RESPONSIVE DESIGN
   ========================================================= */


/* =========================================================
   OVERLAY
   ========================================================= */

.subscription-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;
    box-sizing: border-box;

    background: rgba(8, 28, 69, 0.86);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    z-index: 2147483647;

    overflow: hidden;

    animation: subscriptionOverlayIn 0.25s ease;
}


/* =========================================================
   POPUP
   ========================================================= */

.subscription-popup {
    position: relative;

    width: min(100%, 500px);
    max-height: calc(100dvh - 36px);

    overflow-y: auto;
    overflow-x: hidden;

    box-sizing: border-box;

    padding: 28px;

    background: #ffffff;

    border: 1px solid rgba(10, 46, 109, 0.08);

    border-radius: 20px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.30),
        0 8px 25px rgba(8, 28, 69, 0.12);

    animation: subscriptionPopupIn 0.35s cubic-bezier(.22, 1, .36, 1);

    scrollbar-width: thin;
    scrollbar-color: #c8d2df transparent;
}


/* Chrome scrollbar */

.subscription-popup::-webkit-scrollbar {
    width: 6px;
}

.subscription-popup::-webkit-scrollbar-track {
    background: transparent;
}

.subscription-popup::-webkit-scrollbar-thumb {
    background: #c8d2df;
    border-radius: 20px;
}

.subscription-popup::-webkit-scrollbar-thumb:hover {
    background: #98a7b8;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes subscriptionOverlayIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


@keyframes subscriptionPopupIn {

    from {
        opacity: 0;
        transform: translateY(25px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================================
   CLOSE / LOCK BUTTON
   ========================================================= */

.subscription-close {
    position: absolute;

    top: 14px;
    right: 14px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #e4e9ef;
    border-radius: 50%;

    background: #f6f8fa;

    color: #081c45;

    font-size: 14px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}


.subscription-close:hover {
    background: #081c45;

    color: #ffffff;

    border-color: #081c45;

    transform: rotate(8deg);
}


.subscription-close:focus-visible {
    outline: 3px solid rgba(10, 46, 109, 0.18);
    outline-offset: 2px;
}


/* =========================================================
   HEADER
   ========================================================= */

.subscription-header {
    text-align: center;

    padding: 4px 35px 20px;
}


.subscription-icon {
    width: 58px;
    height: 58px;

    margin: 0 auto 13px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #eaf7e5,
        #f3faef
    );

    color: #4caf28;

    font-size: 25px;

    box-shadow:
        0 8px 20px rgba(76, 175, 40, 0.12);
}


.subscription-header h2 {
    margin: 0 0 7px;

    color: #081c45;

    font-size: 24px;
    line-height: 1.25;

    font-weight: 800;

    letter-spacing: -0.3px;
}


.subscription-header p {
    max-width: 380px;

    margin: 0 auto;

    color: #667085;

    font-size: 13px;

    line-height: 1.55;
}


/* =========================================================
   PLAN CARD
   ========================================================= */

.subscription-plan {
    margin: 2px 0 20px;
}


.plan-card {
    position: relative;

    overflow: hidden;

    padding: 18px 20px;

    background:
        linear-gradient(
            135deg,
            #f7fbff 0%,
            #eef8ea 100%
        );

    border: 1px solid #d9e8da;

    border-radius: 15px;

    box-sizing: border-box;
}


/* Decorative circle */

.plan-card::after {
    content: "";

    position: absolute;

    width: 90px;
    height: 90px;

    top: -45px;
    right: -30px;

    border-radius: 50%;

    background: rgba(76, 175, 40, 0.08);

    pointer-events: none;
}


.plan-card h3 {
    position: relative;
    z-index: 1;

    margin: 0 0 4px;

    color: #0a2e6d;

    font-size: 17px;

    font-weight: 800;
}


.plan-price {
    position: relative;
    z-index: 1;

    margin-bottom: 13px;

    color: #081c45;

    font-size: 26px;

    line-height: 1;

    font-weight: 800;

    letter-spacing: -0.5px;
}


.plan-price span {
    color: #667085;

    font-size: 12px;

    font-weight: 500;

    letter-spacing: 0;
}


/* =========================================================
   PLAN FEATURES
   ========================================================= */

.plan-card ul {
    position: relative;
    z-index: 1;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 8px 18px;

    padding: 0;
    margin: 0;

    list-style: none;
}


.plan-card li {
    display: flex;
    align-items: center;

    gap: 7px;

    min-width: 0;

    color: #475467;

    font-size: 12px;

    line-height: 1.4;
}


.plan-card li i {
    flex: 0 0 auto;

    color: #4caf28;

    font-size: 10px;
}


/* =========================================================
   MANUAL PAYMENT INSTRUCTIONS
   ========================================================= */

.manual-payment-instructions {
    margin: 0 0 17px;

    padding: 0;
}


.manual-payment-instructions h3 {
    display: flex;
    align-items: center;

    gap: 9px;

    margin: 0 0 7px;

    color: #081c45;

    font-size: 20px;

    line-height: 1.25;

    font-weight: 800;

    letter-spacing: -0.2px;
}


.manual-payment-instructions h3 i {
    color: #111111;

    font-size: 20px;
}


.manual-payment-instructions > p {
    margin: 0 0 3px;

    color: #667085;

    font-size: 12px;

    line-height: 1.5;
}


/* =========================================================
   MPESA NUMBER
   ========================================================= */

.mpesa-number {
    display: inline-flex;
    align-items: center;

    margin: 0 0 5px;

    padding: 0;

    color: #0a2e6d;

    font-size: 16px;

    line-height: 1.3;
}


.mpesa-number strong {
    font-weight: 800;

    letter-spacing: 0.3px;
}


/* =========================================================
   PAYMENT AMOUNT
   ========================================================= */

.payment-amount {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 5px;

    margin: 0 0 6px;

    color: #344054;

    font-size: 12px;

    line-height: 1.4;
}


.payment-amount strong {
    color: #081c45;

    font-weight: 800;
}


/* =========================================================
   INSTRUCTIONS LIST
   ========================================================= */

.manual-payment-instructions ol {
    margin: 4px 0 0;

    padding-left: 20px;

    color: #344054;

    font-size: 12px;

    line-height: 1.55;
}


.manual-payment-instructions li {
    padding-left: 2px;

    margin-bottom: 2px;
}


.manual-payment-instructions li:last-child {
    margin-bottom: 0;
}


.manual-payment-instructions li strong {
    color: #081c45;

    font-weight: 800;
}


/* =========================================================
   FORM
   ========================================================= */

#subscriptionForm {
    width: 100%;

    margin: 0;

    box-sizing: border-box;
}


#subscriptionForm label {
    display: block;

    margin: 0 0 6px;

    color: #344054;

    font-size: 12px;

    line-height: 1.3;

    font-weight: 700;
}


#subscriptionForm input {
    display: block;

    width: 100%;
    height: 46px;

    box-sizing: border-box;

    margin: 0 0 8px;

    padding: 0 13px;

    border: 1px solid #d0d5dd;

    border-radius: 9px;

    outline: none;

    background: #ffffff;

    color: #101828;

    font-family: inherit;

    font-size: 13px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


#subscriptionForm input::placeholder {
    color: #98a2b3;
}


#subscriptionForm input:hover {
    border-color: #b9c3cf;
}


#subscriptionForm input:focus {
    border-color: #0a2e6d;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(10, 46, 109, 0.09);
}


#subscriptionForm input:invalid:not(:placeholder-shown) {
    border-color: #d92d20;
}


#subscriptionForm input:focus:invalid:not(:placeholder-shown) {
    box-shadow:
        0 0 0 3px rgba(217, 45, 32, 0.08);
}


/* =========================================================
   PAYMENT HELP
   ========================================================= */

.payment-help {
    display: block;

    margin: -2px 0 10px;

    color: #667085;

    font-size: 10.5px;

    line-height: 1.5;
}


/* =========================================================
   PAYMENT MESSAGE
   ========================================================= */

.payment-message {
    width: 100%;

    box-sizing: border-box;

    margin: 10px 0;

    padding: 10px 12px;

    border-radius: 8px;

    font-size: 12px;

    line-height: 1.45;

    font-weight: 600;

    text-align: center;
}


.payment-message i {
    margin-right: 5px;
}


.payment-success {
    background: #ecfdf3;

    color: #027a48;

    border: 1px solid #abefc6;
}


.payment-error {
    background: #fef3f2;

    color: #b42318;

    border: 1px solid #fecdca;
}


.payment-loading {
    background: #eff8ff;

    color: #175cd3;

    border: 1px solid #b2ddff;
}


/* =========================================================
   HIDDEN
   ========================================================= */

.d-none {
    display: none !important;
}


/* =========================================================
   SUBMIT BUTTON
   ========================================================= */

.subscription-btn {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 46px;

    margin: 0;

    padding: 0 16px;

    box-sizing: border-box;

    border: none;

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            #4caf28,
            #3f9f21
        );

    color: #ffffff;

    font-family: inherit;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 0.1px;

    cursor: pointer;

    box-shadow:
        0 6px 14px rgba(76, 175, 40, 0.20);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}


.subscription-btn i {
    margin-right: 7px;

    font-size: 13px;
}


.subscription-btn:hover {
    background:
        linear-gradient(
            135deg,
            #439f23,
            #368c1c
        );

    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(76, 175, 40, 0.27);
}


.subscription-btn:active {
    transform: translateY(0);

    box-shadow:
        0 4px 10px rgba(76, 175, 40, 0.18);
}


.subscription-btn:disabled {
    opacity: 0.65;

    cursor: not-allowed;

    transform: none;

    box-shadow: none;
}


/* =========================================================
   VERIFICATION NOTICE
   ========================================================= */

.verification-notice {
    display: flex;
    align-items: flex-start;

    gap: 6px;

    margin-top: 9px;

    padding: 0;

    color: #475467;

    font-size: 10.5px;

    line-height: 1.5;
}


.verification-notice i {
    flex: 0 0 auto;

    margin-top: 2px;

    color: #344054;

    font-size: 11px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 700px) {

    .subscription-overlay {
        padding: 14px;
    }

    .subscription-popup {
        width: min(100%, 470px);

        max-height: calc(100dvh - 28px);

        padding: 24px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 520px) {

    .subscription-overlay {
        align-items: center;

        padding: 10px;
    }


    .subscription-popup {
        width: 100%;

        max-height: calc(100dvh - 20px);

        padding: 22px 18px;

        border-radius: 16px;
    }


    .subscription-close {
        top: 11px;
        right: 11px;

        width: 33px;
        height: 33px;

        font-size: 12px;
    }


    .subscription-header {
        padding: 2px 28px 17px;
    }


    .subscription-icon {
        width: 52px;
        height: 52px;

        margin-bottom: 10px;

        font-size: 22px;
    }


    .subscription-header h2 {
        font-size: 21px;
    }


    .subscription-header p {
        font-size: 12px;
    }


    .plan-card {
        padding: 16px;
    }


    .plan-price {
        font-size: 24px;
    }


    .manual-payment-instructions h3 {
        font-size: 19px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .subscription-overlay {
        padding: 7px;
    }


    .subscription-popup {
        max-height: calc(100dvh - 14px);

        padding: 19px 15px;

        border-radius: 14px;
    }


    .subscription-header {
        padding-left: 24px;
        padding-right: 24px;
    }


    .subscription-header h2 {
        font-size: 20px;
    }


    .subscription-header p {
        font-size: 11.5px;
    }


    .plan-card {
        padding: 14px;
    }


    .plan-card h3 {
        font-size: 16px;
    }


    .plan-price {
        font-size: 23px;
    }


    .plan-card ul {
        grid-template-columns: 1fr 1fr;

        gap: 7px 10px;
    }


    .plan-card li {
        font-size: 10.5px;
    }


    .manual-payment-instructions h3 {
        font-size: 18px;
    }


    .manual-payment-instructions > p,
    .manual-payment-instructions ol {
        font-size: 11px;
    }


    .mpesa-number {
        font-size: 15px;
    }


    #subscriptionForm input {
        height: 44px;

        font-size: 12px;
    }


    .subscription-btn {
        min-height: 44px;

        font-size: 11.5px;
    }


    .verification-notice {
        font-size: 10px;
    }

}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 340px) {

    .subscription-popup {
        padding: 17px 13px;
    }


    .subscription-header {
        padding-left: 20px;
        padding-right: 20px;
    }


    .subscription-icon {
        width: 46px;
        height: 46px;

        font-size: 19px;
    }


    .subscription-header h2 {
        font-size: 18px;
    }


    .plan-card ul {
        grid-template-columns: 1fr;
    }


    .manual-payment-instructions h3 {
        font-size: 17px;
    }


    .manual-payment-instructions ol {
        padding-left: 18px;
    }


    .subscription-btn {
        font-size: 10.5px;
    }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .subscription-overlay,
    .subscription-popup,
    .subscription-btn,
    .subscription-close {
        animation: none !important;

        transition: none !important;
    }

}