/* جهت و فونت */
.ts-wrapper, .ts-dropdown, .ts-control, .ts-control input {
    direction: rtl;
    text-align: right;
    font-family: inherit;
    color: #111827;
}

/* کلاس‌های کپی‌شده از select روی wrapper نباید کادر دوباره بسازند */
.ts-wrapper.searchable-select {
    border: 0 !important;
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
    width: 100%;
}

/* باکس اصلی: هم‌شکل با اینپوت‌های فرم */
.ts-wrapper.single .ts-control,
.ts-wrapper.multi .ts-control {
    background: #fff;
    background-image: none;
    box-shadow: none;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5rem;
    min-height: 42px;
}

/* داخل جدول کالاها: هم‌اندازه با اینپوت‌های ردیف (px-2 py-1.5 text-sm) */
td .ts-wrapper { min-width: 220px; }
td .ts-wrapper.single .ts-control {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    min-height: 34px;
}

/* اینپوت داخلی نباید استایل عمومی #purchase-form input را بگیرد */
.ts-control input {
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    width: auto !important;
    border-radius: 0 !important;
}
.ts-control input::placeholder { color: #9ca3af; }

/* حالت فوکوس */
.ts-wrapper.focus .ts-control {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px #3b82f6;
    outline: none;
}

/* لیست کشویی */
.ts-dropdown {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    margin-top: 4px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
    z-index: 100;
}
.ts-dropdown .option { padding: 0.5rem 0.75rem; }
.ts-dropdown .active { background: #eff6ff; color: #111827; }
.ts-dropdown .no-results { padding: 0.5rem 0.75rem; color: #6b7280; }