/*!
 * noUiSlider 15.7.0 - Customized for Mazraeh Theme
 * Original: https://github.com/leongersen/noUiSlider
 * 
 * تغییرات:
 * - رنگ‌های هماهنگ با تم مزرعه (قهوه‌ای، طلایی، سبز)
 * - گردی بیشتر (border-radius بالا)
 * - سایه‌های نرم‌تر
 * - handleهای بزرگ‌تر و جذاب‌تر
 * - tooltip با فونت فارسی و استایل اختصاصی
 */

.noUi-target,
.noUi-target * {
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -ms-touch-action: none;
    touch-action: none;
    -ms-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.noUi-target {
    position: relative;
}

.noUi-base,
.noUi-connects {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.noUi-connects {
    overflow: hidden;
    z-index: 0;
}

.noUi-connect,
.noUi-origin {
    will-change: transform;
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    -ms-transform-origin: 0 0;
    -webkit-transform-origin: 0 0;
    -webkit-transform-style: preserve-3d;
    transform-origin: 0 0;
    transform-style: flat;
}

.noUi-txt-dir-rtl.noUi-horizontal .noUi-origin {
    left: 0;
    right: auto;
}

.noUi-vertical .noUi-origin {
    top: -100%;
    width: 0;
}

.noUi-horizontal .noUi-origin {
    height: 0;
}

.noUi-handle {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    position: absolute;
}

.noUi-touch-area {
    height: 100%;
    width: 100%;
}

.noUi-state-tap .noUi-connect,
.noUi-state-tap .noUi-origin {
    -webkit-transition: transform 0.3s;
    transition: transform 0.3s;
}

.noUi-state-drag * {
    cursor: inherit !important;
}

/* ========== Horizontal ========== */
.noUi-horizontal {
    height: 8px;
}

.noUi-horizontal .noUi-handle {
    width: 28px;
    height: 28px;
    right: -14px;
    top: -11px;
}

/* ========== Vertical ========== */
.noUi-vertical {
    width: 8px;
}

.noUi-vertical .noUi-handle {
    width: 28px;
    height: 28px;
    right: -11px;
    bottom: -14px;
}

.noUi-txt-dir-rtl.noUi-horizontal .noUi-handle {
    left: -14px;
    right: auto;
}

/* ========== Target (مسیر اسلایدر) ========== */
.noUi-target {
    background: #f0e5d5;
    background: linear-gradient(180deg, #f5ede0 0%, #e8d9c2 100%);
    border-radius: 20px;
    border: 1px solid #d4c4a8;
    box-shadow: inset 0 2px 4px rgba(139, 90, 43, 0.08);
}

/* ========== Connects (پس‌زمینه محدوده انتخاب نشده) ========== */
.noUi-connects {
    border-radius: 20px;
}

/* ========== Connect (محدوده انتخاب شده - رنگ اصلی) ========== */
.noUi-connect {
    background: linear-gradient(135deg, #c48a3c, #8b5a2b);
    background: linear-gradient(90deg, #c5954b 0%, #9e6b33 50%, #7d4f22 100%);
    border-radius: 20px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* ========== Draggable ========== */
.noUi-draggable {
    cursor: ew-resize;
}

.noUi-vertical .noUi-draggable {
    cursor: ns-resize;
}

/* ========== Handle (دسته‌های اسلایدر) ========== */
.noUi-handle {
    border: 3px solid #c48a3c;
    border-radius: 50%;
    background: #ffffff;
    background: radial-gradient(circle at 40% 40%, #ffffff 0%, #f9f5ef 100%);
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.noUi-handle:hover {
    transform: scale(1.15);
    border-color: #8b5a2b;
    box-shadow: 0 5px 18px rgba(139, 90, 43, 0.35);
}

.noUi-handle:active,
.noUi-active {
    border-color: #7d4f22;
    box-shadow: 0 0 0 6px rgba(196, 138, 60, 0.15);
    transform: scale(1.1);
}

/* خطوط داخل handle (حذف شد - تمیزتر) */
.noUi-handle:after,
.noUi-handle:before {
    display: none !important;
}

/* ========== Disabled ========== */
[disabled] .noUi-connect {
    background: #c5b8a5;
}

[disabled] .noUi-handle,
[disabled].noUi-handle,
[disabled].noUi-target {
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========== Pips و Values (اعداد روی مسیر) ========== */
.noUi-pips,
.noUi-pips * {
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.noUi-pips {
    position: absolute;
    color: #8b7355;
}

.noUi-value {
    position: absolute;
    white-space: nowrap;
    text-align: center;
    font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', sans-serif;
    font-size: 11px;
}

.noUi-value-sub {
    color: #bfae96;
    font-size: 10px;
}

.noUi-marker {
    position: absolute;
    background: #d4c4a8;
}

.noUi-marker-sub {
    background: #bfae96;
}

.noUi-marker-large {
    background: #8b7355;
}

/* ========== Pips Horizontal ========== */
.noUi-pips-horizontal {
    padding: 10px 0;
    height: 80px;
    top: 100%;
    left: 0;
    width: 100%;
}

.noUi-value-horizontal {
    -webkit-transform: translate(-50%, 50%);
    transform: translate(-50%, 50%);
}

.noUi-rtl .noUi-value-horizontal {
    -webkit-transform: translate(50%, 50%);
    transform: translate(50%, 50%);
}

.noUi-marker-horizontal.noUi-marker {
    margin-left: -1px;
    width: 2px;
    height: 5px;
}

.noUi-marker-horizontal.noUi-marker-sub {
    height: 10px;
}

.noUi-marker-horizontal.noUi-marker-large {
    height: 15px;
}

/* ========== Pips Vertical ========== */
.noUi-pips-vertical {
    padding: 0 10px;
    height: 100%;
    top: 0;
    left: 100%;
}

.noUi-value-vertical {
    -webkit-transform: translate(0, -50%);
    transform: translate(0, -50%);
    padding-left: 25px;
}

.noUi-rtl .noUi-value-vertical {
    -webkit-transform: translate(0, 50%);
    transform: translate(0, 50%);
}

.noUi-marker-vertical.noUi-marker {
    width: 5px;
    height: 2px;
    margin-top: -1px;
}

.noUi-marker-vertical.noUi-marker-sub {
    width: 10px;
}

.noUi-marker-vertical.noUi-marker-large {
    width: 15px;
}

/* ========== Tooltip (با تم مزرعه) ========== */
.noUi-tooltip {
    display: block;
    position: absolute;
    border: 2px solid #c48a3c;
    border-radius: 20px;
    background: linear-gradient(135deg, #3b5522, #2d4119);
    background: #3b5522;
    color: #ffffff;
    padding: 6px 14px;
    text-align: center;
    white-space: nowrap;
    font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', sans-serif;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 85, 34, 0.3);
    letter-spacing: 0;
}

.noUi-horizontal .noUi-tooltip {
    -webkit-transform: translate(-50%, 0);
    transform: translate(-50%, 0);
    left: 50%;
    bottom: 120%;
}

.noUi-vertical .noUi-tooltip {
    -webkit-transform: translate(0, -50%);
    transform: translate(0, -50%);
    top: 50%;
    right: 120%;
}

.noUi-horizontal .noUi-origin > .noUi-tooltip {
    -webkit-transform: translate(50%, 0);
    transform: translate(50%, 0);
    left: auto;
    bottom: 14px;
}

.noUi-vertical .noUi-origin > .noUi-tooltip {
    -webkit-transform: translate(0, -18px);
    transform: translate(0, -18px);
    top: auto;
    right: 28px;
}

/* ========== RTL Support (فارسی) ========== */
.noUi-txt-dir-rtl .noUi-tooltip {
    font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', sans-serif;
    direction: rtl;
}