/* =========================================
   MMC Stylesheet - Merged & Enhanced
   Version: 1.3.5 (Combined)
   ========================================= */

:root {
    --mmc-primary: #0073aa;
    --mmc-primary-dark: #005177;
    --mmc-secondary: #2c3e50;
    --mmc-success: #28a745;     /* سبز استاندارد */
    --mmc-success-light: #dcfce7;
    --mmc-success-dark: #166534;
    --mmc-danger: #d63638;      /* قرمز وردپرس */
    --mmc-danger-bg: #fee2e2;
    --mmc-warning: #f0b849;
    --mmc-warning-bg: #fff3cd;
    --mmc-light: #fdfdfd;
    --mmc-border: #e2e4e7;
    --mmc-text-main: #3c434a;
    --mmc-text-light: #646970;
    --mmc-radius: 12px;
}

/* 1. Base & Layout */
.mmc-app-wrapper {
    max-width: 1000px; margin: 0 auto;
    background: var(--mmc-light); 
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
    min-height: 600px; 
    font-family: inherit; direction: rtl;
    line-height: 1.6; color: var(--mmc-text-main);
    position: relative; border-radius: var(--mmc-radius);
}
.mmc-app-wrapper * { box-sizing: border-box; }

/* 2. Top Bar */
.mmc-top-bar {
    background: #fff; padding: 10px 20px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--mmc-border);
    border-radius: 12px 12px 0 0;
}
.mmc-top-right { display: flex; align-items: center; }
.mmc-app-logo { height: 45px; width: auto; object-fit: contain; }
.mmc-app-name-fallback { font-weight: bold; color: var(--mmc-primary); font-size: 1.2rem; }

