/* ======================================================
	/domains/gromadan.com/public_html/css/user/style.css .profile-loc-link
   USER PROFILE PAGE STYLES
   Loaded together with /css/style.css (which provides the .photos-grid
   shared design tokens: --primary, --surface, --radius-*, etc.
   and the .sidebar / .nav-item / .icon-btn / .theme-switch rules
   already defined there and reused here as-is).
   ====================================================== */

/* css/style.css задаёт body{overflow:hidden;height:100vh} — это нужно
   только для главной (там фикс-высотный свайп-экран). На странице
   профиля контента больше экрана, поэтому здесь явно возвращаем
   обычный скролл документа. Один селектор, JS не нужен. */
body.page-user {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
}

.user-app {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    padding: 28px;
    max-width: 1560px;
    margin: 0 auto;
    min-height: 100vh;
}

.user-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

/* === HEADER BLOCK (cover + avatar + bio, собираются вместе) === */
.user-header-block {
    position: relative;
}

/* === AVATAR (вынесен из profile-header-card в свой файл) === */
.avatar-block {
    position: absolute;
    left: 28px;
    top: 50px; /* высота cover (240px) минус высота аватара (190px) */
    z-index: 3;
}

.avatar-upload-btn {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(26,26,46,0.55);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.avatar-upload-btn:hover {
    background: rgba(26,26,46,0.75);
}

.avatar-upload-btn .icon {
    width: 16px;
    height: 16px;
}

/* === COVER PHOTO === */
.cover-wrap {
    position: relative;
    height: 240px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.cover-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-actions {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    gap: 10px;
}

.cover-actions .icon-btn {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.92);
}

/* Прозрачные кнопки поверх cover-фото: загрузка / настройки */
.cover-btn {
    width: 42px;
    height: 42px;
    background: rgba(26,26,46,0.55);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
}

.cover-btn:hover {
    background: rgba(26,26,46,0.75);
}

.btn-edit-profile {
    position: absolute;
    bottom: 18px;
    right: 18px;
    background: rgba(26,26,46,0.55);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-edit-profile:hover {
    background: rgba(26,26,46,0.75);
}

/* === PROFILE HEADER CARD === */
.profile-header-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px 28px 24px 220px;
    position: relative;
    margin-top: -110px;
}

/* Сдвигаем имя/гео/теги чуть правее от аватарки */
.profile-header-info {
    margin-left: 24px;
}

.profile-avatar-big {
    display: block;
    width: 190px;
    height: 190px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    border: 4px solid var(--surface);
    box-shadow: var(--shadow);
}

.profile-name-row {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.verified-badge {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.profile-meta-row {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 6px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Клікабельні місто/область у profile-meta-row — виглядають як звичайний
   текст, тільки з курсором-вказівником, підкреслення немає навіть при :hover.
   При наведенні — трохи темніший відтінок того ж сірого (без зміни кольору,
   без підкреслення), щоб було відчутно, що це посилання. */
.profile-loc-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.profile-loc-link:hover {
    color: #444;
    text-decoration: none;
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ECC71;
    display: inline-block;
    margin-left: 4px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tag-pill {
    background: var(--primary-light);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* === VISITORS ROW === */
.visitors-row {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
}

.visitors-row::-webkit-scrollbar { display: none; }

.visitor-avatar {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}

.visitor-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.visitor-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #FF4757;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
}

/* === SECTION TABS (заголовок photos-section — он же переключатель) === */
.section-tabs {
    display: flex;
    gap: 22px;
    margin-bottom: 6px;
}

/* === PHOTOS SECTION === */
.photos-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 22px;
}

.photos-title {
    font: inherit;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-secondary);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    border: none;
    background: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.photos-title.active {
    color: var(--text-primary);
}

.photos-title.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 32px;
    height: 3px;
    border-radius: 2px;
    background: var(--primary);
}

.photos-title:disabled {
    opacity: 0.45;
    cursor: default;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 16px;
}

.photo-item {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* .photo-item теперь <button> — сбрасываем нативные стили кнопки */
.photo-item {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.photo-distance {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    color: white;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Подпись реального фото — заменяет заглушку .photo-distance в grid.php */
.photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 10px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%);
    color: white;
    font-size: 0.8rem;
    line-height: 1.3;
}

.photos-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* === POSTS TAB (вкладка "Posts" в профиле) ===
   Карточки поста (.post-card, .feed-list) уже стилизованы в
   /css/post/style.css (подключён глобально в header.php) — здесь
   только гасим "рамку" .photos-section, чтобы не было двойного
   фона/тени вокруг уже оформленных карточек постов. */
.posts-section-mode {
    background: none;
    box-shadow: none;
    padding: 0;
}

.posts-section-mode .section-tabs {
    padding: 0 4px;
    margin-bottom: 16px;
}

/* .feed-list по умолчанию центрирует карточки (нужно для ленты на
   главной, где .main шире карточки) — в профиле выравниваем карточки
   постов по левому краю, вровень с visitors-row/profile-header-card.
   Ширину самой карточки (.post-card, max-width:760px) не трогаем. */
.posts-section-mode .feed-list {
    align-items: flex-start;
}

/* === ABOUT TAB ("Анкета") ===
   В отличие от Photos/Posts (posts-section-mode, без своей рамки),
   здесь контент — отдельная белая карточка под табами, как на макете. */
.about-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 22px 28px;
}

.about-grid {
    display: flex;
    flex-direction: column;
}

.about-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
}

.about-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.about-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.about-item-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary);
}

