/* ============================================================
   1) GLOBAL MODAL BEHAVIOR
============================================================ */

/* Overlay (hidden by default) */
.mk-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Show modal */
.mk-modal-overlay.show {
    display: flex !important;
}

/* Base modal box */
.mk-modal-box {
    width: 100%;
    max-width: 400px;
    padding: 25px 30px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
    transform: scale(.95);
    opacity: 0;
    transition: .25s;
}

/* Animation when visible */
.mk-modal-overlay.show .mk-modal-box {
    transform: scale(1);
    opacity: 1;
}

/* Close button */
.mk-close-btn {
    position: absolute;
    top: 12px;
    left: 15px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 20px;
    color: #333;
    z-index: 10000;
    transition: .2s;
}

.mk-close-btn:hover i {
    color: #09775f;
    transform: scale(1.15);
}

/* ============================================================
   2) LOGIN MODAL
============================================================ */

#mkDonationLoginModal .mk-modal-box {
    width: 400px !important;
    max-width: 400px !important;
    padding: 20px 30px !important;
}

#mkDonationLoginModal h2 {
    font-size: 20px;
    color: #0a5c50;
    margin-bottom: 5px;
}

#mkDonationLoginModal p {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

#mkDonationLoginModal label {
    display: block;
    padding: 10px;
    text-align: right;
    font-weight: 500;
    color: #705f42;
    margin-bottom: 5px;
    box-sizing: border-box;
}

#mkDonationLoginModal input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    background: #fafafa;
    border-radius: 6px;
    text-align: center;
    font-size: 15px;
    box-sizing: border-box;
}

#mkDonationLoginModal .mk-btn {
    width: 100%;
    padding: 12px;
    background: #0a5c50;
    color: #fff;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 10px;
    box-sizing: border-box;
}

/* ============================================================
   3) OTP MODAL
============================================================ */

#mkOtpVerifyModal .mk-modal-box {
    width: 400px !important;
    max-width: 400px !important;
    padding: 20px 30px !important;
}

#mkOtpVerifyModal h2 {
    font-size: 20px;
    color: #0a5c50;
    margin-bottom: 5px;
}

#mkOtpVerifyModal p {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
}

.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    direction: ltr;
}

.otp-digit {
    width: 50px;
    height: 50px;
    border: 1px solid #c5dfd6;
    border-radius: 8px;
    font-size: 24px;
    text-align: center;
    color: #0a5c50;
    font-weight: 500;
    transition: .2s;
    margin-bottom: 10px;
}

.otp-digit:focus {
    outline: none;
    border-color: #0a5c50;
    box-shadow: 0 0 5px rgba(10,92,80,0.3);
}

#mkOtpVerifyModal .mk-btn {
    width: 100%;
    padding: 12px;
    background: #0a5c50;
    color: #fff;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 20px;
}

/* resend section */
#otpCountdownWrapper {
    margin-top: 12px;
    text-align: center;
    color: #705f42;
}

#otpCountdownWrapper b {
    color: #0a5c50;
}

#resendOtpLink {
    display: none;
    cursor: pointer;
    text-decoration: underline;
}

#resendOtpLink:hover {
    color: #09775f;
}

/* ============================================================
   4) MOYASAR PAYMENT MODAL
============================================================ */

/* Main modal box */
#mkMoyasarModal .mk-modal-box {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    padding: 28px 30px 20px;
    width: 400px;
    max-width: 92%;
    text-align: right;
}

/* Header */
#mkMoyasarModal h2 {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin-bottom: 15px;
}

/* Form labels */
#mkMoyasarModal .mk-modal-body label {
    display: block;
    text-align: right;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

/* All inputs */
#mkMoyasarModal .mk-modal-body input {
    width: 100%;
    max-width: 370px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d5dad7;
    background-color: #fafafa;
    margin: 0 auto 14px;
    font-size: 14px;
    transition: .2s;
}

/* LTR fixes for card fields */
#mkCardNumber,
#mkCardName,
#mkCardExp,
#mkCardCvv {
    direction: ltr !important;
    text-align: right !important;
    letter-spacing: .03em;
}

/* Payment icons row */
.mk-card-icons {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    margin: -5px 0 10px 0;
}

.mk-card-icons img {
    height: 12px;
    opacity: 0.9;
    transition: .2s;
}

.mk-card-icons img:hover {
    transform: scale(1.05);
    opacity: 1;
}

/* Pay button */
#mkPayNowBtn {
    width: 100%;
    padding: 12px;
    background-color: #0a5c50;
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    transition: .2s;
}

/* Footer text */
#mkMoyasarModal small {
    font-size: 13px;
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #777;
}

#mkMoyasarModal small b {
    color: #0a5c50;
}



/* ============================================================
   5) ERROR & SHAKE ANIMATION
============================================================ */

.mk-error-msg {
    display: block !important;
    margin-top: 5px;
    color: #d93025 !important;
    text-align: right;
    font-size: 14px;
    font-weight: 500;
}


