/* Матч&мяч release 041 — profile summary, neutral dark palette and motion polish. */

/* ---------- Player profile summary ---------- */
.pp-hero:not(.has-cover) .pp-hero-summary,
.pp-hero.has-title .pp-hero-summary {
    gap: 10px !important;
    padding: 0 !important;
    margin-top: 10px;
}
.pp-hero:not(.has-cover) .pp-summary-item,
.pp-hero.has-title .pp-summary-item {
    min-height: 92px !important;
    padding: 17px 18px !important;
    border: 1px solid rgba(23,26,22,.085) !important;
    border-radius: 18px !important;
    background: #F7F8F1 !important;
    color: #171A16 !important;
    justify-content: space-between !important;
    gap: 12px !important;
    box-shadow: 0 14px 28px -30px rgba(15,17,14,.48);
}
.pp-hero:not(.has-cover) .pp-summary-item + .pp-summary-item,
.pp-hero.has-title .pp-summary-item + .pp-summary-item {
    border-left: 1px solid rgba(23,26,22,.085) !important;
}
.pp-summary-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #747C70;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .075em;
    line-height: 1.2;
    text-transform: uppercase;
}
.pp-summary-label > span:last-child { min-width: 0; }
.pp-summary-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #E9EEDC;
    color: #648000;
    border: 1px solid rgba(100,128,0,.10);
}
.pp-summary-icon svg { width: 15px; height: 15px; }
.pp-hero:not(.has-cover) .pp-summary-item > b,
.pp-hero.has-title .pp-summary-item > b {
    display: block;
    color: #171A16 !important;
    opacity: 1 !important;
    font-size: 25px !important;
    font-weight: 850 !important;
    line-height: .98 !important;
    text-shadow: none !important;
}
.pp-hero:not(.has-cover) .pp-summary-item > b i,
.pp-hero.has-title .pp-summary-item > b i { color: #9AA192 !important; }
.pp-summary-form > div:last-child { display: flex; align-items: center; min-height: 26px; }

/* ---------- Tournaments: no solid card fill; rows feel like app data ---------- */
.tournament-row {
    background: transparent !important;
    border-color: var(--border) !important;
    box-shadow: none !important;
}
.tournament-row:hover {
    background: rgba(255,255,255,.025) !important;
    border-color: var(--border-strong) !important;
    transform: translateY(-2px) !important;
}
.tournament-row:active { transform: translateY(0) scale(.995) !important; }

/* A final safety net against legacy navy surfaces that used to leak through
   older desktop styles. Everything now comes from the neutral Матч&мяч tokens. */
.leaderboard-grid,
.rank-card,
.training-row,
.training-day-column,
.week-session,
.cab-card,
.cab-stat,
.me-card,
.adm-table,
.card {
    background-color: var(--card);
}

/* ---------- Web-app motion system ---------- */
html.motion-enabled .motion-reveal {
    opacity: 0;
    transform: translate3d(0, 13px, 0) scale(.992);
    filter: saturate(.94);
    will-change: transform, opacity;
}
html.motion-enabled .motion-reveal.motion-in {
    animation: ace-reveal .52s var(--ease) var(--motion-delay, 0ms) both;
}
@keyframes ace-reveal {
    0% { opacity: 0; transform: translate3d(0, 13px, 0) scale(.992); filter: saturate(.94); }
    70% { opacity: 1; }
    100% { opacity: 1; transform: translate3d(0,0,0) scale(1); filter: none; }
}

/* Buttons: tactile but restrained. */
.btn, .icon-btn, .notif-btn, .city-pill, .profile-shortcut {
    transition-property: transform, background-color, border-color, color, box-shadow, opacity !important;
    transition-duration: .2s !important;
    transition-timing-function: var(--ease) !important;
}
.btn > svg, .icon-btn > svg, .tournament-row-open svg {
    transition: transform .22s var(--ease) !important;
}
.btn:hover > svg, .tournament-row:hover .tournament-row-open svg { transform: translateX(2px); }
.btn:active, .icon-btn:active, .notif-btn:active, .city-pill:active, .profile-shortcut:active {
    transform: scale(.965) !important;
    transition-duration: .08s !important;
}

/* Clickable cards: soft elevation, no “floaty” marketing animation. */
.pcard, .coach-card, .coach-card-v2, .club-card, .rank-card, .achievement-card,
.history-match, .cab-row, .week-session, .training-row, .tournament-row,
.release-action-grid > a, .qtile {
    transition: transform .24s var(--ease), border-color .24s var(--ease), background-color .24s var(--ease), box-shadow .24s var(--ease) !important;
}
@media (hover:hover) and (pointer:fine) {
    .pcard:hover, .coach-card:hover, .coach-card-v2:hover, .club-card:hover,
    .achievement-card:hover, .history-match:hover, .cab-row:hover,
    .week-session:hover, .release-action-grid > a:hover, .qtile:hover {
        transform: translateY(-2px);
        border-color: var(--border-strong);
    }
    .pp-summary-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 36px -30px rgba(15,17,14,.34);
    }
    .pp-summary-item:hover .pp-summary-icon { transform: rotate(-4deg) scale(1.06); }
}
.pp-summary-icon { transition: transform .28s var(--ease-spring), background-color .2s var(--ease); }

