/* ============================================================================
 * profile.css — страница профиля пользователя в общей визуальной системе
 * раздела «Лента новостей» (nf-дизайн, Preline-inspired).
 *
 * Все правила ограничены .nf-root .nf-profile и используют nf-токены из
 * newsfeed.css (.nf-root). JS-селекторы и data-атрибуты шаблона не меняются.
 * ========================================================================== */

/* ============================================================================
 * Шапка профиля: карточка поверх hero
 * ========================================================================== */

/* Карточка шапки, перекрывающая градиентный hero */
.nf-root .nf-profile .profile-header.profile {
  margin: 0;
}

.nf-root .nf-profile .nf-profile__header {
  position: relative;
  z-index: 2;
  margin-bottom: 22px;
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius-lg);
  background: var(--nf-card);
  box-shadow: var(--nf-shadow);
}

/* Меню смены обложки/аватара в стиле nf */
.nf-root .nf-profile .ele_create_menu {
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--nf-border);
  border-radius: 13px;
  background: var(--nf-card);
  box-shadow: var(--nf-shadow-lg);
}

.nf-root .nf-profile .ele_create_menu a,
.nf-root .nf-profile .ele_create_menu .dropdown-item {
  border-radius: 9px;
  color: var(--nf-text-soft);
  font-size: 12.5px;
}

.nf-root .nf-profile .ele_create_menu a:hover,
.nf-root .nf-profile .ele_create_menu .dropdown-item:hover {
  color: var(--nf-primary);
  background: var(--nf-primary-soft);
}

.nf-root .nf-profile .ele_create_menu a svg,
.nf-root .nf-profile .ele_create_menu .dropdown-item svg {
  vertical-align: middle;
}

/* Инфо-блок: аватар, имя, кнопки, табы */
.nf-root .nf-profile .profile-info-cont {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 0 24px;
  border-radius: 0 0 var(--nf-radius-lg) var(--nf-radius-lg);
  background: var(--nf-card);
}

/* Аватар: выезжает на обложку */
.nf-root .nf-profile .profile-avatar-wrapper {
  width: 132px;
  height: 132px;
  flex: 0 0 132px;
  margin: -52px 20px 0 0;
  padding: 0;
  border: 4px solid var(--nf-card);
  border-radius: 50%;
  background: var(--nf-card);
  box-shadow: 0 0 0 1px var(--nf-border-strong), var(--nf-shadow);
  z-index: 2;
}

.nf-root .nf-profile .profile-avatar-wrapper img {
  object-fit: cover;
}

/* Имя и никнейм */
.nf-root .nf-profile .profile-name-wrapper {
  flex: 1 1 auto;
  min-width: 0;
  padding: 24px 0 16px;
}

