/* ================================== */
/* ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ: БАЗА         */
/* ================================== */

/* Модальное окно профиля */
.user-profile-modal {
    width: 380px;
    max-width: 90%;
    padding: 20px 24px 28px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Шапка: крестик слева, заголовок по центру, кнопка действия справа */
.user-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.user-profile-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    width: 32px;
}
.user-profile-close:hover {
    color: var(--text);
}

.user-profile-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    flex: 1;
}

.user-profile-header-actions {
    width: 32px;
    display: flex;
    justify-content: flex-end;
}
.user-profile-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}
.user-profile-action-btn:hover {
    color: var(--primary);
}

.user-profile-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Аватар */
.user-profile-avatar-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}
.user-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: width 0.25s ease, height 0.25s ease, font-size 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Никнейм и время последнего визита */
.user-profile-nickname {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-top: 4px;
    margin-bottom: 2px;
    word-break: break-word;
}
.user-profile-lastseen {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Строки профиля (телефон, почта и т.д.) */
.user-profile-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.user-profile-row-icon {
    width: 32px;
    color: var(--text-secondary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-profile-row-text {
    flex: 1;
    font-size: 15px;
    color: var(--text);
    word-break: break-word;
}

/* Переключатель (свитч) */
.user-profile-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}
.user-profile-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.user-profile-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-elevated);
    transition: 0.3s;
    border-radius: 34px;
}
.user-profile-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}
input:checked + .user-profile-slider {
    background-color: var(--primary);
}
input:checked + .user-profile-slider:before {
    transform: translateX(24px);
}

/* Служебные элементы */
.user-profile-header-left {
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}