/* ============================================
   grade-selector.css - تمام استایل‌های اختصاصی
   ============================================ */

/* ==================== تنظیمات پایه ==================== */
.adv-settings {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(107, 219, 60, 0.2);
}

.adv-header {
    cursor: pointer;
    color: #6bdb3c;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
}

.adv-content {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.adv-content.show {
    display: block;
}

.conf-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.conf-group {
    flex: 1;
    min-width: 100px;
}

.conf-group label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
}

.conf-group input {
    width: 100%;
    padding: 0.4rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(107, 219, 60, 0.3);
    border-radius: 6px;
    color: white;
}

details summary {
    cursor: pointer;
    color: #6bdb3c;
    font-size: 0.8rem;
}

.breakdown-table {
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.breakdown-table th,
.breakdown-table td {
    padding: 0.4rem;
    text-align: right;
}

/* ==================== فرم و ردیف‌ها ==================== */
.property-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem;
    border-radius: 10px;
}

.property-row > div {
    flex: 1;
    min-width: 120px;
}

.property-row select,
.property-row input {
    width: 100%;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(107, 219, 60, 0.3);
    border-radius: 8px;
    color: white;
}

.remove-row {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
}

.remove-row:hover {
    background: #cc0000;
}

.btn-secondary {
    background: rgba(107, 219, 60, 0.2);
    border: 1px solid #6bdb3c;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: #6bdb3c;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(107, 219, 60, 0.4);
}

.btn-submit {
    background: linear-gradient(135deg, #6bdb3c, #4a9e2a);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-submit:hover {
    transform: scale(1.02);
}

.btn-watch {
    background: rgba(107, 219, 60, 0.2);
    border: 1px solid #6bdb3c;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    color: #6bdb3c;
    cursor: pointer;
    font-size: 1rem;
}

.btn-watch:hover {
    background: rgba(107, 219, 60, 0.4);
}

/* ==================== تنظیمات جستجو ==================== */
.setting-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    direction: rtl;
}

.setting-group {
    flex: 1;
    min-width: 150px;
}

.setting-group label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.setting-group select,
.setting-group input {
    width: 100%;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(107, 219, 60, 0.3);
    border-radius: 8px;
    color: white;
}

.setting-group select:focus,
.setting-group input:focus {
    outline: none;
    border-color: #6bdb3c;
}

/* ==================== جدول نتایج ==================== */
.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 0.8rem;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.results-table th {
    color: #6bdb3c;
}

.score-high {
    color: #6bdb3c;
    font-weight: bold;
}

.score-medium {
    color: #ffc107;
    font-weight: bold;
}

.score-low {
    color: #ff6b6b;
    font-weight: bold;
}

/* ==================== کارت‌ها ==================== */
.form-card {
    background: rgba(20, 30, 45, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(107, 219, 60, 0.2);
}

.form-card:has(.multi-select-dropdown.open) {
    position: relative;
    z-index: 10000 !important;
}

.video-card {
    background: rgba(20, 30, 45, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(107, 219, 60, 0.2);
}

.video-title {
    color: #6bdb3c;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.video-description {
    color: rgba(255, 255, 255, 0.7);
    margin: 1rem 0;
}

/* ==================== تب‌ها ==================== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: #aaa;
    font-size: 1rem;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #6bdb3c;
}

.tab-btn.active {
    color: #000000 !important;
    background: #6bdb3c !important;
    border-radius: 8px;
    font-weight: bold;
}

.tabs-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== زیرابزارها ==================== */
.sub-tabs-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2px;
    flex-wrap: wrap;
}

.sub-tab-btn {
    background: transparent;
    border: none;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    color: #aaa;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    position: relative;
}

.sub-tab-btn:hover {
    color: #6bdb3c;
    background: rgba(107, 219, 60, 0.08);
}

.sub-tab-btn.active {
    color: #1a1a2e !important;
    background: #6bdb3c !important;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(107, 219, 60, 0.3);
}

.sub-tab-content {
    display: none;
}

.sub-tab-content.active {
    display: block;
}

/* ==================== ابزارهای تکمیلی ==================== */
.tools-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(107, 219, 60, 0.3);
}

/* ==================== دکمه‌های اختصاصی ==================== */
.btn-reset {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid #ff4444;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    color: #ff4444;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-reset:hover {
    background: rgba(255, 68, 68, 0.4);
}

.btn-datasheet {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid #3498db;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    color: #3498db;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
    white-space: nowrap;
}

.btn-datasheet:hover {
    background: rgba(52, 152, 219, 0.4);
}