.nf-root .nf-profile .profile-name-wrapper h3 {
  margin: 0;
  color: var(--nf-text);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.nf-root .nf-profile .profile-name-wrapper h3 svg {
  width: 20px;
  height: 20px;
  margin: -2px 0 0 4px;
  vertical-align: middle;
}

.nf-root .nf-profile .profile-name-wrapper .pro-badge {
  margin-left: 6px;
  vertical-align: middle;
}

.nf-root .nf-profile .profile-name-wrapper h6 {
  margin: 4px 0 0;
}

.nf-root .nf-profile .profile-name-wrapper p {
  margin: 4px 0 0;
  color: var(--nf-muted);
  font-size: 13px;
}

/* Кнопки действий в шапке */
.nf-root .nf-profile .profile-buttons-wrapper {
  top: 18px;
  right: 24px;
}

.nf-root .nf-profile .profile-buttons-wrapper .btn,
.nf-root .nf-profile .profile-buttons-wrapper .btn-mat {
  height: 36px;
  margin-left: 6px;
  padding: 0 17px;
  border: 0;
  border-radius: var(--nf-radius-pill);
  font-size: 13px;
  font-weight: 600;
  line-height: 36px;
  box-shadow: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nf-root .nf-profile .profile-buttons-wrapper .btn svg {
  width: 17px;
  height: 17px;
  margin: -3px 6px 0 0;
  vertical-align: middle;
}

.nf-root .nf-profile .profile-buttons-wrapper .btn-secondary {
  border: 1px solid var(--nf-border-strong);
  color: var(--nf-text-soft);
  background: var(--nf-card);
  line-height: 34px;
}

.nf-root .nf-profile .profile-buttons-wrapper .btn-secondary:hover {
  border-color: var(--nf-primary);
  color: var(--nf-primary);
  background: var(--nf-primary-soft);
}

.nf-root .nf-profile .profile-buttons-wrapper .btn-primary {
  color: #fff;
  background: var(--nf-primary);
}

.nf-root .nf-profile .profile-buttons-wrapper .btn-primary:hover {
  background: var(--nf-primary-hover);
}

.nf-root .nf-profile .profile-buttons-wrapper .btn-success {
  color: #fff;
  background: var(--nf-success);
}

.nf-root .nf-profile .profile-buttons-wrapper .btn-success:hover {
  filter: brightness(1.08);
}

.nf-root .nf-profile .profile-buttons-wrapper .btn-info {
  color: var(--nf-primary);
  background: var(--nf-primary-soft);
}

.nf-root .nf-profile .profile-buttons-wrapper .btn-info:hover {
  background: var(--nf-primary-soft-strong);
}

.nf-root .nf-profile .profile-buttons-wrapper .btn-warning {
  color: var(--nf-warning);
  background: var(--nf-warning-soft);
}

.nf-root .nf-profile .profile-buttons-wrapper .btn-danger {
  color: #fff;
  background: var(--nf-danger);
}

/* Меню «три точки» (poke/report/block) */
.nf-root .nf-profile .profile-buttons-wrapper .dropdown > .btn {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

/* Соц-ссылки */
.nf-root .nf-profile .profile-info-cont > .valign.mx-n1 {
  flex: 1 1 100%;
  padding: 6px 0 4px;
  order: 6;
}

.nf-root .nf-profile .profile-info-cont > .valign.mx-n1 svg {
  border-radius: 50%;
}

/* Табы профиля (us-select) */
.nf-root .nf-profile .nf-profile__tabs {
  flex: 1 1 100%;
  order: 7;
  margin: 14px -24px 0;
  padding: 14px 24px 16px;
  border-top: 1px solid var(--nf-border);
}

.nf-root .nf-profile .nf-profile-tabs-select {
  width: 100%;
}

.nf-root .nf-profile .nf-profile-tabs-select + .us-wrapper {
  width: 100%;
  margin-bottom: 0;
}

.nf-root .nf-profile .nf-profile-tabs-select + .us-wrapper .us-button {
  min-height: 46px;
  padding: 9px 14px;
  border: 1px solid var(--nf-border-strong);
  border-radius: var(--nf-radius-pill);
  background: var(--nf-card);
  color: var(--nf-text);
  box-shadow: none;
}

.nf-root .nf-profile .nf-profile-tabs-select + .us-wrapper .us-button:hover,
.nf-root .nf-profile .nf-profile-tabs-select + .us-wrapper .us-button.us-button-open {
  border-color: var(--nf-primary);
  color: var(--nf-primary);
  background: var(--nf-primary-soft);
  box-shadow: none;
}

.nf-root .nf-profile .nf-profile-tabs-select + .us-wrapper .us-button .us-icon-svg {
  color: var(--nf-primary);
}

.nf-root .nf-profile .nf-profile-tabs-select + .us-wrapper .us-button .us-button-label {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
}

.nf-root .nf-profile .nf-profile-tabs-select + .us-wrapper .us-caret {
  width: 26px;
  height: 26px;
  color: var(--nf-muted);
}

/* ============================================================================
 * Сайдбар: внутренности карточек в nf-стиле
 * ========================================================================== */

/* Кнопки подписки / чаевых / подарков */
.nf-root .nf-profile .nf-sidebar .btn-block {
  padding: 11px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--nf-primary);
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
}

.nf-root .nf-profile .nf-sidebar .btn-block:hover {
  background: var(--nf-primary-hover);
}

.nf-root .nf-profile .nf-sidebar .btn-block.btn_send_gift img {
  width: 17px;
  height: 17px;
  margin: -3px 7px 0 0;
  vertical-align: middle;
}

/* Поиск */
.nf-root .nf-profile .el_prof_search_bar .form-control {
  height: 42px;
  border: 1px solid var(--nf-border);
  border-radius: 12px;
  background: var(--nf-bg);
  color: var(--nf-text);
  font-size: 13px;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nf-root .nf-profile .el_prof_search_bar .form-control::placeholder {
  color: var(--nf-muted);
}

.nf-root .nf-profile .el_prof_search_bar .form-control:focus {
  border-color: var(--nf-primary);
  box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.14);
}

.nf-root .nf-profile .el_prof_search_bar .btn {
  width: 38px;
  height: 38px;
  margin-left: -42px;
  border-radius: var(--nf-radius-pill);
  background: var(--nf-primary);
  box-shadow: none;
}

.nf-root .nf-profile .el_prof_search_bar .btn:hover {
  background: var(--nf-primary-hover);
}

.nf-root .nf-profile .el_prof_search_bar .btn svg {
  width: 19px;
  height: 19px;
}

/* Проценты в заголовке «Завершение профиля» */
.nf-root .nf-profile .nf-sidebar .ele_sidebar_widget_title span {
  margin-left: auto;
  color: var(--nf-primary);
  font-size: 12px;
  font-weight: 700;
}

/* Блок «О пользователе» */
.nf-root .nf-profile .profle-meta-wrapper {
  padding: 6px 16px 16px;
}

.nf-root .nf-profile .profle-meta-wrapper > div:not(.row) {
  width: 100%;
  padding: 6px 5px 6px 32px;
  color: var(--nf-text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.nf-root .nf-profile .profle-meta-wrapper > div a {
  color: var(--nf-primary);
}

.nf-root .nf-profile .profle-meta-wrapper > div a:hover {
  text-decoration: underline;
}

.nf-root .nf-profile .profle-meta-wrapper > div > svg {
  width: 19px;
  height: 19px;
  opacity: 0.55;
  color: var(--nf-muted);
}

.nf-root .nf-profile .profle-meta-wrapper .bold {
  color: var(--nf-text);
  font-weight: 600;
}

.nf-root .nf-profile .profle-meta-wrapper hr {
  border-color: var(--nf-border);
}

/* Галерея фото в сайдбаре */
.nf-root .nf-profile .panel-photos .pb10.plr10 {
  padding: 14px 16px 16px;
}

.nf-root .nf-profile .nf-sidebar .panel-photos [class*="col-"] {
  padding: 3px;
}

.nf-root .nf-profile .panel-photos .pg_photo {
  border-radius: 10px;
}

/* ============================================================================
 * Вью-страницы (друзья, фото, альбомы, видео, блоги и т.п.)
 * ========================================================================== */

.nf-root .nf-profile .nf-layout > .col-12 {
  min-width: 0;
  margin-bottom: 22px;
}

.nf-root .nf-profile .nf-layout > .col-12:last-child {
  margin-bottom: 0;
}

/* Панель страницы: карточка в nf-стиле */
.nf-root .nf-profile .ele_page_content {
  overflow: hidden;
  padding: 22px 24px 26px;
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius-lg);
  background: var(--nf-card);
  box-shadow: var(--nf-shadow-sm);
}

.nf-root .nf-profile .ele_page_content .ele_page_hdng {
  margin-bottom: 18px;
  padding: 0;
  border: 0;
}

.nf-root .nf-profile .ele_page_hdng {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--nf-text);
  font-size: 15px;
  font-weight: 700;
}

.nf-root .nf-profile .ele_page_hdng svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--nf-primary);
}

