﻿/* Переопределение для страницы профиля — убираем сайдбар, сохраняя центрированную ширину */
body.profile-page-active .cols-r {
    padding-right: 0 !important;
    padding-left: 0 !important;
    background-color: transparent !important;
}
body.profile-page-active .cols-r:before {
    display: none !important;
    content: none !important;
}
body.profile-page-active .cols-r .sidebar {
    display: none !important;
}
body.profile-page-active .cols-r .content {
    float: none !important;
    width: 100% !important;
    padding: 20px 0 !important;
}
body.profile-page-active .cols-r .content .full-wrap {
    padding: 0 !important;
}

/* Основные стили профиля */
.profile-page {
    display: grid;
    gap: 20px;
}
.profile-card {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e3e3e3;
}
.profile-card__title {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #2a2a2a;
    font-weight: 700;
    text-transform: uppercase;
}
.profile-card__title span {
    color: #f0542e;
}
.profile-hero {
    position: relative;
    min-height: 315px;
    padding: 0 24px 24px;
}
.profile-hero__cover {
    height: 170px;
    margin: 0 -24px;
    background: linear-gradient(135deg, rgba(255,74,88,.55), rgba(30,38,58,.82)), url('/templates/Vsedoramy/images/bg-slider.jpg') center/cover no-repeat;
    border-bottom: 1px solid #e3e3e3;
}
.profile-hero__main {
    display: grid;
    grid-template-columns: 180px minmax(0,1fr) auto;
    gap: 22px;
    align-items: end;
    margin-top: -74px;
}
.profile-avatar {
    position: relative;
    width: 100px;
    aspect-ratio: 1;
    border-radius: 12px;
    padding: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(0,0,0,.22);
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}
.profile-identity {
    min-width: 0;
    padding-bottom: 8px;
}
.profile-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.profile-name h1 {
    font-size: 26px;
    line-height: 1.15;
    margin: 0;
    color: #2a2a2a;
    overflow-wrap: anywhere;
}
.profile-name .profile-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f0542e;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.profile-group {
    color: #8f95a3;
    font-weight: 600;
}
.profile-actions {
    display: flex;
    gap: 10px;
    align-self: start;
    padding-top: 14px;
}
.profile-action {
    height: 36px;
    padding: 0 14px;
    border-radius: 4px;
    background: #f4f6fa;
    color: #2a2a2a;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid #e3e3e3;
}
.profile-action a {
    color: inherit;
    text-decoration: none;
}
.profile-action:hover {
    background: #f0542e;
    border-color: #f0542e;
    color: #fff;
}
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
    margin-top: 20px;
}
.profile-stat {
    background: #f4f6fa;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    padding: 14px;
    min-width: 0;
}
.profile-stat b {
    display: block;
    font-size: 22px;
    color: #2a2a2a;
    line-height: 1;
    margin-bottom: 6px;
}
.profile-stat span {
    color: #8f95a3;
    font-size: 12px;
    font-weight: 600;
}
.profile-body {
    display: grid;
    grid-template-columns: minmax(0,1fr) 260px;
    gap: 20px;
    align-items: start;
}
.profile-panel {
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    padding: 18px;
}
.profile-panel__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-weight: 700;
    color: #2a2a2a;
}
.profile-panel__head i {
    color: #f0542e;
    width: 20px;
    text-align: center;
    margin-right: 6px;
}