.mk-required-field {
    border: 2px solid #d93025 !important;
    box-shadow: 0 0 3px rgba(217,48,37,0.4);
    border-radius: 8px;
}

/* Shake animation */
@keyframes mkShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

.mk-shake {
    animation: mkShake 0.3s;
}

/* ============================================================
   6) MOBILE RESPONSIVE - BIGGER SIZES
============================================================ */
@media (max-width: 992px) {
    /* Modal overlay - almost no padding for maximum width */
    .mk-modal-overlay {
        padding: 3px !important;
    }

    /* Base modal box - MAXIMUM WIDTH */
    .mk-modal-box {
        max-width: 99% !important;
        padding: 70px 60px !important;
        margin: 0 auto !important;
    }

    /* Login Modal - Mobile */
    #mkDonationLoginModal .mk-modal-box {
        width: 99% !important;
        max-width: 99% !important;
        padding: 65px 60px !important;
    }

    #mkDonationLoginModal h2 {
        font-size: 44px !important;
        margin-bottom: 25px !important;
    }

    #mkDonationLoginModal p {
        font-size: 34px !important;
        margin-bottom: 45px !important;
    }

    #mkDonationLoginModal label {
        font-size: 36px !important;
        margin-bottom: 20px !important;
        padding: 20px 15px !important;
    }

    #mkDonationLoginModal input {
        padding: 32px !important;
        font-size: 38px !important;
        border-radius: 16px !important;
        margin-bottom: 25px !important;
    }

    #mkDonationLoginModal .mk-btn {
        padding: 34px !important;
        font-size: 40px !important;
        margin-top: 40px !important;
        border-radius: 16px !important;
    }

    /* OTP Modal - Mobile */
    #mkOtpVerifyModal .mk-modal-box {
        width: 99% !important;
        max-width: 99% !important;
        padding: 65px 60px !important;
    }

    #mkOtpVerifyModal h2 {
        font-size: 44px !important;
        margin-bottom: 25px !important;
    }

    #mkOtpVerifyModal p {
        font-size: 34px !important;
        margin-bottom: 45px !important;
    }

    .otp-inputs {
        gap: 22px !important;
        margin-bottom: 25px !important;
    }

    .otp-digit {
        width: 100px !important;
        height: 100px !important;
        font-size: 48px !important;
        border-radius: 18px !important;
    }

    #mkOtpVerifyModal .mk-btn {
        padding: 34px !important;
        font-size: 40px !important;
        margin-top: 45px !important;
        border-radius: 16px !important;
    }

    #otpCountdownWrapper {
        font-size: 32px !important;
        margin-top: 40px !important;
    }

    #resendOtpLink {
        font-size: 34px !important;
    }

    /* Moyasar Payment Modal - Mobile - WIDER */
    #mkMoyasarModal .mk-modal-box {
        width: 99% !important;
        max-width: 99% !important;
        padding: 70px 60px 60px !important;
        text-align: right !important;
        border-radius: 20px !important;
        margin: 0 auto !important;
    }

    #mkMoyasarModal h2 {
        font-size: 44px !important;
        margin-bottom: 45px !important;
        text-align: center !important;
        font-weight: 700 !important;
    }

    #mkMoyasarModal .mk-modal-body {
        text-align: right !important;
    }

    #mkMoyasarModal .mk-modal-body label {
        font-size: 36px !important;
        margin-bottom: 18px !important;
        text-align: right !important;
        font-weight: 500 !important;
    }

    #mkMoyasarModal .mk-modal-body input {
        padding: 28px 22px !important;
        font-size: 36px !important;
        margin-bottom: 30px !important;
        border-radius: 16px !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        text-align: right !important;
        box-sizing: border-box !important;
        border: 1px solid #d5dad7 !important;
    }

    /* Card name - center aligned */
    #mkCardName {
        text-align: center !important;
    }

    /* Card number - left aligned with spacing */
    #mkCardNumber {
        text-align: left !important;
        letter-spacing: 0.15em !important;
    }

    /* CVV and Expiry - centered */
    #mkCardExp,
    #mkCardCvv {
        text-align: center !important;
    }

    .mk-card-icons {
        gap: 16px !important;
        margin: -10px 0 28px 0 !important;
        justify-content: flex-start !important;
    }

    .mk-card-icons img {
        height: 32px !important;
    }

    #mkPayNowBtn {
        padding: 32px !important;
        font-size: 40px !important;
        border-radius: 16px !important;
        font-weight: 700 !important;
        margin-top: 20px !important;
    }

    #mkMoyasarModal small {
        font-size: 28px !important;
        margin-top: 28px !important;
        line-height: 2 !important;
        text-align: center !important;
    }

    /* Close button */
    .mk-close-btn {
        font-size: 40px !important;
        top: 25px !important;
        left: 30px !important;
    }

    /* Error messages */
    .mk-error-msg {
        font-size: 30px !important;
        margin-top: 18px !important;
    }
}

/* For tablets */
@media (min-width: 768px) and (max-width: 992px) {
    #mkMoyasarModal .mk-modal-box {
        width: 92% !important;
        max-width: 800px !important;
    }
}