/* Стили для страниц профиля пользователя */

/* Вкладки профиля */

.tabs-navigation {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    overflow: visible; /* Changed from hidden to visible to allow dropdown */
    min-height: 56px; /* Ensure minimum height for dropdown positioning */
}

.tab-button {
    flex-shrink: 0;
    padding: 14px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.tab-button:hover {
    color: #495057;
    background: rgba(0, 123, 255, 0.05);
}

.tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: #fff;
}

.tab-button i {
    font-size: 1rem;
}

.tab-button .badge {
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.tab-button.hidden {
    display: none !important;
}

.tab-button.visible {
    display: flex !important;
}

/* Альтернативный подход для скрытия вкладок */
.tab-button.hidden-alt {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    left: -9999px;
}

.tab-button.visible-alt {
    opacity: 1;
    pointer-events: auto;
    position: static;
}

/* Кнопка "Еще" */
.more-tabs-btn {
    flex-shrink: 0;
    padding: 14px 12px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-tabs-btn:hover {
    color: #495057;
    background: rgba(0, 123, 255, 0.05);
}

.more-tabs-btn i {
    font-size: 1rem;
}

/* Выпадающее меню для скрытых вкладок */
.more-tabs-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    max-width: 300px;
    z-index: 100;
    display: none;
    padding: 8px 0;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.more-tabs-dropdown.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.more-tabs-dropdown .tab-button {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #f8f9fa;
    border-radius: 0;
}

.more-tabs-dropdown .tab-button:last-child {
    border-bottom: none;
}

.more-tabs-dropdown .tab-button:hover {
    background: #f8f9fa;
}

/* Адаптивность для вкладок */
@media (max-width: 768px) {
    /* Скрываем обычные вкладки на мобильных устройствах */
    .profile-tabs {
        display: none !important;
    }

    .more-tabs-btn,
    .more-tabs-dropdown {
        display: none;
    }
}



.profile-container {

    background-color: #fff;

    border-radius: 4px;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    overflow: hidden;

    margin-bottom: 30px;

}



.profile-header {

    padding: 20px;

    background-color: #f5f7fa;

    border-bottom: 1px solid #e0e0e0;

    display: flex;

    justify-content: space-between;

    align-items: center;

}



.profile-header h2 {

    margin: 0;

    color: #2c3e50;

    font-size: 24px;

}



.profile-actions {

    display: flex;

    gap: 10px;

    align-items: baseline;

    flex-direction: column;

}



.profile-section {

    padding: 20px;

    border-bottom: 1px solid #e0e0e0;

}



.profile-section:last-child {

    border-bottom: none;

}



.profile-section h3 {

    margin-top: 0;

    margin-bottom: 15px;

    color: #3498db;

    font-size: 18px;

}



.profile-data {

    display: grid;

    grid-template-columns: 1fr;

    gap: 12px;

}



.data-row {

    display: flex;

    flex-wrap: wrap;

}



.data-label {

    /* width: 150px; */

    font-weight: 600;

    color: #555;

}



.data-value {

    flex: 1;
    min-width: 100px;
    display: flex;
    /* justify-content: flex-end; */

}



.profile-about {

    line-height: 1.6;

    color: #333;

}



/* Стили для аватарок */

.avatar-preview {

    margin-top: 10px;

    display: flex;

    flex-direction: column;

    align-items: center;

}



.avatar-placeholder {

    width: 120px;

    height: 120px;

    border-radius: 50%;

    overflow: hidden;

    /* background-color: #f5f5f5; */

    display: flex;

    align-items: center;

    justify-content: center;

    /* margin-bottom: 10px; */

}



.avatar-placeholder img {

    width: 100%;

    height: 100%;

    object-fit: cover;

}



.file-input {

    padding: 10px;

    background-color: #f9f9f9;

    border: 1px solid #ddd;

    border-radius: 4px;

    width: 100%;

    box-sizing: border-box;

}



.user-avatar {

    width: 100px;

    height: 100px;

    border-radius: 50%;

    object-fit: cover;

    margin-right: 20px;

}



.user-info {

    flex: 1;

}



/* Адаптивная верстка */

@media (max-width: 768px) {

    .profile-header {

        flex-direction: column;

        align-items: center;

        text-align: center;

    }

    

    .user-avatar {

        margin-right: 0;

        margin-bottom: 15px;

    }

    

    .profile-actions {

        margin-top: 20px;

    }

}

/* Мобильный сайдбар для вкладок профиля */
.profile-tabs-sidebar {
    position: fixed;
    top: 0;
    right: -320px; /* Скрыт за пределами экрана */
    width: 250px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.profile-tabs-sidebar.open {
    right: 0;
}

.profile-tabs-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.profile-tabs-sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

.profile-tabs-sidebar-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.profile-tabs-sidebar-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #495057;
}

.profile-tabs-sidebar-content {
    padding: 20px 0;
}

.profile-tabs-sidebar-list {
    display: flex;
    flex-direction: column;
}

.profile-tabs-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    text-decoration: none;
    color: #6c757d;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
    position: relative;
    justify-content: space-between; /* название слева, счетчик справа */
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    -ms-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
}

.profile-tabs-sidebar-item:hover {
    background: #f8f9fa;
    color: #495057;
}

.profile-tabs-sidebar-item.active {
    background: #e3f2fd;
    color: #3498db;
    border-left: 4px solid #3498db;
}

.profile-tabs-sidebar-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.profile-tabs-sidebar-item span {
    flex: 1;
    font-weight: 500;
    text-align: left;
}

.profile-tabs-sidebar-item .badge {
    flex: 0 0 auto;
    margin-left: auto;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* Оверлей для мобильного сайдбара */
.profile-tabs-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.profile-tabs-sidebar-overlay.active {
    /* Отключено для profile-tabs-sidebar-overlay */
    /* opacity: 1;
    visibility: visible; */
}

/* Скрываем сайдбар на десктопе */
@media (min-width: 769px) {
    .profile-tabs-sidebar,
    .profile-tabs-sidebar-overlay {
        display: none !important;
    }
}

/* Стили для кнопок черновиков */
.button-edit-draft, .button-delete-draft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 34px;
    margin-right: 8px;
    border: none;
    border-radius: 6px;
    background: #f4f6fa;
    color: #2c3e50;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    box-shadow: none;
}
.button-edit-draft {
    background: #1976d2;
    color: #fff;
}
.button-edit-draft:hover {
    background: #1565c0;
    color: #fff;
}
.button-delete-draft {
    background: #dc3545;
    color: #fff;
}
.button-delete-draft:hover {
    background: #b91c1c;
    color: #fff;
}
.draft-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 10px;
}

