/* Container Base */
.diagnostic-ui-container {
    border: 1px solid #e2e8f0;
    padding: 30px;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #ffffff;
    max-width: 900px;
    margin: 0 auto;
}

/* Patient Form */
.gma-patient-form h4 {
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 18px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}
.gma-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}
.gma-form-grid select{
    padding:0px 10px !important;
}
.gma-form-grid input,  .gma-patient-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}
.gma-patient-form textarea {
    height: 100px;
    resize: vertical;
}

/* Controls */
.gma-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
.gma-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.2s;
}
.gma-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.gma-btn-primary { background: #0ea5e9; color: #fff; }
.gma-btn-danger { background: #ef4444; color: #fff; }
#gma-timer { font-size: 20px; font-weight: bold; color: #334155; }
#gma-status { color: #64748b; font-size: 14px; margin-top: 10px; }

/* Report Container */
#gma-results {
    margin-top: 40px;
}
.gma-report-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Header & Urgency Badge */
.gma-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.gma-urgency-badge {
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
}
.gma-print-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
.gma-print-btn:hover { background: #e2e8f0; }

/* Patient Details Box */
.gma-patient-details-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
.gma-detail-item span {
    color: #64748b;
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.gma-detail-item strong {
    color: #0f172a;
    font-size: 15px;
}

/* Report Sections */
.gma-report-section {
    margin-bottom: 30px;
}
.gma-report-section h4 {
    font-size: 14px;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.gma-report-section p {
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
    margin: 0;
}

/* Grid Layout */
.gma-report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.gma-report-section ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.gma-report-section ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
}
.gma-report-section ul li::before {
    content: "•";
    color: #0ea5e9;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 18px;
}

/* Divider & Transcript */
.gma-divider {
    border: 0;
    height: 1px;
    background: #e2e8f0;
    margin: 30px 0;
}
.gma-transcript p {
    font-size: 14px;
    color: #475569;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #cbd5e1;
}

/* Responsive & Print */
@media (max-width: 768px) {
    .gma-form-grid, .gma-patient-details-box, .gma-report-grid {
        grid-template-columns: 1fr;
    }
}
@media print {
    body * { visibility: hidden; }
    #gma-printable-area, #gma-printable-area * { visibility: visible; }
    #gma-printable-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 0;
    }
    .gma-print-btn { display: none !important; }
}
/* --- رفع مشکل دیده نشدن متن در فیلد کشویی جنسیت --- */
#gma-p-gender {
    color: #1e293b !important; /* اجبار به نمایش رنگ تیره برای متن */
    background-color: #ffffff !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
}
#gma-p-gender option {
    color: #1e293b !important;
}

/* --- مخفی کردن دکمه Submit پیش‌فرض گراویتی فرمز --- */
.gform_footer, .gform_page_footer {
    display: none !important;
}



/* --- استایل‌های پاپ‌آپ انتخاب مسیر --- */
.gma-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85); /* پس‌زمینه تاریک */
    backdrop-filter: blur(5px); /* افکت تار شدن پس‌زمینه */
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    font-family: inherit;
    transition: opacity 0.4s ease;
}

.gma-modal-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(0);
    transition: transform 0.4s ease;
}

.gma-modal-box h3 {
    margin-top: 0;
    color: #0f172a;
    font-size: 24px;
    font-weight: 700;
}

.gma-modal-box p {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.gma-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.gma-modal-buttons button {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gma-btn-test {
    background: #0ea5e9;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(14, 165, 233, 0.25);
}

.gma-btn-test:hover {
    background: #0284c7;
    transform: translateY(-2px);
}

.gma-btn-preview {
    background: #f1f5f9;
    color: #475569;
}

.gma-btn-preview:hover {
    background: #e2e8f0;
    color: #0f172a;
}