/* ── Picker Display (trigger button) ── */
.org-tree-picker {
    position: relative;
    direction: rtl;
}

.org-tree-picker .picker-display {
    cursor: pointer;
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 12px;
    background-color: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.org-tree-picker .picker-display:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.08);
}

.org-tree-picker .picker-display.disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.65;
}

.org-tree-picker .picker-display.disabled:hover {
    border-color: #d0d5dd;
    box-shadow: none;
}

.org-tree-picker .picker-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13.5px;
    color: #1e293b;
}

.org-tree-picker .picker-placeholder {
    flex: 1;
    color: #94a3b8;
    font-size: 13.5px;
}

.org-tree-picker .picker-caret {
    margin-right: 8px;
    color: #3b82f6;
    font-size: 15px;
    opacity: 0.8;
}

.org-tree-picker .picker-clear {
    margin-right: 6px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    font-weight: 400;
    transition: color 0.15s;
}

.org-tree-picker .picker-clear:hover {
    color: #ef4444;
}

/* ── Modal Window ── */
.org-tree-picker-modal-window .modal-dialog {
    max-width: 520px;
}

.org-tree-picker-modal .modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ── Modal Header ── */
.org-tree-picker-modal .modal-header {
    background: #1e40af;
    color: #fff;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
    border-bottom: none;
    border-radius: 0;
}

.org-tree-picker-modal .modal-header .modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.org-tree-picker-modal .modal-header .modal-title .fa {
    margin-left: 10px;
    opacity: 0.85;
}

.org-tree-picker-modal .modal-header .close {
    color: #fff;
    opacity: 0.7;
    text-shadow: none;
    font-size: 24px;
    margin: 0;
    padding: 0;
    line-height: 1;
    transition: opacity 0.15s;
}

.org-tree-picker-modal .modal-header .close:hover {
    opacity: 1;
}

/* ── Modal Body ── */
.org-tree-picker-modal .modal-body {
    padding: 0;
    direction: rtl;
}

/* ── Search Box ── */
.org-tree-picker-modal .otp-search-box {
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.org-tree-picker-modal .otp-search-icon {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    z-index: 2;
}

.org-tree-picker-modal .otp-search-input {
    padding-right: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    height: 38px;
    background: #fff;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.org-tree-picker-modal .otp-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    outline: none;
}

.org-tree-picker-modal .otp-search-input::placeholder {
    color: #94a3b8;
}

/* ── Selected Path Indicator ── */
.org-tree-picker-modal .otp-selected-path {
    padding: 9px 18px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
    border-bottom: 1px solid #dbeafe;
    direction: rtl;
    display: flex;
    align-items: center;
}

.org-tree-picker-modal .otp-selected-path .fa {
    margin-left: 8px;
    color: #3b82f6;
    font-size: 13px;
}

/* ── Tree Panel ── */
.org-tree-picker-modal .otp-tree-panel {
    padding: 14px 18px 18px;
    min-height: 300px;
    max-height: 450px;
    overflow-y: auto;
    background: #fff;
}

.org-tree-picker-modal .otp-tree-wrapper {
    direction: rtl;
}

/* ── Kendo TreeView hierarchy indentation fix ── */
.org-tree-picker-modal .k-treeview {
    direction: rtl;
    line-height: 1.6;
}

.org-tree-picker-modal .k-treeview .k-group {
    padding-right: 20px;
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.org-tree-picker-modal .k-treeview > .k-group {
    padding-right: 0;
}

.org-tree-picker-modal .k-treeview .k-item {
    padding: 0;
    display: block;
}

.org-tree-picker-modal .k-treeview .k-top,
.org-tree-picker-modal .k-treeview .k-mid,
.org-tree-picker-modal .k-treeview .k-bot {
    display: flex;
    align-items: center;
    padding: 1px 0;
}

.org-tree-picker-modal .k-treeview .k-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 2px;
    cursor: pointer;
    color: #64748b;
    font-size: 13px;
    flex-shrink: 0;
    border-radius: 4px;
    transition: background-color 0.15s, color 0.15s;
}

.org-tree-picker-modal .k-treeview .k-icon:hover {
    background-color: #f1f5f9;
    color: #334155;
}

.org-tree-picker-modal .k-treeview .k-in {
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #334155;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    line-height: 1.4;
}

.org-tree-picker-modal .k-treeview .k-in:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.org-tree-picker-modal .k-treeview .k-in.k-state-selected {
    background-color: #eff6ff;
    color: #1e40af;
    font-weight: 600;
    border-color: #bfdbfe;
}

.org-tree-picker-modal .k-treeview .k-in.k-state-hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

/* ── Modal Footer ── */
.org-tree-picker-modal .modal-footer {
    direction: rtl;
    text-align: left;
    padding: 14px 22px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.org-tree-picker-modal .modal-footer .btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
    padding: 8px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.15s, box-shadow 0.15s;
}

.org-tree-picker-modal .modal-footer .btn-primary:hover {
    background-color: #1d4ed8;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.org-tree-picker-modal .modal-footer .btn-primary:disabled {
    background-color: #93c5fd;
    border-color: #93c5fd;
    box-shadow: none;
    cursor: not-allowed;
}

.org-tree-picker-modal .modal-footer .btn-primary .fa {
    margin-left: 6px;
}

.org-tree-picker-modal .modal-footer .btn-default {
    padding: 8px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    border-color: #d0d5dd;
    transition: all 0.15s;
}

.org-tree-picker-modal .modal-footer .btn-default:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

/* ── Scrollbar styling ── */
.org-tree-picker-modal .otp-tree-panel::-webkit-scrollbar {
    width: 5px;
}

.org-tree-picker-modal .otp-tree-panel::-webkit-scrollbar-track {
    background: transparent;
}

.org-tree-picker-modal .otp-tree-panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.org-tree-picker-modal .otp-tree-panel::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ── Empty State ── */
.org-tree-picker-modal .otp-tree-wrapper .text-muted {
    color: #94a3b8 !important;
}

.org-tree-picker-modal .otp-tree-wrapper .text-muted .fa {
    color: #cbd5e1;
}

.org-tree-picker-modal .otp-tree-wrapper .text-muted p {
    font-size: 14px;
    margin-top: 12px;
}
