/* ========================================
   directory.css - Стили для публичной страницы справочника
   ======================================== */

.main-content {
    flex: 1;
    padding: 20px 0;
}

.service-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.service-name a {
    color: #2d343e;
    text-decoration: none;
}

/* Поиск (аналогично админке) */
.search-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.search-card .card-body {
    padding: 20px;
}
.search-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.search-input-group input {
    flex: 1;
    min-width: 150px;
    border: 1px solid #196191;
    border-radius: 4px;
    padding: 8px 12px;
}
.search-input-group button {
    background-color: #0068b1;
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}
.search-input-group button:hover {
    background-color: #3498db;
}
.search-extended {
    margin-top: 15px;
    display: none;
    gap: 15px;
    flex-wrap: wrap;
}
.search-extended .form-group {
    flex: 1;
    min-width: 150px;
}
.search-extended label {
    font-size: 12px;
    margin-bottom: 5px;
    color: #666;
}
.search-extended input {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
}
.hint {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

/* Дерево подразделений (jstree) */
.departments-tree {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.departments-tree h5 {
    margin-bottom: 15px;
    color: #0068b1;
}
.jstree-default .jstree-anchor {
    color: #0068b1;
    font-size: 14px;
}
.jstree-default .jstree-clicked {
    background: #beebff;
    border-radius: 4px;
}
.jstree-default .jstree-hovered {
    background: #e7f4f9;
}

/* Кнопки авторизации (дополнение к common.css) */
.service-name-right {
    display: flex;
    gap: 15px;
    align-items: center;
}
.auth-status {
    display: flex;
    gap: 10px;
    align-items: center;
}
.user-name {
    font-size: 14px;
    color: #0068b1;
    background: #e8f0fe;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.auth-icon-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
}
.auth-icon-btn.login { color: #0068b1; }
.auth-icon-btn.login:hover { background: #e8f0fe; }
.auth-icon-btn.logout { color: #dc3545; }
.auth-icon-btn.logout:hover { background: #ffe8e8; }
.auth-icon-btn.admin { color: #28a745; }
.auth-icon-btn.admin:hover { background: #e8f8e8; }

/* Кнопка гамбургер-меню */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    color: #0068b1;
    transition: background 0.3s;
    border-radius: 4px;
}
.mobile-menu-btn:hover {
    background: #e8f0fe;
}

@media (min-width: 768px) {
    .menu-close-btn {
        display: none;
    }
}

/* Мобильное меню на весь экран */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .departments-tree {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: white;
        z-index: 1100;
        overflow-y: auto;
        transition: left 0.3s ease;
        border-radius: 0;
        box-shadow: none;
        padding: 60px 20px 20px 20px;
    }
    .departments-tree.open {
        left: 0;
    }
    .menu-close-btn {
        position: sticky;
        top: 15px;
        right: 20px;
        background: none;
        /* border: none; */
        font-size: 28px;
        cursor: pointer;
        color: #0068b1;
        z-index: 1110;
        padding: 0px 10px;
        float: right;
        margin-left: auto;
        border: #0052a3 1px solid;
        border-radius: 10px;
    }
    .menu-close-btn:hover {
        color: #0052a3;
    }
    .search-input-group input {
        min-width: 120px;
        flex-basis: 100%;
    }
    .search-input-group button {
        flex: 1 0 auto;
    }
    /* адаптив карточек уже в components.css */
}