/* Profile content tabs: Публикации · Маршруты · Достижения (templates/profile.html, profile.js). */

.profile-tab-panel[hidden] { display: none !important; }
.profile-tab-panel { display: flex; flex-direction: column; gap: 20px; }

.profile-tabs {
    display: flex;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    margin: 0 0 4px;
    padding: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    overflow-x: auto;
    scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }

.profile-tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 11px 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}
.profile-tabs__tab:hover { background: #f1f5f9; color: #0f172a; }
.profile-tabs__tab.is-active { background: #fff1e8; color: #ea580c; }
.profile-tabs__tab:focus-visible { outline: 2px solid #f97316; outline-offset: 2px; }

.profile-tabs__count {
    min-width: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}
.profile-tabs__tab.is-active .profile-tabs__count { background: #ffd9c2; color: #c2410c; }

/* Достижения: «Ваш вклад» и «Задания», перенесённые из боковой колонки, — отдельными блоками друг под другом. */
.profile-achievements-columns {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.profile-achievements-columns > * { margin: 0 !important; width: auto !important; max-width: none !important; }

.profile-legacy-awards { display: grid; gap: 20px; }

html[data-theme="dark"] .profile-tabs { background: #111a16; border-color: #24332c; }
html[data-theme="dark"] .profile-tabs__tab { color: #9fb2a8; }
html[data-theme="dark"] .profile-tabs__tab:hover { background: #1a2620; color: #e6f1ea; }
html[data-theme="dark"] .profile-tabs__tab.is-active { background: rgba(249, 115, 22, .16); color: #fb923c; }
html[data-theme="dark"] .profile-tabs__count { background: #1a2620; color: #9fb2a8; }

@media (max-width: 767px) {
    .profile-tab-panel { gap: 0; }
    /* на телефоне — вкладки во всю ширину с подчёркиванием, как в приложении */
    .profile-tabs {
        width: 100%;
        gap: 22px;
        margin: 0;
        padding: 0 16px;
        border: 0;
        border-bottom: 1px solid #e5e7eb;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
    }
    .profile-tabs__tab {
        position: relative;
        padding: 15px 0 14px;
        border-radius: 0;
        font-size: 14px;
        color: #7b8491;
    }
    .profile-tabs__tab:hover { background: transparent; }
    .profile-tabs__tab.is-active { background: transparent; color: #111827; }
    .profile-tabs__tab.is-active::after {
        position: absolute; right: 0; bottom: -1px; left: 0; height: 3px;
        border-radius: 999px 999px 0 0; background: #f97316; content: '';
    }
    .profile-achievements-columns { gap: 0; }
    .profile-legacy-awards { gap: 0; }
}

/* Маршруты: «Проработанные маршруты» — слайдер карточек витрины (profile_includes/planner_library.html) */
.tp-profile-plans .sc-showcase { margin-top: 0; }
.tp-profile-plans__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tp-profile-plans .tp-profile-plans__head h4 { margin: 0; }
.tp-profile-plans .sc-arrows button { width: 38px; height: 38px; border-radius: 12px; }
.tp-profile-plans .sc-slider__track { gap: 16px; }
.tp-profile-plans .sc-slide { flex-basis: calc((100% - 32px) / 3); }
.tp-profile-plans .sc-slide--all { flex-basis: 180px; }
@media (max-width: 1180px) { .tp-profile-plans .sc-slide { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 767px) {
    .tp-profile-plans .sc-slider__track { gap: 12px; }
    .tp-profile-plans .sc-slide { flex-basis: 84%; }
    .tp-profile-plans .sc-slide--all { flex-basis: 60%; }
}
/* the profile column is narrower than the showcase: smaller titles, the author shown by the avatar only */
.tp-profile-plans .sc-card__heading h3 { font-size: 22px; }
.tp-profile-plans .sc-author { flex: 0 0 auto; }
.tp-profile-plans .sc-author:not(.sc-author--official) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp-profile-plans .sc-card__footer { justify-content: space-between; }
