/* فونت برای زبان فارسی */
html[lang="fa"] body {
    font-family: 'IRANYekanX', Tahoma, sans-serif !important;
}

/* فونت برای زبان‌های انگلیسی و فرانسوی */
html[lang="en"] body, 
html[lang="fr"] body {
    font-family: 'Noto Sans', sans-serif !important;
}

/* --- General Elements --- */
h1 {
    font-size: 40px !important;
    color: #195df5 !important;
    font-weight: 900 !important;
}

h2 {
    font-size: 24px !important;
    color: #516ef9 !important;
    font-weight: 700 !important;
}

h3 {
    font-size: 20px !important;
}

h4 {
    font-size: 17px !important;
    font-weight: bold !important;
    color: #fd625e !important;
}

.shadow-2xl {
    box-shadow: rgba(0, 0, 0, 0.25) 0px 16px 20px -19px !important;
}

/* --- Selects & Inputs --- */
select {
    border-radius: 14px !important;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1.5rem;
}

/* تنظیم جهت فلش دراپ‌داون */
html[dir="rtl"] select {
    background-position: left 0.75rem center;
    padding-left: 2.5rem;
}

html[dir="ltr"] select {
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

/* --- Result Cards --- */
.result-card {
    transition: all 0.3s ease-in-out;
    border-width: 1px;
    border-style: solid;
    border-color: #e2e8f0;
}

/* نوار رنگی کنار کارت بر اساس جهت صفحه */
html[dir="rtl"] .result-card {
    border-right-width: 6px !important;
}

html[dir="ltr"] .result-card {
    border-left-width: 6px !important;
}

.result-card-strong { border-color: #16a34a !important; }
.result-card-eligible { border-color: #2563eb !important; }
.result-card-potential { border-color: #f59e0b !important; }
.result-card-ineligible { border-color: #dc2626 !important; opacity: 0.7; }
.result-card-archived { border-color: #6b7280 !important; opacity: 0.6; }

/* --- Tooltip --- */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 250px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 50;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: normal;
    font-size: 13px;
    line-height: 1.6;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* --- NOC Search --- */
#noc-results-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    background: white;
    border-top: none;
    border-radius: 0 0 14px 14px;
}

.noc-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.noc-item:hover {
    background-color: #f1f5f9;
}

/* --- Scrollbar --- */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* --- Buttons --- */
/* دکمه مشاوره ایران (آبی انتخابی شما) */
a.flex-1.text-center.bg-green-600 {
    color: #fafafa !important;
    background: #3770fc !important;
    border-radius: 19px !important;
}

/* دکمه مشاوره خارج */
a.flex-1.text-center.bg-slate-700 {
    color: #fafafa !important;
    background: #31363b !important;
    border-radius: 19px !important;
}

/* دکمه‌های زبان */
.lang-btn-active {
    background-color: #ffffff !important;
    color: #f5635f !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button.hover\:bg-slate-100:hover {
    background-color: #f1f5f9 !important;
}

/* --- Responsive --- */
@media only screen and (max-width: 580px) {
    h1 {
        font-size: 24px !important;
    }
    h2 {
        font-size: 20px !important;
    }
    .flex-col-mobile {
        flex-direction: column !important;
    }
    .p-6 {
        padding: 15px !important;
    }
    header .flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px;
    }
}

/* Utilities */
[x-cloak] { display: none !important; }
.hidden-section { display: none !important; }