/* [voa_profil] — member cubby */

.voap-profile {
    --voap-p-accent: #e8542f;
    --voap-p-bg:     #fffdf9;
    --voap-p-fg:     #660c1b;
    --voap-p-muted:  #93686f;
    --voap-p-track:  #ece7df;
    --voap-p-radius: var(--gg-radius, 14px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: var(--voap-p-fg);
}

/* Doubled selectors: the theme/Elementor sets white headings and link colors
   with higher specificity than a single class. Also catches any heading an
   embedded shortcode (leaderboard, library, ...) prints with the theme's
   default white heading color, which is invisible on our light cards. */
.voap-profile .voap-profile__title,
.voap-profile .voap-profile__name,
.voap-profile .voap-profile__streak-line,
.voap-profile h1,
.voap-profile h2,
.voap-profile h3,
.voap-profile h4,
.voap-profile h5,
.voap-profile h6,
.voap-profile p,
.voap-profile li {
    color: var(--voap-p-fg);
}
.voap-profile .voap-profile__hint,
.voap-profile .voap-profile__note-meta {
    color: var(--voap-p-muted);
}
/* Match the profile palette inside the embedded event calendar. */
.voap-profile .wpgpe-calendar {
    --wpgp-event-fg: #660c1b;
}
/* The leaderboard shortcode prints its own heading; our card already has
   one immediately above, so the embedded one is a dupe. */
.voap-profile .voa-leaderboard-title {
    display: none;
}

.voap-profile__card {
    /* Explicit, so the JS row cap (a border-box measurement) stays exact even
       if the theme does not set border-box globally. */
    box-sizing: border-box;
    background: var(--voap-p-bg);
    border: 1px solid var(--voap-p-track);
    border-radius: var(--voap-p-radius);
    padding: 18px 20px;
    box-shadow: var(--gg-shadow-sm, 0 1px 4px rgba(0,0,0,.08));
}

.voap-profile__grid {
    display: grid;
    /* min(100%, …) so cards never overflow viewports narrower than 320px */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 18px;
}

.voap-profile__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 1.05em;
    font-weight: 800;
}

.voap-profile__hint {
    color: var(--voap-p-muted);
    font-size: .85em;
    margin: 8px 0 0;
}

.voap-profile a.voap-profile__cta {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
    color: var(--voap-p-accent);
    text-decoration: none;
}
.voap-profile a.voap-profile__cta:hover { text-decoration: underline; }

/* Header: identity and rank sit side by side, stacking on narrow screens. */
.voap-profile__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
}
.voap-profile__identity {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    flex: 1 1 280px;
}
.voap-profile__avatar {
    position: relative;
    display: inline-block;
    line-height: 0;
}
/* Wrapper selector, not the img class: custom-profile-picture replaces the
   get_avatar() markup with its own img and drops our class. */
.voap-profile__avatar img {
    border-radius: 50%;
    display: block;
    width: 96px;
    height: 96px;
    object-fit: cover;
    border: 3px solid var(--voap-p-fg);
}
/* !important throughout: the theme/Elementor button rules win on specificity
   and would otherwise force min-width, padding and a squared-off radius. */
.voap-profile .voap-profile__avatar-edit {
    position: absolute !important;
    right: 0 !important;
    bottom: 0 !important;
    display: grid !important;
    place-items: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 3px solid var(--voap-p-bg) !important;
    border-radius: 50% !important;
    background: var(--voap-p-fg) !important;
    color: #fff !important;
    font-size: 0 !important;
    line-height: 0 !important;
    letter-spacing: 0 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(102, 12, 27, .35) !important;
    transition: transform .18s var(--gg-ease, ease), background .18s ease !important;
}
.voap-profile .voap-profile__avatar-edit svg {
    width: 15px !important;
    height: 15px !important;
    display: block !important;
}
.voap-profile .voap-profile__avatar-edit:hover {
    transform: scale(1.08) !important;
    background: var(--voap-p-accent) !important;
}
.voap-profile .voap-profile__avatar-edit:focus-visible {
    outline: 3px solid var(--voap-p-accent) !important;
    outline-offset: 2px !important;
}

.voap-profile__name { margin: 0 0 8px; }
/* Stats row: no chips — bare value + icon groups split by plain vertical
   dividers. Icon boxes are optically matched (the gem drawing fills less of
   its viewBox than the coin/fire, so it gets a bigger box). */
.voap-profile__stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.voap-profile__stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.15em;
    color: var(--voap-p-fg);
    padding: 0 16px;
}
.voap-profile__stat:first-child { padding-left: 0; }
.voap-profile__stat + .voap-profile__stat {
    border-left: 1px solid var(--voap-p-track);
}
.voap-profile__stat .gg-coin { width: 30px; height: 30px; }
.voap-profile__stat .gg-gem  { width: 36px; height: 36px; }