/* Переключатель вкладок (друзья/подписчики и фото/альбомы) */
.nf-root .nf-profile .ele_switch_tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nf-root .nf-profile .ele_switch_tabs a {
  padding: 7px 14px;
  border: 1px solid var(--nf-border-strong);
  border-radius: var(--nf-radius-pill);
  color: var(--nf-text-soft);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none !important;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.nf-root .nf-profile .ele_switch_tabs a:hover {
  border-color: var(--nf-primary);
  color: var(--nf-primary);
}

.nf-root .nf-profile .ele_switch_tabs a.active {
  border-color: var(--nf-primary-soft-strong);
  color: var(--nf-primary);
  background: var(--nf-primary-soft);
}

.nf-root .nf-profile .ele_switch_tabs .badge {
  margin-left: 3px;
  padding: 2px 7px;
  border-radius: var(--nf-radius-pill);
  background: var(--nf-primary);
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: 1px;
}

/* Кнопка «Назад к альбомам» */
.nf-root .nf-profile .ele_page_hdng .btn-mat.btn-secondary {
  height: 34px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--nf-border-strong);
  border-radius: var(--nf-radius-pill);
  color: var(--nf-text-soft);
  background: var(--nf-card);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: none;
  line-height: 32px;
}

.nf-root .nf-profile .ele_page_hdng .btn-mat.btn-secondary:hover {
  border-color: var(--nf-primary);
  color: var(--nf-primary);
  background: var(--nf-primary-soft);
}