/* Tabs feel like a native segmented control. */
.profile-tab, .cab-tab, .me-local-link, .mobile-tabbar a {
    transition: color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease) !important;
}
.profile-tab:active, .cab-tab:active, .me-local-link:active, .mobile-tabbar a:active { transform: scale(.97); }
.mobile-tabbar a.active .ic, .mobile-tabbar a.is-active .ic { animation: ace-tab-pop .34s var(--ease-spring) both; }
@keyframes ace-tab-pop { 0% { transform: scale(.88); } 70% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* Popovers and modals open from their physical origin. */
.city-menu, .notif-menu {
    transform-origin: top right;
    animation: ace-popover-in .2s var(--ease) both !important;
}
@keyframes ace-popover-in {
    from { opacity: 0; transform: translateY(-5px) scale(.975); }
    to { opacity: 1; transform: none; }
}
.modal-backdrop { animation: ace-backdrop-in .2s ease-out both; }
.modal-backdrop .modal, .modal-backdrop > .modal {
    animation: ace-modal-in .28s var(--ease) both;
    transform-origin: 50% 45%;
}
@keyframes ace-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ace-modal-in { from { opacity: 0; transform: translateY(10px) scale(.982); } to { opacity: 1; transform: none; } }

/* Data visualisation comes alive after the card enters. */
.motion-in .pp-rating-line {
    stroke-dasharray: 520;
    stroke-dashoffset: 520;
    animation: ace-line-draw .9s var(--ease) .12s forwards;
}
.motion-in .pp-rating-dot { animation: ace-dot-in .34s var(--ease-spring) .78s both; }
@keyframes ace-line-draw { to { stroke-dashoffset: 0; } }
@keyframes ace-dot-in { from { opacity: 0; transform: scale(.35); transform-origin: center; } to { opacity: 1; transform: scale(1); } }

/* Keyboard focus is visible and consistent across the application. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 80%, white 20%) !important;
    outline-offset: 3px !important;
}

@media (max-width: 860px) {
    .pp-hero:not(.has-cover) .pp-hero-summary,
    .pp-hero.has-title .pp-hero-summary { padding: 0 !important; gap: 8px !important; }
    .pp-hero:not(.has-cover) .pp-summary-item,
    .pp-hero.has-title .pp-summary-item { min-height: 84px !important; padding: 14px !important; }
    .pp-summary-icon { width: 26px; height: 26px; flex-basis: 26px; border-radius: 8px; }
    .pp-hero:not(.has-cover) .pp-summary-item > b,
    .pp-hero.has-title .pp-summary-item > b { font-size: 21px !important; }
}

@media (prefers-reduced-motion: reduce) {
    html.motion-enabled .motion-reveal,
    html.motion-enabled .motion-reveal.motion-in { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; }
    .city-menu, .notif-menu, .modal-backdrop, .modal-backdrop .modal,
    .motion-in .pp-rating-line, .motion-in .pp-rating-dot,
    .mobile-tabbar a.active .ic, .mobile-tabbar a.is-active .ic { animation: none !important; }
}