.btn-datasheet-link {
    color: #6bdb3c;
    text-decoration: none;
    border: 1px solid rgba(107, 219, 60, 0.3);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
    transition: all 0.2s;
}

.btn-datasheet-link:hover {
    background: rgba(107, 219, 60, 0.15);
    border-color: #6bdb3c;
    text-decoration: none;
    color: #6bdb3c;
}

/* ==================== Multi-Select Dropdown ==================== */
.multi-select-container {
    position: relative;
    width: 100%;
    margin-bottom: 5px;
}

.multi-select-btn {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(107, 219, 60, 0.3);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    direction: rtl;
    text-align: right;
}

.multi-select-btn:hover {
    border-color: #6bdb3c;
}

.multi-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    background: #1a1a2e;
    border: 1px solid rgba(107, 219, 60, 0.3);
    border-radius: 8px;
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10001;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    direction: rtl;
    text-align: right;
}

.multi-select-dropdown.open {
    display: block;
    z-index: 10002 !important;
}

/* هر آیتم */
.multi-select-item {
    display: flex;
    align-items: center;
    direction: rtl;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #e0e0e0;
    text-align: right;
}

.multi-select-item:hover {
    background: rgba(107, 219, 60, 0.1);
}

/* Checkbox */
.multi-select-item input[type="checkbox"] {
    width: 16px !important;
    min-width: 16px;
    max-width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: #6bdb3c;
    flex: 0 0 16px;
}

