/* =========================================================
   MKH Check Payment - Mobile Layout
   Mobile-only overrides
   ========================================================= */

@media (max-width: 768px) {

    /* =====================================================
       Main Page
       ===================================================== */

    .mkh-check-info-page {
        width: 100%;
        max-width: 100%;
        margin: 16px auto 35px;
        padding: 0 10px;
        box-sizing: border-box;
    }


    /* =====================================================
       Header
       ===================================================== */

    .mkh-check-info-header {
        padding: 22px 16px;
        margin-bottom: 14px;
        border-radius: 16px;
    }

    .mkh-check-info-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
        font-size: 23px;
    }

    .mkh-check-info-header h2 {
        margin-bottom: 6px;
        font-size: 20px;
        line-height: 1.5;
    }

    .mkh-check-info-header p {
        font-size: 12px;
        line-height: 1.8;
    }


    /* =====================================================
       Success Message
       ===================================================== */

    .mkh-check-info-success {
        padding: 11px 13px;
        margin-bottom: 14px;
        border-radius: 10px;
        font-size: 12px;
        line-height: 1.8;
    }


    /* =====================================================
       Order Summary
       ===================================================== */

    .mkh-check-order-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 14px;
    }

    .mkh-check-summary-item {
        min-width: 0;
        padding: 11px 10px;
        border-radius: 11px;
        gap: 7px;
        flex-direction: column;
        align-items: flex-start;
    }

    .mkh-check-summary-item span {
        font-size: 10px;
        line-height: 1.5;
    }

    .mkh-check-summary-item strong {
        width: 100%;
        font-size: 18px;
        line-height: 1.5;
    }


    /* =====================================================
       Main Form Card
       ===================================================== */

    .mkh-check-info-form {
        padding: 18px 12px;
        border-radius: 16px;
    }


    /* =====================================================
       Sections
       ===================================================== */

    .mkh-check-info-section {
        margin-bottom: 22px;
    }

    .mkh-check-info-section:last-of-type {
        margin-bottom: 16px;
    }

    .mkh-check-info-section h3 {
        margin-bottom: 16px;
        padding-bottom: 9px;
        font-size: 16px;
        line-height: 1.6;
    }

    .mkh-check-info-section h3::after {
        width: 45px;
        height: 3px;
    }


    /* =====================================================
       Two-row Mobile Form
       ===================================================== */

    .mkh-check-form-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 8px;
    }

    .mkh-check-info-row {
        min-width: 0;
        width: 100%;
    }


    /* =====================================================
       Full Width Fields
       ===================================================== */

    .mkh-check-description-row {
        grid-column: 1 / -1;
        width: 100%;
    }


    /* =====================================================
       Labels
       ===================================================== */

    .mkh-check-info-row label {
        margin-bottom: 5px;
        font-size: 11px;
        line-height: 1.6;
    }

    .mkh-check-info-row label .required {
        margin-right: 2px;
    }


    /* =====================================================
       WooCommerce Form Fields
       ===================================================== */

    .mkh-check-info-row .form-row,
    .mkh-check-info-row .woocommerce-form-row {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .mkh-check-info-row .form-row label {
        margin-bottom: 5px;
    }


    /* =====================================================
       Inputs
       ===================================================== */

    .mkh-check-info-row input[type="text"],
    .mkh-check-info-row input[type="number"],
    .mkh-check-info-row input[type="email"],
    .mkh-check-info-row select,
    .mkh-check-info-row textarea {
        width: 100%;
        min-width: 0;
        min-height: 43px;
        padding: 8px 9px;
        border-radius: 9px;
        font-size: 12px;
        line-height: 1.5;
    }


    /* =====================================================
       Readonly Fields
       ===================================================== */

    .mkh-check-readonly-field {
        width: 100%;
        min-width: 0;
    }

    .mkh-check-readonly-field input {
        width: 100%;
    }

    .mkh-check-readonly-field span {
        left: 9px;
        font-size: 10px;
    }


    /* =====================================================
       Check Amount
       ===================================================== */

    #mkh_check_amount {
        padding-left: 42px !important;
        font-size: 12px !important;
    }


    /* =====================================================
       Due Date
       ===================================================== */

    #mkh_check_due_date {
        font-size: 12px !important;
        text-align: center !important;
    }


    /* =====================================================
       Helper Text
       ===================================================== */

    .mkh-check-info-row small {
        margin-top: 4px;
        font-size: 9px;
        line-height: 1.7;
    }


    /* =====================================================
       Description
       ===================================================== */

    .mkh-check-description-row textarea,
    .mkh-check-info-row textarea[name="description"],
    .mkh-check-info-row textarea#description,
    .mkh-check-info-row textarea#mkh_check_description {
        min-height: 62px !important;
        height: 62px !important;
        max-height: 100px !important;
        padding: 8px 9px !important;
        resize: vertical;
        font-size: 12px !important;
        line-height: 1.7;
    }


    /* =====================================================
       Image Section
       ===================================================== */

    .mkh-check-image-section {
        padding-top: 2px;
    }

    .mkh-check-image-section > p {
        margin: -5px 0 12px;
        font-size: 10px;
        line-height: 1.8;
    }


    /* =====================================================
       File Input
       ===================================================== */

    #mkh_check_image {
        width: 100%;
        min-height: 43px;
        padding: 6px;
        border-radius: 8px;
        font-size: 10px;
    }


    /* =====================================================
       Existing Image
       ===================================================== */

    .mkh-check-existing-image {
        margin-top: 11px !important;
        padding: 10px;
        border-radius: 9px;
    }

    .mkh-check-existing-image p {
        margin-bottom: 6px;
        font-size: 10px;
        line-height: 1.7;
    }

    .mkh-check-existing-image a {
        display: block;
        margin: 4px 0 8px;
    }

    .mkh-check-existing-image img {
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 7px;
    }


    /* =====================================================
       Submit Button
       ===================================================== */

    .mkh-check-info-submit {
        width: 100%;
        min-height: 46px;
        padding: 10px 12px !important;
        margin-top: 3px;
        border-radius: 9px !important;
        font-size: 12px !important;
        line-height: 1.7;
    }

    .mkh-check-info-submit:hover {
        transform: none;
        box-shadow: none;
    }


    /* =====================================================
       Error State
       ===================================================== */

    .mkh-check-info-error {
        max-width: 100%;
        margin: 30px auto;
    }

    .mkh-check-info-message {
        padding: 22px 15px;
        border-radius: 13px;
    }

    .mkh-check-info-message h3 {
        font-size: 17px;
    }

    .mkh-check-info-message p {
        font-size: 12px;
        line-height: 1.8;
    }

}


