/* =========================================================
   MKH Check Payment - Modern Check Information Form
   ========================================================= */

.mkh-check-info-page {
    width: 100%;
    max-width: 980px;
    margin: 35px auto 70px;
    padding: 0 20px;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    color: #1f2937;
}


/* =========================================================
   Header
   ========================================================= */

.mkh-check-info-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #15803d 0%, #16a34a 55%, #22c55e 100%);
    border-radius: 20px;
    padding: 30px 28px;
    margin-bottom: 20px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 12px 35px rgba(22, 163, 74, 0.18);
}

.mkh-check-info-header::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    top: -100px;
    right: -60px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.mkh-check-info-header::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    bottom: -80px;
    left: -35px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.mkh-check-info-icon {
    position: relative;
    z-index: 2;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    font-weight: 700;
}

.mkh-check-info-header h2 {
    position: relative;
    z-index: 2;
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 25px;
    font-weight: 800;
}

.mkh-check-info-header p {
    position: relative;
    z-index: 2;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.8;
}


/* =========================================================
   REMOVE OLD FAKE PROGRESS BAR
   ========================================================= */

.mkh-check-info-page::before {
    content: none !important;
    display: none !important;
}


/* =========================================================
   Success Message
   ========================================================= */

.mkh-check-info-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}


/* =========================================================
   Order Summary
   ========================================================= */

.mkh-check-order-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.mkh-check-summary-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.035);
}

.mkh-check-summary-item span {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.mkh-check-summary-item strong {
    color: #111827;
    font-size: 21px;
    font-weight: 800;
}


/* =========================================================
   Main Form
   ========================================================= */

.mkh-check-info-form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.045);
}


/* =========================================================
   Sections
   ========================================================= */

.mkh-check-info-section {
    margin-bottom: 28px;
}

.mkh-check-info-section:last-of-type {
    margin-bottom: 20px;
}

.mkh-check-info-section h3 {
    position: relative;
    margin: 0 0 22px;
    padding: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
}

.mkh-check-info-section h3::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    width: 55px;
    height: 3px;
    background: #16a34a;
    border-radius: 10px;
}


/* =========================================================
   Form Grid
   ========================================================= */

.mkh-check-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.mkh-check-info-row {
    min-width: 0;
}

.mkh-check-description-row {
    grid-column: 1 / -1;
}


/* =========================================================
   Labels
   ========================================================= */

.mkh-check-info-row label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.mkh-check-info-row label .required {
    color: #dc2626;
    margin-right: 3px;
}


/* =========================================================
   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-height: 46px;
    padding: 10px 13px;
    margin: 0;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    box-sizing: border-box;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.mkh-check-info-row input[type="text"]:focus,
.mkh-check-info-row input[type="number"]:focus,
.mkh-check-info-row input[type="email"]:focus,
.mkh-check-info-row select:focus,
.mkh-check-info-row textarea:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.10);
}


/* =========================================================
   Description - Compact
   ========================================================= */

.mkh-check-description-row {
    width: 100%;
}

.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: 58px !important;
    height: 58px !important;
    max-height: 90px !important;
    padding: 8px 12px !important;
    resize: vertical;
    line-height: 1.6;
}


/* =========================================================
   WooCommerce Form Field Fix
   ========================================================= */

.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: 7px;
}


/* =========================================================
   Bank Select
   ========================================================= */

.mkh-check-bank-select {
    cursor: pointer;
}


/* =========================================================
   Readonly Fields
   ========================================================= */

.mkh-check-readonly-field {
    position: relative;
    display: flex;
    align-items: center;
}

.mkh-check-readonly-field input {
    background: #f8fafc !important;
    color: #4b5563 !important;
    cursor: not-allowed;
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px;
    text-align: center !important;
}

.mkh-check-readonly-field span {
    position: absolute;
    left: 13px;
    color: #6b7280;
    font-size: 12px;
    pointer-events: none;
}


/* =========================================================
   Amount Field
   ========================================================= */

#mkh_check_amount {
    padding-left: 52px !important;
    font-weight: 800;
    color: #111827 !important;
}