/* متن آیتم */
.multi-select-item label {
    cursor: pointer;
    flex: 1;

    color: #e0e0e0;

    direction: rtl;
    text-align: right;
}
.multi-select-selected-count {
    font-size: 0.7rem;
    color: #6bdb3c;
    background: rgba(107, 219, 60, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ============================================
   استایل‌های بخش مقایسه گرید (هماهنگ با استایل کلی)
   ============================================ */

/* ===== کانتینر اصلی ===== */
.compare-container {
    background: rgba(20, 30, 45, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(107, 219, 60, 0.2);
    margin-top: 20px;
}

/* ===== هدر شباهت ===== */
.compare-header {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(107, 219, 60, 0.1);
}

.compare-header h2 {
    margin: 0;
    font-size: 1rem;
    color: #aaa;
    font-weight: 400;
}

.compare-header .score {
    font-size: 3.2rem;
    font-weight: 700;
    margin: 6px 0 2px;
}

.compare-header .score.high {
    color: #6bdb3c;
}

.compare-header .score.medium {
    color: #ffc107;
}

.compare-header .score.low {
    color: #ff6b6b;
}

.compare-header .label {
    font-size: 0.8rem;
    color: #888;
}

/* ===== دو کارت گرید ===== */
.compare-grades {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Comparator - فیلترها در عرض متوسط */
@media (max-width: 999px) {
    .compare-filter-grid {
        grid-template-columns: 1fr !important;
        gap: 6px;
    }
}

.grade-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid rgba(107, 219, 60, 0.15);
    transition: all 0.3s ease;
}

.grade-card:hover {
    border-color: rgba(107, 219, 60, 0.3);
}

.grade-card.grade-a {
    border-right: 3px solid #6bdb3c;
}

.grade-card.grade-b {
    border-right: 3px solid #ffc107;
}

.grade-card .grade-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.grade-card .grade-name.a {
    color: #6bdb3c;
}

.grade-card .grade-name.b {
    color: #ffc107;
}

.grade-card .grade-meta {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.8;
}

.grade-card .grade-meta .label {
    color: #888;
}

.grade-card .grade-meta .value {
    color: #e0e0e0;
}

.grade-card .datasheet-link {
    display: inline-block;
    margin-top: 6px;
    color: #6bdb3c;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid rgba(107, 219, 60, 0.25);
    padding: 4px 14px;
    border-radius: 6px;
    transition: all 0.2s;
    background: rgba(107, 219, 60, 0.05);
}

.grade-card .datasheet-link:hover {
    background: rgba(107, 219, 60, 0.15);
}

/* ===== ویژگی‌های هر گرید ===== */
.grade-properties {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(107, 219, 60, 0.1);
}

.grade-properties .props-title {
    font-size: 0.7rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.grade-properties .prop-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.grade-properties .prop-item .prop-name {
    color: #888;
}

.grade-properties .prop-item .prop-value {
    color: #e0e0e0;
    font-weight: 500;
}

/* ===== توصیه ===== */
.compare-recommendation {
    text-align: center;
    padding: 12px 16px;
    background: rgba(107, 219, 60, 0.06);
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    border: 1px solid rgba(107, 219, 60, 0.08);
    color: #ccc;
}

.compare-recommendation strong {
    color: #6bdb3c;
}

/* ===== جدول تفاوت‌ها ===== */
.diff-details {
    margin-top: 12px;
}

.diff-details summary {
    cursor: pointer;
    color: #6bdb3c;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 0;
}

.diff-details summary:hover {
    color: #8ae85e;
}

.diff-table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.diff-table thead {
    background: rgba(107, 219, 60, 0.06);
}

.diff-table th {
    padding: 10px 14px;
    text-align: right;
    border-bottom: 2px solid rgba(107, 219, 60, 0.1);
    color: #aaa;
    font-weight: 600;
    font-size: 0.8rem;
}

.diff-table td {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #ccc;
}

.diff-table tr:last-child td {
    border-bottom: none;
}

.diff-table .diff-highlight {
    color: #ff6b6b;
    font-weight: 700;
}

.diff-table .diff-medium {
    color: #ffc107;
    font-weight: 600;
}

.diff-table .grade-a-col {
    color: #6bdb3c;
    font-weight: 500;
}

.diff-table .grade-b-col {
    color: #ffc107;
    font-weight: 500;
}

.diff-table .prop-name-col {
    color: #888;
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 768px) {
    .compare-grades {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .compare-header .score {
        font-size: 2.6rem;
    }

    .grade-card {
        padding: 14px 16px;
    }

    .diff-table {
        font-size: 0.75rem;
    }

    .diff-table th,
    .diff-table td {
        padding: 6px 10px;
    }
}

/* ============================================
   یوتیلیتی‌ها
   ============================================ */
.text-success {
    color: #6bdb3c;
}

.text-center {
    text-align: center;
}

.text-danger {
    color: #ff6b6b;
}

.text-warning {
    color: #ffc107;
}

.text-muted {
    color: rgba(255, 255, 255, 0.5);
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* استایل برای پیامهای وضعیت */
.form-card .text-info,
.form-card .text-danger,
.form-card .text-warning {
    text-align: center;
    padding: 20px;
}

/* بهبود نمایش نتایج در موبایل */
@media (max-width: 768px) {
    .results-table {
        font-size: 0.8rem;
    }
    .results-table td, 
    .results-table th {
        padding: 6px 8px;
    }
}

/* ===== مودال تشویقی ===== */
.guide-modal {
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalPop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.guide-modal a:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 25px rgba(107,219,60,0.3);
}

.guide-modal button:hover {
    background: rgba(255,255,255,0.08);
}

/* =========================================================
   GRADE SELECTOR - DETAIL MODAL
   ========================================================= */

.detail-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.78);
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    backdrop-filter: blur(4px);

    animation: fadeInOverlay 0.25s ease;

    direction: rtl;
}


/* ---------------------------------------------------------
   Modal Content
   --------------------------------------------------------- */

.detail-modal-content {
    position: relative;

    width: 94%;
    max-width: 820px;
    max-height: 90vh;

    overflow-y: auto;

    background: linear-gradient(
        145deg,
        #1a1a2e,
        #16213e
    );

    border: 1px solid rgba(107, 219, 60, 0.16);

    border-radius: 20px;

    padding: 26px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.65);

    animation: modalPop 0.25s ease;

    scrollbar-width: thin;
    scrollbar-color:
        rgba(107, 219, 60, 0.35)
        rgba(0, 0, 0, 0.2);
}


/* ---------------------------------------------------------
   Close
   --------------------------------------------------------- */

.detail-modal-close {
    position: absolute;

    top: 18px;
    left: 18px;

    width: 34px;
    height: 34px;

    border-radius: 50%;

    background: rgba(255, 68, 68, 0.08);

    color: #ff6b6b;

    border: 1px solid rgba(255, 68, 68, 0.15);

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.detail-modal-close:hover {
    background: rgba(255, 68, 68, 0.18);
    transform: scale(1.05);
}


/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.detail-modal-header {
    display: flex;
    align-items: center;

    gap: 12px;

    padding-left: 45px;

    margin-bottom: 20px;
}

.detail-modal-icon {
    width: 42px;
    height: 42px;

    border-radius: 12px;

    background: rgba(107, 219, 60, 0.08);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.4rem;

    flex-shrink: 0;
}

.detail-modal-title {
    color: #6bdb3c;

    font-size: 1.25rem;

    font-weight: bold;

    line-height: 1.4;
}

.detail-modal-grade-meta {
    color: #888;

    font-size: 0.78rem;

    margin-top: 4px;

    line-height: 1.6;
}


/* ---------------------------------------------------------
   Score Summary
   --------------------------------------------------------- */

.detail-modal-summary {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;

    margin-bottom: 22px;
}

.detail-score-box,
.detail-confidence-box {
    background: rgba(0, 0, 0, 0.24);

    border-radius: 13px;

    padding: 15px 18px;

    border: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-score-box {
    border-right: 3px solid #6bdb3c;
}

.detail-confidence-box {
    border-right: 3px solid rgba(107, 219, 60, 0.4);
}

.detail-score-label,
.detail-confidence-label {
    color: #888;

    font-size: 0.75rem;

    margin-bottom: 5px;
}

.detail-score-value {
    color: #6bdb3c;

    font-size: 1.8rem;

    font-weight: bold;

    line-height: 1.2;
}

.detail-score-caption {
    color: #666;

    font-size: 0.68rem;

    margin-top: 4px;
}

.detail-confidence-value {
    color: #6bdb3c;

    font-size: 1.15rem;

    font-weight: bold;

    margin-top: 7px;
}


/* ---------------------------------------------------------
   Section Title
   --------------------------------------------------------- */

.detail-section-title {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #ddd;

    font-size: 0.92rem;

    font-weight: bold;

    padding-bottom: 9px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.06);

    margin-bottom: 12px;
}


/* ---------------------------------------------------------
   Breakdown Table
   --------------------------------------------------------- */

.detail-breakdown-container {
    width: 100%;

    overflow-x: auto;

    background: rgba(0, 0, 0, 0.22);

    border-radius: 12px;

    border: 1px solid rgba(255, 255, 255, 0.035);
}

.detail-breakdown-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 0.78rem;

    min-width: 650px;
}

.detail-breakdown-table th {
    padding: 11px 10px;

    text-align: right;

    color: #6bdb3c;

    font-weight: bold;

    background: rgba(107, 219, 60, 0.035);

    border-bottom:
        1px solid rgba(107, 219, 60, 0.12);

    white-space: nowrap;
}

.detail-breakdown-table td {
    padding: 11px 10px;

    text-align: right;

    color: #ddd;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.035);

    vertical-align: middle;
}

.detail-breakdown-table tr:last-child td {
    border-bottom: none;
}

.detail-breakdown-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.018);
}


/* ---------------------------------------------------------
   Property Name
   --------------------------------------------------------- */

.detail-property-name {
    color: #fff;

    font-weight: bold;

    line-height: 1.4;
}

.detail-property-unit {
    color: #777;

    font-size: 0.68rem;

    margin-top: 3px;
}


/* ---------------------------------------------------------
   Property Score
   --------------------------------------------------------- */

.detail-property-score {
    color: #ddd;

    font-weight: bold;

    white-space: nowrap;
}


/* ---------------------------------------------------------
   Status
   --------------------------------------------------------- */

.detail-breakdown-table .status-match {
    color: #6bdb3c;

    font-weight: bold;

    white-space: nowrap;
}

.detail-breakdown-table .status-close {
    color: #ffa500;

    font-weight: bold;

    white-space: nowrap;
}

.detail-breakdown-table .status-missing {
    color: #ff6b6b;

    font-weight: bold;

    white-space: nowrap;
}


/* ---------------------------------------------------------
   Empty
   --------------------------------------------------------- */

.detail-empty-row {
    text-align: center !important;

    color: #777 !important;

    padding: 25px !important;
}


/* ---------------------------------------------------------
   Explanation
   --------------------------------------------------------- */

.detail-explanation {
    display: flex;

    gap: 11px;

    margin-top: 16px;

    padding: 14px 16px;

    background: rgba(107, 219, 60, 0.035);

    border-right:
        3px solid #6bdb3c;

    border-radius: 10px;
}

.detail-explanation-icon {
    font-size: 1.15rem;

    flex-shrink: 0;
}

.detail-explanation-title {
    color: #6bdb3c;

    font-size: 0.82rem;

    font-weight: bold;

    margin-bottom: 5px;
}

.detail-explanation-text {
    color: #aaa;

    font-size: 0.76rem;

    line-height: 1.8;
}


/* ---------------------------------------------------------
   Help
   --------------------------------------------------------- */

.detail-help-box {
    display: flex;

    gap: 10px;

    margin-top: 12px;

    padding: 12px 15px;

    background: rgba(255, 255, 255, 0.025);

    border-radius: 9px;
}

.detail-help-icon {
    font-size: 1rem;

    flex-shrink: 0;
}

.detail-help-title {
    color: #aaa;

    font-size: 0.75rem;

    font-weight: bold;

    margin-bottom: 3px;
}

.detail-help-text {
    color: #666;

    font-size: 0.68rem;

    line-height: 1.7;
}


/* ---------------------------------------------------------
   Actions
   --------------------------------------------------------- */

.detail-modal-actions {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    flex-wrap: wrap;

    margin-top: 20px;
}

.detail-modal-btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 9px 22px;

    border-radius: 9px;

    font-size: 0.82rem;

    cursor: pointer;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        background 0.2s ease;
}