/* Сетки медиа на вью-страницах */
.nf-root .nf-profile .ele_page_content .row.no-gutters [class*="col-"],
.nf-root .nf-profile .ele_page_content.panel-photos [class*="col-"],
.nf-root .nf-profile .ele_page_content.panel-videos [class*="col-"] {
  padding: 4px;
}

.nf-root .nf-profile .ele_page_content ul.row > li {
  padding-right: 8px;
  padding-left: 8px;
}

/* «Показать ещё» в nf-стиле */
.nf-root .nf-profile .see-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  margin: 14px 0 0 !important;
  border: 1px dashed var(--nf-border-strong);
  border-radius: var(--nf-radius);
  color: var(--nf-muted);
  background: transparent;
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.nf-root .nf-profile .see-more:hover {
  border-color: var(--nf-primary);
  color: var(--nf-primary);
  background: var(--nf-primary-soft);
}

/* Медиа-панели: отступ карточки после заголовка */
.nf-root .nf-profile .panel-photos .mt14,
.nf-root .nf-profile .panel-videos .mt14 {
  margin-top: 0;
}

/* ============================================================================
 * Адаптивность
 * ========================================================================== */

@media (max-width: 767px) {
  .nf-root .nf-profile .nf-profile__header {
    margin-right: -5px;
    margin-left: -5px;
    border-radius: var(--nf-radius);
  }

  .nf-root .nf-profile .profile-info-cont {
    padding: 0 16px;
    border-radius: 0;
  }

  .nf-root .nf-profile .profile-avatar-wrapper {
    width: 108px;
    height: 108px;
    flex-basis: 108px;
    margin: -44px 14px 0 0;
  }

  .nf-root .nf-profile .profile-name-wrapper {
    padding: 16px 0 12px;
  }

  .nf-root .nf-profile .profile-name-wrapper h3 {
    font-size: 21px;
  }

  .nf-root .nf-profile .profile-buttons-wrapper {
    position: static;
    order: 3;
    flex: 1 1 100%;
    margin: -6px 0 6px;
  }

  .nf-root .nf-profile .profile-buttons-wrapper .btn {
    margin: 0 6px 6px 0;
  }

  .nf-root .nf-profile .profile-info-cont > .valign.mx-n1 {
    order: 4;
  }

  .nf-root .nf-profile .nf-profile__tabs {
    margin-right: -16px;
    margin-left: -16px;
    padding: 12px 16px 14px;
    order: 5;
  }

  .nf-root .nf-profile .ele_page_content {
    padding: 18px 16px 22px;
  }
}

@media (max-width: 575px) {
  .nf-root .nf-profile .nf-profile__header {
    margin-bottom: 16px;
  }

  .nf-root .nf-profile .profile-name-wrapper {
    padding: 14px 0 10px;
  }

  .nf-root .nf-profile .profile-buttons-wrapper .btn {
    height: 34px;
    padding: 0 14px;
    font-size: 12.5px;
    line-height: 34px;
  }

  .nf-root .nf-profile .nf-profile-tabs-select + .us-wrapper .us-button {
    min-height: 42px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nf-root .nf-profile *,
  .nf-root .nf-profile *::before,
  .nf-root .nf-profile *::after {
    transition-duration: 0.01ms !important;
  }
}