/* Avatar picker */
.voap-profile__avatars {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.voap-avatar-option {
    padding: 0;
    border: 3px solid transparent;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    line-height: 0;
    transition: transform .18s ease, border-color .18s ease;
}
.voap-avatar-option img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.voap-avatar-option:hover { transform: scale(1.08); }
.voap-avatar-option.is-selected { border-color: var(--voap-p-accent); }
.voap-avatar-option.is-busy { opacity: .5; pointer-events: none; }

/* Streak heatmap */
.voap-profile__streak-line {
    margin: 0 0 10px;
    font-weight: 700;
}
.voap-profile__multipliers {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}
.voap-profile__multiplier {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--voap-p-accent);
    border-radius: 10px;
    background: #fff3ed;
}
.voap-profile__multiplier small { font-size: .72em; font-weight: 700; }
.voap-profile__multiplier strong { font-size: 1.55em; line-height: 1; }
.voap-profile__multiplier.is-next {
    color: var(--voap-p-muted);
    border-color: var(--voap-p-track);
    background: #f5f1ed;
    opacity: .65;
}
.voap-profile__multiplier-arrow { color: var(--voap-p-muted); }
.voap-profile__milestone {
    margin: 8px 0 14px;
    color: var(--voap-p-muted) !important;
    font-size: .82em;
    font-weight: 700;
}
.voap-profile__multiplier-guide {
    margin: 0 0 16px;
    padding: 14px;
    background: #f8f4f0;
    border-radius: 10px;
}
/* Collapsed by default: only the heading + intro show until opened. */
.voap-profile__multiplier-guide summary {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    list-style: none;
}
.voap-profile__multiplier-guide summary::-webkit-details-marker { display: none; }
.voap-profile__multiplier-guide summary::after {
    content: "▾";
    margin-left: auto;
    font-size: 1.1em;
    line-height: 1;
    color: var(--voap-p-muted);
    transition: transform .18s ease;
}
.voap-profile__multiplier-guide[open] summary::after { transform: rotate(180deg); }
.voap-profile__multiplier-guide h4 { margin: 0 0 6px; font-size: .9em; }
.voap-profile__multiplier-guide summary p { margin: 0; font-size: .82em; line-height: 1.45; }
.voap-profile__multiplier-guide .voap-profile__multiplier-brackets { margin-top: 14px; }
.voap-profile__multiplier-brackets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 6px;
}
.voap-profile__multiplier-bracket {
    display: flex;
    flex-direction: column;
    padding: 7px 5px;
    text-align: center;
    background: var(--voap-p-bg);
    border: 1px solid var(--voap-p-track);
    border-radius: 8px;
}
.voap-profile__multiplier-bracket small { color: var(--voap-p-muted); font-size: .68em; }
.voap-profile__multiplier-bracket strong { font-size: .95em; }
.voap-profile__multiplier-rules { margin: 12px 0 0; padding-left: 18px; font-size: .8em; line-height: 1.45; }
.voap-profile__multiplier-rules li + li { margin-top: 5px; }
.voap-heatmap {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 12px);
    gap: 3px;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}
.voap-heatmap__cell {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--voap-p-track);
}
.voap-heatmap__cell.is-future { background: transparent; }
.voap-heatmap__cell[data-level="1"] { background: #f8b4a0; }
.voap-heatmap__cell[data-level="2"] { background: #ef7d55; }
.voap-heatmap__cell[data-level="3"] { background: var(--voap-p-accent); }

/* Notes */
.voap-profile__notes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.voap-profile__notes li {
    border-left: 3px solid var(--voap-p-accent);
    padding: 2px 0 2px 10px;
}
.voap-profile__note-meta {
    display: block;
    font-size: .78em;
    color: var(--voap-p-muted);
}
.voap-profile__note-text { font-size: .92em; }

/* ── Equal-height row: the calendar sets the height, the neighbours scroll ── */
.voap-profile__card--scroll {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.voap-profile__card-body { min-height: 0; }

/* --voap-row-h is measured from the calendar card in profile-page.js; the cap
   only applies once the grid is actually side by side. */
@media (min-width: 720px) {
    .voap-profile__grid.is-rowcap .voap-profile__card--scroll {
        max-height: var(--voap-row-h);
    }
    .voap-profile__grid.is-rowcap .voap-profile__card-body {
        flex: 1;
        overflow-y: auto;
        padding-right: 6px;
    }
}

/* ── Collections: five small, uniformly cropped cards per row ─────────────── */
.voap-profile .wpgp-library__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}
.voap-profile .wpgp-library-item__media {
    aspect-ratio: auto;
    height: 130px;
}
.voap-profile .wpgp-library-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.voap-profile .wpgp-library-item__body { padding: 10px 12px; }
.voap-profile .wpgp-library-item__title { font-size: .95em; }
.voap-profile .wpgp-library-item__actions { padding: 0 12px 12px; }
@media (max-width: 1024px) {
    .voap-profile .wpgp-library__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .voap-profile .wpgp-library__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .voap-profile .wpgp-library-item__media { height: 110px; }
}

/* ── Avatar picker modal (reuses voap-modals.css chrome) ──────────────────── */
.voap-avatar-modal[hidden] { display: none; }
.voap-avatar-modal .voap-modal { width: min(680px, 100%); }
.voap-avatar-modal .voap-profile__avatars { justify-content: center; }
.voap-avatar-modal .voap-profile__hint,
.voap-avatar-modal .voap-profile__cta { text-align: center; display: block; }

/* Locked state */
.voap-profile--locked {
    background: var(--voap-p-bg, #fffdf9);
    border: 1px solid #ece7df;
    border-radius: var(--gg-radius, 14px);
    padding: 24px;
    text-align: center;
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .voap-profile { gap: 12px; }
    .voap-profile__card { padding: 14px 16px; }
    .voap-profile__grid { gap: 12px; }

    /* Stacked, centered header reads better than a squeezed row. */
    .voap-profile__identity {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .voap-profile__avatar img {
        width: 80px;
        height: 80px;
        margin-inline: auto;
    }
    .voap-profile__name { font-size: 1.3em; }
    .voap-profile__stats { justify-content: center; }
    .voap-profile__avatars { justify-content: center; }
    .voap-avatar-option img { width: 56px; height: 56px; }
    .voap-heatmap { margin-inline: auto; }
}

/* Purchased-items tabs: the shop's own tab styling, on buttons. */
.voap-profile__shop-tab {
    background: none;
    font-family: inherit;
    cursor: pointer;
}