/* === ПЛИТКИ ИНФОРМАЦИИ === */
.profile-info-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0;
}
.info-tile {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 14px 12px;
    text-align: center;
    border: 1px solid #e8eaed;
    transition: 0.2s;
}
.info-tile:hover {
    border-color: #f0542e;
    background: #fff;
}
.info-tile__icon {
    font-size: 20px;
    color: #f0542e;
    margin-bottom: 4px;
}
.info-tile__label {
    font-size: 11px;
    color: #8f95a3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}
.info-tile__value {
    font-size: 15px;
    font-weight: 600;
    color: #2a2a2a;
    word-break: break-word;
}
.info-tile__value .num {
    font-size: 16px;
    color: #f0542e;
}
.info-tile__value a {
    font-size: 12px;
    font-weight: 400;
    color: #f0542e;
    text-decoration: none;
}
.info-tile__value a:hover {
    text-decoration: underline;
}

/* Ссылки (плитки) */
.profile-info-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.link-item {
    background: #f8f9fc;
    border: 1px solid #e8eaed;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    transition: 0.2s;
}
.link-item i {
    color: #f0542e;
    margin-right: 6px;
}
.link-item a {
    color: #2a2a2a;
    text-decoration: none;
}
.link-item:hover {
    border-color: #f0542e;
    background: #fff;
}
.link-item a:hover {
    color: #f0542e;
}

/* === СПОЙЛЕР ДЛЯ СТАРЫХ ЗАКЛАДОК (ПЛАВНОЕ РАСКРЫТИЕ) === */
.spoiler-wrap {
    background: #fff;
    margin: 0 0 8px;
    border: 1px solid #efefef;
    border-radius: 4px;
    overflow: hidden;
}
.spoiler-head {
    background: #efefef;
    cursor: pointer;
    padding: 10px 16px;
    font-weight: 600;
    color: #2a2a2a;
    transition: 0.2s;
    position: relative;
}
.spoiler-head:hover {
    background: #e3e3e3;
}
.spoiler-head::after {
    content: '\f107';
    font-family: 'FontAwesome';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s;
}
.spoiler-wrap.active .spoiler-head::after {
    transform: translateY(-50%) rotate(180deg);
}
.spoiler-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    transition: max-height 0.5s ease, padding 0.5s ease;
}
.spoiler-wrap.active .spoiler-body {
    max-height: 2000px;
    padding: 16px;
}
.spoiler-wrap.active .spoiler-head {
    background: #57AA43;
    color: #fff;
}
.spoiler-wrap.active .spoiler-head:hover {
    background: #4a8f38;
}

/* === КАРТОЧКИ СТАРЫХ ЗАКЛАДОК (3 КОЛОНКИ) === */
.spoiler-body.favall-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0; /* отступы добавляются через padding в .spoiler-body, здесь обнуляем */
}
.spoiler-body .favall_catalog_form {
    flex: 1 1 calc(33.33% - 12px);
    min-width: 180px;
    background: #f8f9fc;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.spoiler-body .favall_catalog_form:hover {
    border-color: #f0542e;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.spoiler-body .favall_url {
    display: block;
    color: #2a2a2a;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}
.spoiler-body .favall_url:hover {
    color: #f0542e;
}
@media (max-width: 800px) {
    .spoiler-body .favall_catalog_form {
        flex: 1 1 calc(50% - 12px);
    }
}
@media (max-width: 500px) {
    .spoiler-body .favall_catalog_form {
        flex: 1 1 100%;
    }
}

.profile-about {
    min-height: 72px;
    color: #2a2a2a;
    line-height: 1.55;
}
.profile-social {
    display: grid;
    gap: 20px;
}
.profile-social-card {
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    overflow: hidden;
}
.profile-social-card__head {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: #f0542e;
    color: #fff;
    font-weight: 700;
}
.profile-social-feed {
    padding: 10px;
}
.profile-social-feed ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.profile-social-feed ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f2f5;
}
.profile-social-feed ul li:last-child {
    border-bottom: none;
}
.profile-social-feed ul li a {
    color: #1a1a2e;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.profile-social-feed ul li a:hover {
    color: #f0542e;
}
.profile-social-feed ul li span {
    background: #f0542e;
    color: #fff;
    border-radius: 12px;
    padding: 0 10px;
    font-size: 12px;
    line-height: 22px;
    min-width: 24px;
    text-align: center;
}
.profile-edit {
    margin-top: 20px;
}
.profile-edit .profile-edit-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 42px !important;
    padding: 0 18px !important;
    border-radius: 4px !important;
    background: #f0542e !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}