/* =========================================================
   Due Date - Persian / RTL
   ========================================================= */

#mkh_check_due_date {
    direction: rtl !important;
    text-align: center !important;
    font-family: Tahoma, Arial, sans-serif !important;
    letter-spacing: 0 !important;
    font-weight: 700 !important;
    unicode-bidi: plaintext;
}


/* =========================================================
   Description Helper Text
   ========================================================= */

.mkh-check-info-row small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.6;
}


/* =========================================================
   Image Section
   ========================================================= */

.mkh-check-image-section {
    padding-top: 4px;
}

.mkh-check-image-section > p {
    margin: -8px 0 16px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.8;
}


/* =========================================================
   File Input
   ========================================================= */

#mkh_check_image {
    width: 100%;
    min-height: 46px;
    padding: 7px;
    border: 1px dashed #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
    color: #475569;
    font-family: inherit;
    font-size: 12px;
    box-sizing: border-box;
    cursor: pointer;
}

#mkh_check_image:hover {
    border-color: #16a34a;
    background: #f0fdf4;
}


/* =========================================================
   Existing Image + Live Preview
   ========================================================= */

.mkh-check-existing-image,
.mkh-check-live-preview {
    margin-top: 15px !important;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    box-sizing: border-box;
}

.mkh-check-existing-image p,
.mkh-check-live-preview p {
    margin: 0 0 8px;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.7;
}

.mkh-check-existing-image p:last-child,
.mkh-check-live-preview p:last-child {
    margin-bottom: 0;
}

.mkh-check-existing-image a,
.mkh-check-live-preview a {
    display: inline-block;
    margin: 4px 0 10px;
}

.mkh-check-existing-image img,
.mkh-check-live-preview img {
    max-width: 360px;
    width: 100%;
    height: auto;
    display: block;
    margin: 10px 0 0;
    border: 1px solid #dcdcde;
    border-radius: 9px;
    object-fit: contain;
}

/* پیش‌نمایش زنده تصویر انتخاب‌شده */
.mkh-check-live-preview {
    display: none;
}

.mkh-check-live-preview.is-visible {
    display: block;
}

.mkh-check-live-preview-title {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

/* تصویر پیش‌نمایش */
#mkh-check-image-preview {
    max-width: 360px;
    width: 100%;
    max-height: 400px;
    height: auto;
    display: block;
    margin: 10px 0 0;
    border: 1px solid #dcdcde;
    border-radius: 9px;
    object-fit: contain;
    background: #ffffff;
}

/* موبایل */
@media (max-width: 600px) {

    .mkh-check-existing-image,
    .mkh-check-live-preview {
        padding: 12px;
    }

    .mkh-check-existing-image img,
    .mkh-check-live-preview img,
    #mkh-check-image-preview {
        max-width: 100%;
        max-height: 320px;
    }

}

/* =========================================================
   Submit Button
   ========================================================= */

.mkh-check-info-submit {
    width: 100%;
    min-height: 50px;
    padding: 12px 20px !important;
    margin-top: 5px;
    border: 0 !important;
    border-radius: 10px !important;
    background: #16a34a !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.mkh-check-info-submit:hover {
    background: #15803d !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(22, 163, 74, 0.22);
}

.mkh-check-info-submit:active {
    transform: translateY(0);
}


/* =========================================================
   Remove Any Fake / Fixed Progress Elements
   ========================================================= */

.mkh-check-info-page > .progress-bar,
.mkh-check-info-page > .progress,
.mkh-check-info-page > .progress-wrapper,
.mkh-check-info-form > .progress-bar,
.mkh-check-info-form > .progress,
.mkh-check-info-form > .progress-wrapper {
    display: none !important;
}


/* =========================================================
   Error State
   ========================================================= */

.mkh-check-info-error {
    max-width: 650px;
    margin: 50px auto;
}

.mkh-check-info-message {
    padding: 30px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #fecaca;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.mkh-check-info-message h3 {
    margin: 0 0 10px;
    color: #b91c1c;
}

.mkh-check-info-message p {
    margin: 0;
    color: #6b7280;
}

