/* شريط الثيم واللغة — مطابق لزر اللغة في لوحة الأدمن */
.navbar__tools,
.tl-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tl-toolbar {
    position: relative;
    z-index: 2100;
}

.tl-toolbar__btn--locked {
    cursor: default;
    opacity: 0.75;
    border-style: dashed;
}

.tl-toolbar__btn {
    flex-shrink: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 46px;
    padding: 6px 8px;
    border-radius: 12px;
    border: 1px solid rgba(94, 234, 212, .28);
    background: rgba(15, 23, 42, .65);
    color: #99f6e4;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s, transform .12s;
}

.tl-toolbar__btn:hover {
    background: rgba(20, 184, 166, .18);
    border-color: rgba(94, 234, 212, .5);
}

.tl-toolbar__btn__icon {
    font-size: 1rem;
    line-height: 1;
}

.tl-toolbar__btn__code {
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .04em;
    color: #cbd5e1;
}

.tl-dropdown-wrap {
    position: relative;
}

.tl-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    width: min(320px, calc(100vw - 24px));
    max-height: min(70vh, 520px);
    overflow: auto;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(94, 234, 212, .22);
    background: rgba(15, 23, 42, .97);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 40px rgba(2, 8, 23, .45);
    z-index: 2200;
}

.tl-dropdown__head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    color: #e2e8f0;
}

.tl-dropdown__hint,
.tl-dropdown__note {
    font-size: .72rem;
    color: #94a3b8;
    line-height: 1.45;
}

.tl-dropdown__label {
    font-size: .74rem;
    font-weight: 800;
    color: #99f6e4;
    margin: 10px 0 8px;
}

.tl-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.tl-preset {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(30, 41, 59, .55);
    color: #e2e8f0;
    cursor: pointer;
    font-family: inherit;
    font-size: .76rem;
    text-align: start;
    transition: border-color .15s, background .15s;
}

.tl-preset:hover,
.tl-preset.is-active {
    border-color: rgba(94, 234, 212, .55);
    background: rgba(20, 184, 166, .12);
}

.tl-preset__swatch {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .15);
    flex-shrink: 0;
}

.tl-dropdown__custom {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, .15);
}

.tl-custom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tl-custom-row label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: .72rem;
    color: #cbd5e1;
}

.tl-color-input {
    width: 100%;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.tl-custom-apply {
    width: 100%;
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(94, 234, 212, .35);
    background: rgba(20, 184, 166, .16);
    color: #ccfbf1;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
}

.tl-custom-apply:hover {
    background: rgba(20, 184, 166, .28);
}

.tl-custom-reset {
    width: 100%;
    margin-top: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .35);
    background: rgba(30, 41, 59, .55);
    color: #e2e8f0;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
}
.tl-custom-reset:hover {
    border-color: rgba(248, 113, 113, .45);
    color: #fecaca;
}

/* نافذة اللغة */
.tl-modal[hidden] { display: none !important; }

.tl-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.tl-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 23, .72);
    border: none;
    cursor: pointer;
}

.tl-modal__panel {
    position: relative;
    width: min(560px, 100%);
    max-height: 90vh;
    overflow: auto;
    border-radius: 16px;
    border: 1px solid rgba(94, 234, 212, .2);
    background: #0f172a;
    box-shadow: 0 24px 48px rgba(0, 0, 0, .4);
}

.tl-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, .15);
}

.tl-modal__head h2 {
    margin: 0;
    font-size: 1rem;
    color: #e2e8f0;
}

.tl-modal__close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.tl-modal__body {
    padding: 16px 18px 20px;
}

.tl-modal__body--lang .nav-lang-bar {
    margin: 0;
}

@media (max-width: 768px) {
    .tl-dropdown {
        inset-inline-end: auto;
        inset-inline-start: 0;
    }
}
