/* DostMenu: yeniden kullanılabilir hiyerarşik menü (üst sekme barı + sol menü + iç içe alt menüler).
   Alt menü HOVER ile (CSS) VEYA ok'a tıklanınca (theme.js → .dost-open) açılır. Tema değişkenlerini
   kullanır (fallback'li); açık/koyu temayla uyumludur. */

.dost-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dost-menu-h {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    border-bottom: 2px solid var(--dost-border, #dee2e6);
}

.dost-menu-v {
    display: block;
}

.dost-mi {
    position: relative;
}

.dost-mi-row {
    display: flex;
    align-items: stretch;
}

.dost-mi-label,
.dost-mi-arrow {
    background: var(--dost-surface-2, #f1f3f5);
    border: 1px solid var(--dost-border, #dee2e6);
    color: var(--dost-text, #212529);
    cursor: pointer;
    padding: .4rem .85rem;
    font-size: .9rem;
    line-height: 1.4;
}

.dost-mi-arrow {
    padding: .4rem .5rem;
    border-left: none;
    font-size: .7rem;
}

.dost-mi-label:hover,
.dost-mi-arrow:hover {
    background: var(--dost-primary-soft, #eef2fb);
}

/* Yatay üst barda sekme görünümü */
.dost-menu-h > .dost-mi > .dost-mi-row .dost-mi-label {
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}
.dost-menu-h > .dost-mi > .dost-mi-row .dost-mi-arrow {
    border-bottom: none;
    border-radius: 0 6px 0 0;
}

/* Etkin (seçili) öğe */
.dost-mi.active > .dost-mi-row .dost-mi-label,
.dost-mi.active > .dost-mi-row .dost-mi-arrow {
    background: var(--dost-primary, #2f5bd0);
    color: #fff;
    border-color: var(--dost-primary, #2f5bd0);
}

/* ---- Alt menü (dropdown / flyout) ---- */
.dost-submenu {
    display: none;
    position: absolute;
    z-index: 1050;
    min-width: 190px;
    background: var(--dost-surface, #fff);
    border: 1px solid var(--dost-border, #dee2e6);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    padding: .25rem 0;
}

/* Yatay üst menüde alt menü AŞAĞI; dikey menüde (sol menü / iç içe) SAĞA açılır */
.dost-menu-h > .dost-mi > .dost-submenu {
    top: 100%;
    left: 0;
}
.dost-menu-v > .dost-mi > .dost-submenu {
    top: -.25rem;
    left: 100%;
    border-radius: 6px;
}

/* HOVER veya ok'la sabitlenmiş (.dost-open) → açık */
.dost-mi.has-children:hover > .dost-submenu,
.dost-mi.has-children.dost-open > .dost-submenu {
    display: block;
}

/* Alt menü içindeki öğeler: tam genişlik, kenarlıksız, sola yaslı */
.dost-submenu .dost-mi-row {
    justify-content: space-between;
}
.dost-submenu .dost-mi-label {
    border: none;
    border-radius: 0;
    width: 100%;
    text-align: left;
    background: none;
}
.dost-submenu .dost-mi-arrow {
    border: none;
    background: none;
}
.dost-submenu .dost-mi-label:hover,
.dost-submenu .dost-mi-arrow:hover {
    background: var(--dost-primary-soft, #eef2fb);
}
.dost-submenu .dost-mi.active > .dost-mi-row .dost-mi-label {
    color: var(--dost-primary, #2f5bd0);
    font-weight: 600;
    background: none;
}
