/* Header Styles - перенесены из существующих компонентов */

/* Base Header Styles */
.header2 {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding-top: 0;
}

.header2-content {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Состояние при скроллинге */
.header2.scrolled {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header2.scrolled .header2-content {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.header2-brand .header2-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    transition: color 0.2s ease;
}

.header2-brand .header2-title:hover {
    color: #0d6efd;
}

.header2-nav .nav-link {
    color: #6c757d;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
}

.header2-nav .nav-link:hover {
    color: #0d6efd;
}

/* Кнопки в стиле хлебных крошек */
.header2-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 10px;
}

.header2-nav-link:hover {
    color: #007bff;
    background: #f8f9fa;
    text-decoration: none;
}

.header2-nav-link.active {
    color: #495057;
    font-weight: 600;
    background: #e9ecef;
}

.header2-nav-link.logout-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
}

.header2-nav-link.logout-btn:hover {
    color: #dc3545;
    background: #f8f9fa;
}

.header2-actions .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.header2-mobile .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.header2-mobile-nav .nav-link {
    color: #6c757d;
    padding: 0.75rem 0;
    font-weight: 500;
    transition: color 0.2s ease;
}

.header2-mobile-nav .nav-link:hover {
    color: #0d6efd;
}

/* Стили мобильного меню */
.mobile-menu-section {
    padding: 0.5rem;
}

.mobile-menu-section .user-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-menu-section .avatar-circle {
    width: 48px;
    height: 48px;
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: #495057;
}

.mobile-menu-section .user-details {
    text-align: center;
}

.mobile-menu-section .user-name {
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.mobile-menu-section .user-role {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    margin: 2px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-menu-section .menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #212529;
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.menu-item i {
    width: 1.25rem;
    margin-right: 0.75rem;
    color: #6c757d;
}

.menu-item:hover {
    background-color: #f8f9fa;
    color: #16181b;
    text-decoration: none;
}

.menu-item.admin {
    color: #6c757d;
}

.menu-item.admin:hover {
    background-color: #f8f9fa;
    color: #16181b;
}

.menu-item.logout {
    color: #dc3545;
}

.menu-item.logout:hover {
    background-color: #f8f9fa;
}

/* Мобильный блок пользователя */
.mobile-user-menu {
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0.5rem 0;
    border: 1px solid #dee2e6;
}

.mobile-user-menu .user-info {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.mobile-user-menu .avatar-circle {
    width: 48px;
    height: 48px;
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: #495057;
}

.mobile-user-menu .user-info span {
    font-size: 1rem;
    color: #212529;
    display: block;
}

.mobile-user-menu .user-actions {
    display: flex;
    flex-direction: column;
}

.mobile-user-menu .menu-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #212529;
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
}

.mobile-user-menu .menu-item i {
    width: 1.25rem;
    margin-right: 0.5rem;
    color: #6c757d;
}

.mobile-user-menu .menu-item:hover {
    background-color: #f8f9fa;
    color: #16181b;
}

.mobile-user-menu .menu-item.admin:hover {
    background-color: #f8f9fa;
}

.mobile-user-menu .menu-item.logout {
    color: #dc3545;
}

.mobile-user-menu .menu-item.logout:hover {
    background-color: #f8f9fa;
}

/* Стили для квадратной иконки пользователя */
.user-icon-square {
    width: 32px;
    height: 32px;
    background: #6c757d;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.user-icon-square i {
    color: white;
    font-size: 14px;
}

.user-icon-square:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Стили для выпадающего меню пользователя */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 12px;
    min-width: 240px;
    width: 240px;
}

.dropdown-header {
    padding: 8px 16px 12px 16px;
    margin: 0 0 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.user-role {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6c757d;
    margin: 2px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-item {
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 0;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.dropdown-item.text-danger {
    color: #dc3545 !important;
}

.dropdown-item.text-danger:hover {
    background-color: #f8f9fa;
    color: #c82333 !important;
}

/* Стили для аватара в выпадающем меню (старые, оставляем для совместимости) */
.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
    font-weight: bold;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header2-brand .header2-title {
        font-size: 1.25rem;
    }
    
    .header2-actions .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Мобильная версия - всегда как при скроллинге */
    .header2 {
        padding-top: 0 !important;
        background: white !important;
        box-shadow: none !important;
    }
    
    .header2-content {
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0.75rem 0.0625rem !important;
    }
}