.profile-edit .profile-edit-btn:hover {
    background: #d9441f !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* Форма редактирования (стили без изменений) */
.profile-edit-form {
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow: hidden;
}
.profile-edit-form__header {
    padding: 20px 24px;
    background: #f8f9fc;
    border-bottom: 1px solid #e3e3e3;
}
.profile-edit-form__title {
    font-size: 20px;
    font-weight: 700;
    color: #2a2a2a;
    display: block;
}
.profile-edit-form__subtitle {
    font-size: 13px;
    color: #8f95a3;
    margin-top: 4px;
    display: block;
}
.profile-edit-form__body {
    padding: 24px;
}
.edit-field {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 8px 12px;
}
.edit-field__label {
    flex: 0 0 150px;
    font-weight: 600;
    color: #3a3a3a;
    font-size: 14px;
    padding-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.edit-field__label i {
    color: #f0542e;
    width: 18px;
    text-align: center;
}
.edit-field__input,
.edit-field__textarea,
.edit-field__select-wrapper select,
.edit-field__twofactor select {
    flex: 1;
    min-width: 220px;
    padding: 10px 14px;
    border: 1px solid #d8dde3;
    border-radius: 6px;
    font-size: 14px;
    background: #fafbfc;
    transition: 0.2s;
    color: #2a2a2a;
    width: 100%;
    box-sizing: border-box;
}
.edit-field__input:focus,
.edit-field__textarea:focus,
.edit-field__select-wrapper select:focus,
.edit-field__twofactor select:focus {
    border-color: #f0542e;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(240,84,46,0.12);
    outline: none;
}
.edit-field__textarea {
    min-height: 80px;
    resize: vertical;
}
.edit-field__input--file {
    padding: 6px 10px;
    background: #ffffff;
}
.edit-field__check-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 20px;
    font-size: 14px;
}
.edit-field__check-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #f0542e;
    cursor: pointer;
}
.edit-field__check-group label {
    cursor: pointer;
    color: #2a2a2a;
}
.edit-field--inline {
    flex-wrap: wrap;
}
.edit-field--inline .edit-field__label {
    flex: 0 0 100%;
    padding-top: 0;
}
.edit-field__hint {
    font-size: 12px;
    color: #8f95a3;
    margin-top: 6px;
}
.edit-field__xfields table {
    width: 100%;
}
.edit-field__xfields td {
    padding: 6px 0;
}
.edit-field__xfields input,
.edit-field__xfields select,
.edit-field__xfields textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d8dde3;
    border-radius: 6px;
    background: #fafbfc;
}
.edit-field--submit {
    margin-top: 12px;
    justify-content: flex-end;
}
.edit-field__submit-btn {
    padding: 12px 32px;
    background: #f0542e;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}
.edit-field__submit-btn:hover {
    background: #d9441f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(240,84,46,0.3);
}
.edit-field__submit-btn:active {
    transform: translateY(0);
}

.profile-sidecol {
    padding-right: 15px;
}

/* Адаптивность */
@media (max-width: 950px) {
    .profile-hero__main {
        grid-template-columns: 140px minmax(0,1fr);
        align-items: end;
    }
    .profile-actions {
        grid-column: 1 / -1;
        padding-top: 0;
    }
    .profile-avatar {
        width: 136px;
    }
    .profile-body {
        grid-template-columns: 1fr;
    }
    .profile-stats {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .profile-info-tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 700px) {
    .profile-edit-form__header {
        padding: 16px 18px;
    }
    .profile-edit-form__body {
        padding: 16px;
    }
    .edit-field {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .edit-field__label {
        flex: 1 1 auto;
        padding-top: 4px;
    }
    .edit-field__input,
    .edit-field__textarea,
    .edit-field__select-wrapper select,
    .edit-field__twofactor select {
        min-width: 100%;
    }
    .edit-field__check-group {
        margin-right: 0;
        margin-bottom: 6px;
    }
    .edit-field--submit {
        align-items: stretch;
    }
    .edit-field__submit-btn {
        width: 100%;
    }
}
@media (max-width: 560px) {
    .profile-hero {
        padding: 0 14px 16px;
    }
    .profile-hero__cover {
        height: 120px;
        margin: 0 -14px;
    }
    .profile-hero__main {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        margin-top: -58px;
    }
    .profile-avatar {
        width: 122px;
    }
    .profile-name {
        justify-content: center;
    }
    .profile-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    .profile-stats {
        grid-template-columns: 1fr 1fr;
    }
    .profile-panel {
        padding: 14px;
    }
    .profile-info-tiles {
        grid-template-columns: 1fr;
    }
}
/* ===== СПОЙЛЕР ДЛЯ СТАРЫХ ЗАКЛАДОК (ПЛАВНОЕ РАСКРЫТИЕ) ===== */
.spoiler-wrap {
    background: #fff;
    margin: 0 0 8px;
    border: 1px solid #efefef;
    border-radius: 4px;
    overflow: hidden;
}
.spoiler-head {
    background: #efefef;
    cursor: pointer;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 16px;
    color: #2a2a2a;
    transition: background 0.3s ease;
    position: relative;
    user-select: none;
}
.spoiler-head:hover {
    background: #e3e3e3;
}
.spoiler-head::after {
    content: '\f107';
    font-family: 'FontAwesome';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.spoiler-wrap.active .spoiler-head::after {
    transform: translateY(-50%) rotate(180deg);
}
.spoiler-wrap.active .spoiler-head {
    background: #57AA43;
    color: #fff;
}
.spoiler-wrap.active .spoiler-head:hover {
    background: #4a8f38;
}
.spoiler-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    opacity: 0;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.6s ease 0.15s;
}
.spoiler-wrap.active .spoiler-body {
    max-height: 3000px; /* увеличил запас, чтобы точно хватило */
    padding: 16px;
    opacity: 1;
}

/* ===== КАРТОЧКИ СТАРЫХ ЗАКЛАДОК (3 КОЛОНКИ) ===== */
.spoiler-body.favall-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 !important;
}
.spoiler-body .favall_catalog_form {
    background: #f8f9fc;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 0;
    transition: all 0.25s ease;
    box-sizing: border-box;
    overflow: hidden;
}
.spoiler-body .favall_catalog_form:hover {
    border-color: #f0542e;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.spoiler-body .catalog_list_n,
.spoiler-body .catalog_list_r,
.spoiler-body .catalog_list_ln {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1;
}
.spoiler-body .catalog_list_ln {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 8px 10px !important;
}
.spoiler-body .favall_url {
    display: block;
    color: #2a2a2a;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
    padding: 0 !important;
    background: transparent !important;
    text-shadow: none !important;
    transition: none !important;
    width: 100%;
}
.spoiler-body .favall_url:hover,
.spoiler-body .favall_url:focus,
.spoiler-body .favall_url:active {
    color: #2a2a2a !important;
    background: transparent !important;
    text-decoration: none !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
}
.spoiler-body .favall_url::before,
.spoiler-body .favall_url::after {
    display: none !important;
    content: none !important;
}
@media (max-width: 800px) {
    .spoiler-body.favall-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 500px) {
    .spoiler-body.favall-grid {
        grid-template-columns: 1fr;
    }
}
/* Inline styles moved from userinfo.tpl */
#options {
    display: none;
    margin-top: 30px;
}
.profile-social-card--flat {
    padding: 0;
    border: none;
    background: transparent;
}
.profile-social-card__head--rounded {
    border-radius: 12px 12px 0 0;
}
.profile-social-card__all-link {
    color: #fff;
    text-decoration: underline;
}
.profile-social-feed--boxed {
    padding: 16px 14px;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    border: 1px solid #f0f2f5;
    border-top: none;
}
.articles-list-plain {
    list-style: none;
    padding: 0;
    margin: 0;
}
.profile-social-feed__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f2f5;
}
.profile-social-feed__link {
    color: #1a1a2e;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.profile-social-feed__count {
    background: #f0542e;
    color: #fff;
    border-radius: 12px;
    padding: 0 10px;
    font-size: 12px;
    line-height: 22px;
    min-width: 24px;
    text-align: center;
}