.about-item-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.about-item-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.about-item-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

/* === SETTINGS PAGE (user/setting/index.php) ===
   Переиспользует токены из style.css (--surface, --radius-*, --primary),
   новых цветов/шрифтов не заводим — 0 доп. запросов на шрифты/картинки. */
.settings-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 22px 28px;
    margin-bottom: 20px;
}

.settings-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0 0 16px;
    letter-spacing: 0.02em;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-field.full {
    grid-column: 1 / -1;
}

.settings-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.settings-field input,
.settings-field select,
.settings-field textarea {
    font: inherit;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border, rgba(0,0,0,0.12));
    background: transparent;
    color: var(--text-primary);
}

.settings-field textarea {
    resize: vertical;
    min-height: 90px;
}

/* Заблоковані поля (Username, Країна, Стать) — не редагуються тут */
.settings-field input:disabled,
.settings-field select:disabled {
    background: var(--bg);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 1; /* браузери інколи сірять текст select самі — фіксуємо однаковий вигляд */
}

/* Кнопка "Місто" — відкриває popup, перевикористовує .locale-overlay/.locale-modal з css/style.css */
.location-picker-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font: inherit;
    text-align: left;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border, rgba(0,0,0,0.12));
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
}

.location-picker-btn:hover {
    border-color: var(--primary);
}

.location-picker-icon {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.settings-word-count {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.btn-save-settings {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.settings-saved-msg {
    font-size: 0.85rem;
    color: #2ECC71;
    margin-bottom: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease, margin-bottom 0.4s ease;
}

.settings-saved-msg.is-visible {
    opacity: 1;
    max-height: 40px;
    margin-bottom: 14px;
}

/* Секции внутри одного .settings-card — разделены линией, без отдельных
   теней/фонов (переиспользует .about-row border как визуальный паттерн,
   уже есть в этом файле, доп. правил не заводим). */
.settings-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
}

.settings-section:first-child {
    padding-top: 0;
}

.settings-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Чипы для множественного выбора (мови/хобі) — чистый CSS, без JS.
   :has() поддерживается всеми актуальными десктоп/мобильными браузерами
   (Chrome/Edge/Safari, Firefox 121+) — не добавляет ни байта JS. */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border, rgba(0,0,0,0.12));
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.chip-label input {
    display: none;
}

.chip-label:has(input:checked) {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.chip-label:hover {
    border-color: var(--primary);
}

@media (max-width: 700px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* TODO: адаптив под мобильные (<=900px) — сейчас страница только десктопная,
   аналогично тому как .app адаптируется в mobile_style.css для главной.
   Сделаем отдельным шагом по аналогии с mobile_style.css. */