/* ============================================================================
   profile-card.css — self-contained styles for the ported SnifSnif profile
   card (see profile-card.js -> buildProfileCard). Rules copied VERBATIM from
   the dashboard's app.css for the KEPT markup only. No :root theme vars and no
   global color reset here — the host page's data.css supplies the CSS custom
   properties these rules reference.

   CSS custom properties referenced (must exist on the host page :root):
     --border-light   (card border)
     --accent-light   (verified badge, stats distance/footer, copy hover)
     --accent         (sniffies-link fallback monogram bg; has #ff00aa fallback)
     --bg-3           (photos-column-img background)
   ============================================================================ */

/* ---- Wrap + card shell --------------------------------------------------- */
.profile-detail-wrap {
    /* Profile card v2: the field rows + footer scroll INSIDE the card body,
       so this wrap just centers the card and lets it fill vertically. */
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #3a4658 transparent;
}
.profile-detail-wrap::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.profile-detail-wrap::-webkit-scrollbar-track {
    background: transparent;
}
.profile-detail-wrap::-webkit-scrollbar-thumb {
    background: #3a4658;
    border-radius: 3px;
}
.profile-detail-wrap::-webkit-scrollbar-thumb:hover {
    background: #556272;
}
.profile-card-large {
    /* Sniffies in-app card — deep navy body with black header. */
    background: #0e1c30;
    color: #fff;
    width: 100%;
    max-width: 480px;
    height: 100%;             /* fill the pane vertically so the body can scroll */
    max-height: 100%;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

/* ---- Header -------------------------------------------------------------- */
.profile-card-header {
    background: #000;
    color: #fff;
    padding: 14px 18px 16px;
    position: relative;
    padding-right: 130px;       /* room for the corner buttons */
}
.profile-card-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 4px;
}
.profile-card-name-row .verified-badge {
    display: inline-flex;
    align-items: center;
    color: var(--accent-light);
    flex-shrink: 0;
}
.profile-card-name-row .verified-badge svg { width: 22px; height: 22px; }
.profile-card-stats {
    font-size: 17px;
    color: #d8d8d8;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Copy-profile-id button */
.profile-card-copy-id {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.12s, color 0.12s, transform 0.08s;
}
.profile-card-copy-id:hover { opacity: 1; color: var(--accent-light, #cbe2ff); }
.profile-card-copy-id:active { transform: scale(0.9); }
.profile-card-copy-id svg { width: 20px; height: 20px; }
.profile-card-copy-id.copied { color: #66ffaa; opacity: 1; }
.profile-card-copy-id.copy-failed { color: #ff8c8c; opacity: 1; }

/* Header corner (absolute bottom-right) — sniffies-link + copy-id */
.profile-card-header-corner {
    position: absolute;
    right: 12px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.profile-card-header-corner .profile-card-copy-id {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    padding: 4px;
    cursor: pointer;
    transition: color 0.15s, transform 0.1s;
}
.profile-card-header-corner .profile-card-copy-id svg {
    width: 18px;
    height: 18px;
}
.profile-card-header-corner button:hover {
    color: #fff;
}
.profile-card-header-corner .profile-card-copy-id.copied { color: #66ffaa; }
.profile-card-header-corner .profile-card-copy-id.copy-failed { color: #ff8c8c; }

/* ---- Sniffies-favicon "open on sniffies.com" link ------------------------ */
.sniffies-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s, background 0.15s, transform 0.1s;
    text-decoration: none;
    flex-shrink: 0;
}
.sniffies-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.08);
}
.sniffies-link-icon { width: 16px; height: 16px; display: block; }
.sniffies-link-fallback {
    width: 16px;
    height: 16px;
    background: var(--accent, #ff00aa);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.profile-card-header-corner .sniffies-link {
    width: 26px;
    height: 26px;
}
.profile-card-header-corner .sniffies-link-icon { width: 18px; height: 18px; }

/* ---- Body v2 (Sniffies in-app layout) ------------------------------------ */
.profile-card-body-v2 {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #0e1c30;
    scrollbar-width: thin;
    scrollbar-color: #3a4658 transparent;
    /* Ensure the body scrolls all the way to the bottom (last item not clipped). */
    padding-bottom: 60px !important;
}
.profile-card-body-v2::-webkit-scrollbar { width: 6px; }
.profile-card-body-v2::-webkit-scrollbar-track { background: transparent; }
.profile-card-body-v2::-webkit-scrollbar-thumb { background: #3a4658; border-radius: 3px; }
.profile-card-body-v2::-webkit-scrollbar-thumb:hover { background: #556272; }

/* Sticky photo banner. 360px tall x -288px top = 72px peek = 20%. */
.profile-card-photo-banner {
    position: sticky;
    top: -288px;
    width: 100%;
    height: 360px;
    flex-shrink: 0;
    z-index: 0;
    overflow: hidden;
    background: #0e1c30;
}
.profile-card-photo-bg {
    position: absolute;
    inset: 0;
    background-color: #0e1c30;
    background-size: cover;
    background-position: center top;
}
/* Bottom-fade gradient — photo washes into navy at its bottom edge. */
.profile-card-photo-gradient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
        transparent 0%,
        transparent 50%,
        rgba(14, 28, 48, 0.35) 75%,
        rgba(14, 28, 48, 0.85) 92%,
        #0e1c30 100%);
}

/* Scrollable content beneath the photo banner. */
.profile-card-body-content {
    position: relative;
    z-index: 1;
    background: #0e1c30;
    padding: 4px 22px 24px;
    padding-bottom: 40px;
}

/* Ruler-icon stats line — first row of body content. */
.profile-card-statsbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0 18px;
    font-size: 15px;
    color: #fff;
}
.profile-card-statsbar svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: #fff;
}

/* ---- Field rows ---------------------------------------------------------- */
.profile-card-fields {
    display: flex;
    flex-direction: column;
}
.profile-card-field-row {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-card-field-row:last-child { border-bottom: none; }
.profile-card-field-label {
    width: 110px;
    flex-shrink: 0;
    font-size: 15px;
    color: #fff;
    font-weight: 500;
}
.profile-card-field-value {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 15px;
    color: #9bb3d5;
    line-height: 1.45;
}
.profile-card-field-tag {
    color: #9bb3d5;
    white-space: nowrap;
}
.profile-card-fields-empty { display: none; }

/* ---- Blurb (Sniffies-style big-quote callout) ---------------------------- */
.profile-card-blurb {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-card-blurb-quote {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 64px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    margin-top: -8px;
    user-select: none;
}
.profile-card-blurb-text {
    color: #d7dce4;
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-line;        /* preserve user-entered line breaks */
    word-break: break-word;
}

/* ---- "I'm hosting" line (house icon + label) ----------------------------- */
.profile-card-hosting-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}
.profile-card-hosting-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: #fff;
}
.profile-card-hosting-icon svg { width: 100%; height: 100%; }

/* ---- Location pill toggle ------------------------------------------------ */
.profile-card-pills {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.profile-card-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: #6b7f9a;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}
.profile-card-pill.is-on {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

/* ---- Additional-photos column (vertical circles on the right) ------------ */
.profile-card-photos-column {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}
.profile-card-photos-column-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    background: var(--bg-3);
    transition: transform 0.15s, border-color 0.15s;
}
.profile-card-photos-column-img:hover {
    transform: scale(1.08);
    border-color: #fff;
}

/* ---- Footer -------------------------------------------------------------- */
.profile-card-footer {
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 14px 18px;
    gap: 16px;
    font-size: 14px;
}
.profile-footer-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.profile-footer-item .icon { width: 18px; height: 18px; flex-shrink: 0; }
.profile-footer-time { color: #cfcfcf; }
.profile-footer-distance { color: var(--accent-light); }

/* ---- Mobile tweaks (from app.css) ---------------------------------------- */
@media (max-width: 600px) {
    .profile-card-photos-column-img {
        width: 38px;
        height: 38px;
    }
    .profile-card-header {
        padding-right: 110px;
    }
    .profile-card-header-corner .profile-card-copy-id svg {
        width: 16px;
        height: 16px;
    }
}
@media (max-width: 700px) {
    .profile-card-large {
        max-width: 100%;
        margin: 8px;
    }
    .profile-detail-wrap {
        padding: 8px;
    }
}

/* ---------------------------------------------------------------------------
   Header action icons — map / place messages / global messages. Ported from the
   snif.kriskraw.com dashboard (.profile-card-action in its app.css) so the two
   sites' cards read the same. Here each is a link that opens its page in a new
   tab, rather than switching the dashboard's pane-4.
   --------------------------------------------------------------------------- */
.profile-card-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;      /* keep them right of the name */
}
.profile-card-action {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.profile-card-action:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.55);
}
.profile-card-action .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #fff;
    line-height: 1;
}
.profile-card-action .icon svg {
    width: 18px;
    height: 18px;
    display: block;
}
.profile-card-action .count { font-variant-numeric: tabular-nums; }

/* No data for this action: darker grey and genuinely unclickable. The element is
   a <span> (no href) and pointer-events:none kills hover/cursor too, so it reads
   as inert rather than as a link that silently does nothing. */
.profile-card-action.no-data {
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-muted, #6b7f9a);
    filter: grayscale(0.8);
    cursor: default;
    pointer-events: none;
}
.profile-card-action.no-data .icon { color: var(--text-muted, #6b7f9a); }

/* Phone: the header band is tight — drop the counts, keep the icons tappable. */
@media (max-width: 480px) {
    .profile-card-actions { gap: 5px; }
    .profile-card-action { padding: 5px 7px; }
    .profile-card-action .count { display: none; }
}