.mmc-top-left { display: flex; align-items: center; }
.mmc-actions-box {
    display: flex; align-items: center; gap: 12px;
    background: #f3f4f6; padding: 6px 15px;
    border-radius: 25px; border: 1px solid #e5e7eb;
}
.child-name-link { font-size: 0.95rem; font-weight: bold; color: #333; text-decoration: none; transition: 0.2s; }
.child-name-link:hover { color: var(--mmc-primary); }
.sep { color: #ccc; font-size: 14px; margin: 0 2px; }

/* Icon Buttons */
.mmc-icon-btn { color: #666; font-size: 20px; text-decoration: none; transition: 0.2s; display: flex; align-items: center; position: relative; }
.mmc-icon-btn:hover { color: var(--mmc-primary); transform: scale(1.1); }
.logout-btn:hover { color: var(--mmc-danger); }

/* Notification Wrapper & Badge */
.mmc-notif-wrapper { cursor: pointer; position: relative; display: flex; align-items: center; }
.notif-badge {
    position: absolute; top: -6px; left: -6px; 
    background: var(--mmc-danger); color: #fff;
    font-size: 10px; font-weight: bold; border-radius: 50%; 
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center; 
    border: 1px solid #fff; z-index: 2;
}

/* 3. Tool Bar (Sticky) */
.mmc-tool-bar {
    position: sticky; top: 0; z-index: 998;
    color: #fff; padding: 15px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
    /* Default background set via JS or inline, usually primary */
    background: var(--mmc-secondary); 
}
/* Fix for WP Admin Bar */


body.admin-bar .mmc-tool-bar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .mmc-tool-bar { top: 46px; } }

.tool-bar-inner { display: flex; align-items: center; gap: 20px; }
.mmc-home-btn {
    background: #fff; color: #333; width: 45px; height: 45px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: 0.2s; font-size: 20px; flex-shrink: 0;
}
.mmc-home-btn:hover { transform: scale(1.05); color: #000; }
.mmc-home-btn.is-home { color: var(--mmc-primary); cursor: default; }

.tool-identity { display: flex; align-items: center; gap: 15px; flex-grow: 1; }
.tool-icon-circle {
    width: 45px; height: 45px; background: rgba(255,255,255,0.2);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
}
.tool-texts { display: flex; flex-direction: column; }
.tool-title { margin: 0; font-size: 1.2rem; font-weight: bold; color: #fff; line-height: 1.2; }
.tool-subtitle { font-size: 0.85rem; opacity: 0.9; font-weight: normal; }

/* 4. Content & Grid */
.mmc-main-content { padding: 25px; min-height: 400px; }
.mmc-grid-wrapper { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* Tool Cards */
.mmc-tool-card {
    background: #fff; border: 1px solid var(--mmc-border); border-radius: 12px; padding: 15px;
    display: flex; align-items: center; gap: 15px; transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none; color: inherit; position: relative; overflow: hidden;
}
.mmc-tool-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); border-color: #dbeafe; }

.tool-icon {
    width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center;
    justify-content: center; color: #fff; flex-shrink: 0; font-size: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.tool-info { flex-grow: 1; }
.tool-info h4 { margin: 0 0 4px 0; font-size: 1rem; color: #333; font-weight: bold; }
.tool-info p { margin: 0; font-size: 0.8rem; color: #777; line-height: 1.4; }

.tool-action { color: #ccc; transition: 0.2s; margin-right: auto; }
.mmc-tool-card:hover .tool-action { color: var(--mmc-primary); transform: translateX(-3px); }

/* Locked State */
.mmc-tool-card.disabled { opacity: 0.8; background: #fafafa; cursor: not-allowed; filter: grayscale(0.9); }
.lock-info {
    color: #888; margin-top: 6px; font-size: 0.75rem; display: flex; align-items: center; gap: 4px;
    background: #eee; padding: 2px 8px; border-radius: 10px; width: fit-content;
}

/* Tool Description Box (Restored) */
.mmc-tool-desc-box { 
    margin: 20px 0; padding: 20px; border-radius: 10px; 
    border: 1px solid var(--mmc-border); background: #fcfcfc;
    line-height: 1.8; color: #333; font-size: 0.95rem; 
}

/* 5. Report Banner */
.mmc-report-banner {
    display: block; position: relative; overflow: hidden;
    padding: 20px; border-radius: 15px; margin-bottom: 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); color: #fff; text-decoration: none;
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    transition: transform 0.2s;
}
/* Alternate Gradient (Restored) */
.mmc-report-banner.special-gradient {
    background: linear-gradient(120deg, #2980b9, #2c3e50);
}
.mmc-report-banner:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(0,0,0,0.2); }

.report-bg-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px; opacity: 0.5; pointer-events: none;
}
.report-flex-row { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.report-icon-container {
    width: 70px; height: 70px; background: rgba(255,255,255,0.2); border-radius: 18px;
    display: flex; align-items: center; justify-content: center; font-size: 36px; color: #fff; flex-shrink: 0;
    backdrop-filter: blur(5px);
}
.report-text-container h3 { margin: 0 0 5px 0; font-size: 1.4rem; font-weight: 800; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.1); }

.report-status-wrapper { font-size: 0.95rem; opacity: 0.95; }
.status-indicator { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.status-indicator.warning { color: var(--mmc-warning-bg); }
.status-indicator.success { color: var(--mmc-success-light); }

.report-arrow-container {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; transition: 0.2s; flex-shrink: 0;
}
.mmc-report-banner:hover .report-arrow-container { background: #fff; color: var(--mmc-primary); transform: translateX(-5px); }

.mmc-category-header {
    border-bottom: 2px solid #f0f0f0; margin: 35px 0 20px 0; padding-bottom: 10px;
    display: flex; align-items: center; gap: 10px; color: #555; font-size: 1.1rem; font-weight: bold;
}

/* 6. Forms */
.mmc-section-title {
    margin: 30px 0 20px 0; font-size: 1.1rem; color: var(--mmc-primary);
    border-right: 4px solid var(--mmc-primary); padding-right: 15px; 
    background: linear-gradient(to left, transparent, #f9fbfd); padding: 10px 15px 10px 0;
}
.mmc-req { color: var(--mmc-danger); margin-right: 3px; }

.mmc-form input, .mmc-form select, .mmc-form textarea {
    width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; 
    font-size: 14px; min-height: 42px; transition: 0.2s; background: #fff;
}
.mmc-form input:focus, .mmc-form select:focus, .mmc-form textarea:focus { 
    border-color: var(--mmc-primary); outline: none; box-shadow: 0 0 0 1px var(--mmc-primary); 
}
.mmc-form label { display: block; margin-bottom: 8px; font-weight: bold; color: #444; }

.mmc-row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.mmc-col-half { flex: 1; min-width: 250px; }

.mmc-radio-group, .mmc-checkbox-wrapper { display: flex; align-items: center; gap: 15px; min-height: 42px; }
.mmc-consent-box {
    background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 20px; border-radius: 12px; margin: 30px 0; font-weight: 600;
}
.mmc-hidden-box { margin-top: 15px; padding: 15px; background: #fff8e1; border: 1px dashed #fcd34d; border-radius: 8px; }

/* Buttons */
.mmc-btn {
    padding: 10px 24px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: 0.2s; text-decoration: none;
}
.mmc-btn-primary { background: var(--mmc-primary); color: #fff; }
.mmc-btn-primary:hover { background: var(--mmc-primary-dark); color: #fff; }
.mmc-btn-success { background: var(--mmc-success); color: #fff; }
.mmc-btn-outline-dark { border: 1px solid #ddd; background: #fff; color: #555; }
.mmc-btn-small { padding: 6px 12px; font-size: 13px; }

/* 7. Report Card & Tables */
.mmc-rc-section { background: #fff; border: 1px solid var(--mmc-border); border-radius: 12px; overflow: hidden; margin-bottom: 30px; }
.mmc-rc-title { background: #f8f9fa; padding: 12px 20px; border-bottom: 1px solid #eee; color: var(--mmc-primary); font-weight: bold; }

.mmc-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; padding: 20px; }
.info-item { display: flex; flex-direction: column; gap: 3px; }
.info-item .label { color: #888; font-size: 0.8rem; }
.info-item .value { color: #333; font-weight: bold; }

.mmc-summary-box { padding: 20px; border-radius: 12px; margin-bottom: 30px; display: flex; flex-direction: column; gap: 15px; }
.summary-header { display: flex; gap: 15px; border-bottom: 1px solid rgba(0,0,0,0.08); padding-bottom: 15px; }
.summary-icon-box { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; flex-shrink: 0; }
.summary-green { background: #f0fdf4; border: 1px solid #bbf7d0; } .summary-green .summary-icon-box { background: var(--mmc-success); }
.summary-yellow { background: #fffbeb; border: 1px solid #fde68a; } .summary-yellow .summary-icon-box { background: var(--mmc-warning); }
.summary-red { background: #fef2f2; border: 1px solid #fecaca; } .summary-red .summary-icon-box { background: var(--mmc-danger); }

.mmc-rc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.mmc-rc-table th { background: #f8f9fa; text-align: right; padding: 12px 15px; color: #666; }
.mmc-rc-table td { padding: 12px 15px; border-bottom: 1px solid #f9f9f9; }
.status-badge { padding: 3px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: bold; }
.sb-green { background: #dcfce7; color: #166534; } .sb-yellow { background: #fef9c3; color: #854d0e; } .sb-red { background: #fee2e2; color: #991b1b; }

/* 8. Notification Panel */
.mmc-notif-panel {
    position: absolute; top: 65px; left: 20px; width: 380px; 
    background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 8px; border: 1px solid #eee; z-index: 10000;
    display: none; flex-direction: column; max-height: 80vh;
}
.notif-header { padding: 15px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; background: #f9f9f9; border-radius: 8px 8px 0 0; }
.notif-item { padding: 12px 15px; border-bottom: 1px solid #f0f0f0; display: flex; gap: 10px; cursor: pointer; transition: 0.2s; position: relative; }
.notif-item:hover { background: #fcfcfc; } 
.notif-item.unread { background: #e3f2fd; }

.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.bg-info { background: #2196F3; } .bg-warning { background: #FFC107; } .bg-danger { background: #F44336; }

.notif-content { flex-grow: 1; }
.notif-title { font-weight: bold; font-size: 0.9rem; display: block; margin-bottom: 4px; }
.notif-excerpt { font-size: 0.8rem; color: #666; display: block; }
.notif-delete { position: absolute; left: 10px; top: 12px; color: #ccc; cursor: pointer; font-size: 16px; }
.notif-item:hover .notif-delete { color: var(--mmc-danger); }

#clear-all-notifs { background: #fff; color: var(--mmc-danger); border: 1px solid #fecaca; padding: 5px 12px; border-radius: 4px; font-weight: bold; cursor: pointer; }
.notif-footer { padding: 10px; text-align: center; border-top: 1px solid #eee; background: #f9f9f9; border-radius: 0 0 8px 8px; }

/* 9. Standard List */
.mmc-std-list-container { padding-bottom: 40px; min-height: 200px; }
.mmc-std-list { display: flex; flex-direction: column; gap: 12px; }

.mmc-std-item { 
    background: #fff; border: 1px solid var(--mmc-border); border-radius: 12px; 
    padding: 15px; display: flex; align-items: center; gap: 15px; 
    cursor: pointer; transition: 0.2s; position: relative; 
}
.mmc-std-item:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-color: var(--mmc-primary); }

.std-item-icon { width: 55px; height: 55px; border-radius: 12px; background: #f5f5f5; color: #777; display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; overflow: hidden; }
.std-item-icon img { width: 100%; height: 100%; object-fit: cover; }
.std-item-content { flex-grow: 1; min-width: 0; }
.std-item-title { margin: 0 0 5px 0; font-size: 1rem; font-weight: bold; color: #333; }
.std-item-meta { font-size: 0.85rem; color: #777; display: flex; flex-wrap: wrap; gap: 10px; }
.meta-badge { background: #f0f0f0; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; }
.std-item-action { color: #ccc; font-size: 20px; margin-right: auto; }

/* Special Item (Restored) */
.special-item { border: 1px solid #ffd700; background: #fffbe6; }
/* Load More (Restored) */
.mmc-load-more-trigger { text-align: center; padding: 20px; color: #888; font-size: 0.9rem; margin-top: 10px; }
.mmc-load-more-trigger.hidden { display: none; }

/* Center Item Full */
.center-item-full { align-items: flex-start; }
.center-item-full .std-item-content { display: flex; flex-direction: column; gap: 5px; }
.center-full-address { font-size: 0.9rem; color: #444; background: #fcfcfc; border: 1px dashed #eee; padding: 8px; border-radius: 6px; display: flex; gap: 6px; }

/* Phone Rows */
.center-phones-row { display: flex; align-items: center; gap: 15px; margin-top: 5px; flex-wrap: wrap; }
.phone-link { 
    background: #f0f4f8; color: var(--mmc-primary); padding: 4px 10px; 
    border-radius: 20px; text-decoration: none; font-weight: bold; 
    display: inline-flex; align-items: center; gap: 5px; transition: 0.2s;
}
.phone-link:hover { background: var(--mmc-primary); color: #fff; }

/* 10. Footer */
.mmc-app-footer { margin-top: 40px; padding: 25px; background: #2c3e50; color: #ccc; text-align: center; font-size: 0.9rem; border-radius: 0 0 var(--mmc-radius) var(--mmc-radius); }
.mmc-app-footer a { color: #fff; border-bottom: 1px dotted #ccc; text-decoration: none; }

/* 11. Global Modal & Popup Internal Styles */
.mmc-modal { 
    display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.6); align-items: center; justify-content: center; backdrop-filter: blur(2px); 
}
.mmc-modal.open { display: flex; }

.mmc-modal-content { 
    background: #fff; border-radius: 12px; width: 90%; max-width: 600px; max-height: 90vh; 
    display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.3); 
    overflow: hidden; /* Important for inner scroll */
}

.modal-header { 
    flex-shrink: 0; padding: 15px 20px; border-bottom: 1px solid #eee; background: #fff;
    display: flex; justify-content: space-between; align-items: center; 
}
.modal-title { margin: 0; font-size: 1.2rem; color: var(--mmc-primary); }
.btn-close-modal { background: none; border: none; font-size: 24px; cursor: pointer; color: #888; padding: 0; line-height: 1; }

.modal-content-scroll { 
    flex-grow: 1; overflow-y: auto; padding: 25px; 
    line-height: 1.8; color: #444; 
    -webkit-overflow-scrolling: touch;
}

/* Popup Internal Elements (Restored from Old Style) */
.popup-hero-image img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; margin-bottom: 20px; }
.popup-data-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.data-item { display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; color: #333; }
.icon-box { 
    width: 28px; height: 28px; background: #e3f2fd; color: var(--mmc-primary); 
    border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.popup-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.contact-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534;
    padding: 10px; border-radius: 8px; text-decoration: none; font-weight: bold;
    transition: 0.2s;
}
.contact-btn:hover { background: #166534; color: #fff; }

.popup-social-btns { display: flex; gap: 10px; margin-bottom: 20px; }
.social-btn {
    flex: 1; text-align: center; padding: 8px; border-radius: 6px; text-decoration: none; color: #fff; font-size: 0.9rem;
}
.social-btn.wa { background: #25D366; }
.social-btn.ig { background: #E1306C; }
.social-btn.web { background: #34495e; }
.popup-divider { border: 0; border-top: 1px solid #eee; margin: 20px 0; }
.popup-desc { line-height: 1.8; text-align: justify; color: #333; }

.modal-footer { 
    flex-shrink: 0; padding: 15px 20px; border-top: 1px solid #eee; 
    background: #f9f9f9; text-align: center; border-radius: 0 0 12px 12px; 
}

/* 15. AJAX Loading Overlay */
#mmc-ajax-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.85); /* سفید نیمه شفاف */
    z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(2px); /* مات کردن پس‌زمینه */
}

.mmc-ajax-loader {
    text-align: center;
    background: #fff;
    padding: 30px 50px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.mmc-ajax-loader .dashicons {
    font-size: 50px;
    width: 50px; height: 50px;
    color: var(--mmc-primary);
    margin-bottom: 15px;
}

.mmc-ajax-loader .loading-text {
    display: block;
    font-size: 1.1rem;
    color: #555;
    font-weight: 600;
}

/* 16. Error State */
.mmc-error-state {
    text-align: center; padding: 50px 20px;
    background: #fff; border: 1px solid #e5e5e5; border-radius: 12px;
    margin: 40px auto; max-width: 400px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.mmc-error-state h3 { margin: 0 0 10px 0; color: #333; }

/* 12. Responsive */
@media (max-width: 600px) {
    .mmc-grid-wrapper { grid-template-columns: 1fr; }
    .mmc-top-bar { padding: 10px; }
    .mobile-hide { display: none !important; }
    .mmc-actions-box { padding: 5px 10px; gap: 8px; }
    
    /* Report Banner Mobile Logic (Restored) */
    .mmc-report-banner { padding: 15px; }
    .report-flex-row { flex-wrap: wrap; }
    .report-icon-container { width: 60px; height: 60px; font-size: 28px; }
    .report-text-container h3 { font-size: 1.2rem; }
    .report-arrow-container { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }

    .mmc-info-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    
    /* Notif Mobile */
    .mmc-notif-panel { width: 100%; left: 0; top: 60px; border-radius: 0 0 15px 15px; border-left: none; border-right: none; }
    
    /* Phones Mobile */
    .center-phones-row { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 5px; }
    .center-phones-row .sep { display: none; }
    
    /* Modal Mobile */
    .mmc-modal { align-items: flex-end; }
    .mmc-modal-content { width: 100%; max-width: 100%; max-height: 85vh; border-radius: 12px 12px 0 0; }
    .popup-contact-grid { grid-template-columns: 1fr; }
}


/* 13. Global Modal Fixed (Bottom Sheet Style) */
.mmc-global-modal {
    display: none !important; /* Force hide initially */
    position: fixed; 
    z-index: 999999; /* Very high z-index */
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0,0,0,0.6); 
    align-items: flex-end; /* Stick to bottom */
    justify-content: center;
    backdrop-filter: blur(3px); 
    opacity: 0; 
    transition: opacity 0.3s ease;
    padding-bottom: 0; /* Ensure no padding at bottom */
}

.mmc-global-modal.open { 
    display: flex !important; /* Force flex when open */
    opacity: 1; 
}

/* اصلاح استایل باکس محتوا برای حالت چسبیده به پایین */
.mmc-global-modal .mmc-modal-content, 
.mmc-global-modal .mmc-modal-body {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    margin-bottom: 0 !important;
    max-height: 90vh; /* ارتفاع حداکثری */
    width: 100%; /* در حالت موبایل تمام عرض */
    max-width: 700px; /* در دسکتاپ محدود شود */
}



/* 13. Global Modal Fixed (Bottom Sheet Style) */
.mmc-global-modal {
    display: none !important; /* Force hide initially */
    position: fixed; 
    z-index: 999999; /* Very high z-index */
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0,0,0,0.6); 
    align-items: flex-end; /* Stick to bottom */
    justify-content: center;
    backdrop-filter: blur(3px); 
    opacity: 0; 
    transition: opacity 0.3s ease;
    padding-bottom: 0; /* Ensure no padding at bottom */
}

.mmc-global-modal.open { 
    display: flex !important; /* Force flex when open */
    opacity: 1; 
}

.mmc-global-modal .mmc-modal-content {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    margin-bottom: 0 !important;
    max-height: 90vh; 
    width: 100%; 
    max-width: 700px; 
    display: flex;
    flex-direction: column;
}

/* قفل کردن اسکرول فقط وقتی کلاس اضافه شده باشد */
html.mmc-modal-open,
body.mmc-modal-open {
    overflow: hidden !important;
    height: 100vh !important; /* جلوگیری از پرش در موبایل */
    touch-action: none; /* جلوگیری از اسکرول لمسی در پس‌زمینه */
}