/* =========================================================
 * MKH — ظاهر مدرن بخش آپلود تصویر چک
 * فقط ظاهر بخش آپلود تصویر
 * ========================================================= */

.mkh-check-image-section {
    margin-top: 30px;
    padding: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.035);
}

.mkh-check-image-section > h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: #1f2937;
}

.mkh-check-image-section > p {
    margin: 0 0 22px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.8;
}


/* =========================================================
 * عنوان فیلد
 * ========================================================= */

.mkh-check-image-section .mkh-check-info-row {
    margin: 0;
}

.mkh-check-image-section .mkh-check-info-row > label {
    display: block;
    margin-bottom: 10px;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
 * آپلود فایل — ظاهر یکپارچه
 * ========================================================= */

.mkh-check-image-section #mkh_check_image {
    display: block;
    width: 100%;
    min-height: 58px;
    padding: 8px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    font-family: inherit;
    font-size: 13px;
    box-sizing: border-box;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.mkh-check-image-section #mkh_check_image:hover {
    border-color: #16a34a;
    background: #f0fdf4;
}

.mkh-check-image-section #mkh_check_image:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.10);
}


/* =========================================================
 * دکمه Choose File
 * ========================================================= */

.mkh-check-image-section #mkh_check_image::file-selector-button {
    margin-left: 12px;
    padding: 11px 20px;
    border: 0;
    border-radius: 9px;
    background: #16a34a;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.mkh-check-image-section #mkh_check_image::file-selector-button:hover {
    background: #15803d;
    box-shadow: 0 5px 12px rgba(22, 163, 74, 0.20);
}

.mkh-check-image-section #mkh_check_image::file-selector-button:active {
    transform: scale(0.98);
}


/* =========================================================
 * تصویر قبلی
 * ========================================================= */

.mkh-check-existing-image {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.mkh-check-existing-image > p {
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.8;
}

.mkh-check-existing-image > p strong {
    font-weight: 700;
    color: #1f2937;
}

.mkh-check-existing-image > a {
    display: block;
    width: 100%;
    max-width: 420px;
    margin-bottom: 16px;
}

.mkh-check-existing-image > a img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
}


/* =========================================================
 * پیش‌نمایش زنده
 * ========================================================= */

.mkh-check-live-preview {
    margin-top: 20px !important;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.mkh-check-live-preview-title {
    display: block;
    margin-bottom: 10px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

#mkh-check-image-preview {
    display: block;
    width: 100%;
    max-width: 420px;
    max-height: 420px;
    height: auto;
    margin: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    object-fit: contain;
}


/* =========================================================
 * موبایل
 * ========================================================= */

@media screen and (max-width: 768px) {

    .mkh-check-image-section {
        margin-top: 20px;
        padding: 18px;
        border-radius: 12px;
    }

    .mkh-check-image-section > h3 {
        font-size: 18px;
    }

    .mkh-check-image-section > p {
        font-size: 13px;
        line-height: 1.9;
        margin-bottom: 18px;
    }

    .mkh-check-image-section #mkh_check_image {
        min-height: 54px;
    }

    .mkh-check-image-section #mkh_check_image::file-selector-button {
        padding: 10px 15px;
        font-size: 12px;
    }

    .mkh-check-existing-image,
    .mkh-check-live-preview {
        padding: 14px;
        margin-top: 18px;
    }

    .mkh-check-existing-image > a,
    #mkh-check-image-preview {
        max-width: 100%;
    }

    .mkh-check-existing-image > a img,
    #mkh-check-image-preview {
        max-height: 300px;
    }
}

/* =========================================================
   MKH — Mobile Form Helper Text Fix
   فقط نوشته‌های راهنمای داخل/زیر فیلدها
   ========================================================= */

@media screen and (max-width: 600px) {

    .mkh-check-info-row small {
        font-size: 10px !important;
        line-height: 1.6 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
    }

}

@media screen and (max-width: 600px) {

    .mkh-check-info-row input::placeholder,
    .mkh-check-info-row textarea::placeholder {
        font-size: 09px !important;
        opacity: 0.75;
    }

}