.detail-modal-btn:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.detail-modal-btn-secondary {
    background: rgba(255, 255, 255, 0.05);

    color: #aaa;

    border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-modal-btn-primary {
    background:
        linear-gradient(
            135deg,
            #6bdb3c,
            #4caf50
        );

    color: #000;

    font-weight: bold;

    border: none;
}


/* ---------------------------------------------------------
   Animations
   --------------------------------------------------------- */

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalPop {
    from {
        transform: scale(0.94);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


/* ---------------------------------------------------------
   Scrollbar
   --------------------------------------------------------- */

.detail-modal-content::-webkit-scrollbar {
    width: 5px;
}

.detail-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);

    border-radius: 10px;
}

.detail-modal-content::-webkit-scrollbar-thumb {
    background: rgba(107, 219, 60, 0.3);

    border-radius: 10px;
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .detail-modal-content {
        width: 96%;

        max-height: 92vh;

        padding: 19px;

        border-radius: 16px;
    }

    .detail-modal-header {
        padding-left: 38px;
    }

    .detail-modal-title {
        font-size: 1.05rem;
    }

    .detail-modal-summary {
        grid-template-columns: 1fr;
    }

    .detail-score-value {
        font-size: 1.55rem;
    }

    .detail-breakdown-table {
        font-size: 0.72rem;
    }

    .detail-breakdown-table th,
    .detail-breakdown-table td {
        padding: 9px 8px;
    }

    .detail-modal-btn {
        width: 100%;
    }
}

/* ===== دکمه شناور راهنما ===== */
.help-float-btn {
    position: fixed !important;
    top: 200px !important;
    left: 56px !important	;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgb(24, 45, 97);
    border: 1px solid #6bdb3c;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    flex-direction: column;
}

.help-float-btn:hover {
    transform: scale(1.05);
    background: #5bbd30;
}

.help-float-btn .help-float-icon:hover {
    color: #000;
}

.help-float-btn .help-float-icon {
    font-size: 50px;
    font-weight: bold;
    line-height: 1;
    color: #6bdb3c;
}


.help-float-text {
    position: absolute;
    bottom: 75px;  /* به سمت بالا (بالای دکمه) */
    left: 50%;
    transform: translateX(-50%);  /* وسط‌چین نسبت به دکمه */
    background: rgba(0, 0, 0, 0.95);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    color: #6bdb3c;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 999999 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(107, 219, 60, 0.3);
    backdrop-filter: blur(8px);
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 500;
}


.help-float-btn:hover .help-float-text {
    opacity: 1;
    visibility: visible;
    bottom: 85px;  /* کمی بالاتر از دکمه با فاصله بیشتر */
}


/* ===== انیمیشن ظاهر شدن ===== */
@keyframes floatIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.help-float-btn.show {
    animation: floatIn 0.4s ease forwards;
}

.tool-header .account-status {
    font-size: 0.85rem;
    color: #6bdb3c !important;
    margin-top: 8px;
    margin-bottom: 0;
}

.tool-header .login-notice {
    font-size: 0.9rem;
    color: #ffd166 !important;
    margin-top: 8px;
    margin-bottom: 0;
}

.tool-header .usage-error {
    font-size: 0.9rem;
    color: #ff6b6b !important;
    margin-top: 8px;
}

.account-separator {
    margin: 0 8px;
    opacity: 0.7;
}

.compare-explanation {
    margin: 20px 0;
    padding: 18px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    line-height: 1.9;
    text-align: right;
}

.compare-explanation-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffd166;
}

.compare-explanation p {
    margin-bottom: 10px;
}

.compare-explanation-note {
    font-size: 0.9rem;
    opacity: 0.85;
}

.compare-manual-link {
    margin-bottom: 0 !important;
}

.compare-manual-link a {
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 800px) {
    .compare-grades-selector {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .compare-grades-selector > div:nth-child(2) {
        padding-top: 0 !important;
        transform: rotate(90deg);
    }
}


@media (max-width: 400px) {
    .compare-filter-grid {
        grid-template-columns: 1fr !important;
    }
}
