/* Talkov VK-like profile header.
   Подключать после talkov-stage10.css и до/после theme layer — CSS использует var(--surface), --line, --text.
*/

.vk-userinfo {
  gap: 22px;
}

/* Header cover */
.vk-profile-head {
  display: grid;
  gap: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.vk-profile-head__cover {
  position: relative;
  min-height: 360px;
  border-radius: 30px 30px 0 0;
  overflow: hidden;
  background-color: #0e1824;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--line);
  border-bottom: 0;
}

.vk-profile-head__cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,12,20,.05) 0%, rgba(6,12,20,.32) 58%, rgba(6,12,20,.60) 100%);
}

.vk-profile-head__cover-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
}

.vk-cover-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,18,28,.60);
  color: #fff;
  font-weight: 700;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.vk-cover-menu,
.vk-head-more__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 270px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  display: none;
  z-index: 30;
}

.vk-cover-menu.is-open,
.vk-head-more__menu.is-open {
  display: grid;
  gap: 4px;
}

.vk-cover-menu a,
.vk-cover-menu button,
.vk-head-more__menu a,
.vk-head-more__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  text-align: left;
}

.vk-cover-menu a:hover,
.vk-cover-menu button:hover,
.vk-head-more__menu a:hover,
.vk-head-more__item:hover {
  background: rgba(42,125,225,.08);
}

.vk-cover-menu .is-danger {
  color: #ff4747;
}

/* White VK-style identity card under cover */
.vk-profile-head__card {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0,1fr);
  gap: 18px;
  padding: 0 26px 24px;
  margin-top: -42px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 30px 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.vk-profile-head__avatar-wrap {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.vk-profile-head__avatar {
  position: relative;
  width: 138px;
  height: 138px;
  margin-top: -30px;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid var(--surface);
  box-shadow: 0 16px 36px rgba(0,0,0,.24);
  background: var(--surface-2);
}

.vk-profile-head__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vk-profile-head__online-dot {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #36c96a;
  border: 3px solid var(--surface);
}

.vk-profile-head__avatar-plus {
  position: absolute;
  left: calc(50% + 34px);
  top: 80px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 4px solid var(--surface);
  background: #2a7de1;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

.vk-profile-head__main {
  display: grid;
  gap: 10px;
  padding-top: 18px;
  min-width: 0;
}

.vk-profile-head__title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.vk-profile-head__identity {
  min-width: 0;
}

.vk-profile-head__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text);
  font-size: clamp(28px, 3.1vw, 44px);
  line-height: 1.05;
  font-weight: 800;
}

.vk-profile-head__verify {
  display: inline-flex;
  align-items: center;
}

.vk-profile-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.vk-profile-head__meta,
.vk-profile-head__submeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-top: 6px;
  color: var(--muted);
}

.vk-profile-head__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.vk-profile-head__status.is-online { color: #36c96a; }
.vk-profile-head__status.is-offline { opacity: .72; }

.vk-profile-head__login { opacity: .8; }
.vk-profile-head__signature {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.vk-head-more {
  position: relative;
}

.vk-ui-only {
  cursor: default;
}

/* Tabs */
.vk-profile-tabs {
  margin-top: 16px;
  padding: 0 4px;
}

/* Original settings block: clean cover editor */
.vk-cover-settings-block {
  border-radius: 18px;
}

.vk-cover-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 16px;
  align-items: start;
}

.vk-cover-editor__preview {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.vk-cover-editor__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.vk-cover-editor__form {
  display: grid;
  gap: 8px;
}

.vk-cover-editor__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.vk-cover-editor__hint,
.vk-cover-editor__note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.vk-cover-editor__input input,
.vk-cover-editor__input textarea,
.vk-cover-editor__input select {
  width: 100%;
  max-width: 100%;
}

/* Light theme polish */
html[data-theme="light"] .vk-cover-edit-btn {
  background: rgba(255,255,255,.86);
  color: #1f2328;
  border-color: rgba(0,0,0,.08);
}

html[data-theme="light"] .vk-profile-head__avatar,
html[data-theme="light"] .vk-profile-head__avatar-plus,
html[data-theme="light"] .vk-profile-head__online-dot {
  border-color: #fff;
}

/* Mobile */
@media (max-width: 991.98px) {
  .vk-profile-head__card {
    grid-template-columns: 120px minmax(0,1fr);
  }

  .vk-profile-head__avatar {
    width: 112px;
    height: 112px;
  }

  .vk-profile-head__title-row {
    flex-direction: column;
  }

  .vk-profile-head__actions {
    justify-content: flex-start;
  }

  .vk-cover-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .vk-profile-head__cover {
    min-height: 240px;
    border-radius: 22px 22px 0 0;
  }

  .vk-profile-head__card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 16px 16px;
    border-radius: 0 0 22px 22px;
    margin-top: -34px;
  }

  .vk-profile-head__avatar-wrap {
    justify-content: flex-start;
  }

  .vk-profile-head__avatar {
    width: 96px;
    height: 96px;
    margin-top: -18px;
  }

  .vk-profile-head__avatar-plus {
    left: 68px;
    top: 58px;
    width: 32px;
    height: 32px;
    font-size: 22px;
  }

  .vk-profile-head__main {
    padding-top: 0;
  }

  .vk-profile-head__title {
    font-size: 28px;
  }

  .vk-profile-head__cover-actions {
    top: 12px;
    right: 12px;
  }

  .vk-cover-edit-btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 14px;
  }

  .vk-cover-menu {
    min-width: 250px;
    right: 0;
  }

  .vk-profile-head__actions .btn {
    flex: 1 1 auto;
  }

  .vk-cover-editor__image {
    height: 160px;
  }
}