/* =========================================================
   Very Small Mobile
   ========================================================= */

@media (max-width: 380px) {

    .mkh-check-info-page {
        padding-left: 7px;
        padding-right: 7px;
    }

    .mkh-check-info-header {
        padding: 20px 12px;
    }

    .mkh-check-info-header h2 {
        font-size: 18px;
    }

    .mkh-check-info-form {
        padding: 16px 9px;
    }

    .mkh-check-form-grid {
        gap: 10px 6px;
    }

    .mkh-check-info-row label {
        font-size: 10px;
    }

    .mkh-check-info-row input[type="text"],
    .mkh-check-info-row input[type="number"],
    .mkh-check-info-row input[type="email"],
    .mkh-check-info-row select,
    .mkh-check-info-row textarea {
        min-height: 41px;
        padding-left: 7px;
        padding-right: 7px;
        font-size: 11px;
    }

    .mkh-check-summary-item {
        padding: 10px 8px;
    }

    .mkh-check-summary-item strong {
        font-size: 16px;
    }

}

/* =====================================================
   Receiver National ID - Mobile
   کد ملی دریافت‌کننده چک
   ===================================================== */

@media (max-width: 768px) {

    .mkh-check-readonly-field input {
        font-size: 15px !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px;
        text-align: center !important;
    }

}