/* Public Profile modal — conversion-first flat redesign. Surface #141417.
   Money actions (Send Sparks / Message) live in a sticky CTA bar; premium photos
   are a prominent capped grid; earnings are social proof. Flat icons, no emojis.
   Modal width/height (max-width 700 inline / max-height 90vh base) UNCHANGED. */

.profile-modal-content { scrollbar-width: none; -ms-overflow-style: none; }
.profile-modal-content::-webkit-scrollbar { display: none; }
.edit-profile-modal-content { scrollbar-width: none; -ms-overflow-style: none; }
.edit-profile-modal-content::-webkit-scrollbar { display: none; }

.meetgle-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85); z-index: 100001;
    display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto;
}
.meetgle-modal-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* loading / error states (centered) */
#profileLoading, #profileError {
    flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px;
}
.meetgle-profile-loading p { color: rgba(255,255,255,0.35); font-size: 13px; margin: 0; }
.meetgle-profile-error { color: #ff6b6b; }
.meetgle-profile-error p { margin: 0; font-size: 14px; }
.profile-spinner { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,0.1); border-top-color: rgba(255,255,255,0.5); border-radius: 50%; animation: profileSpin 0.8s linear infinite; margin: 0 auto 12px; }
@keyframes profileSpin { to { transform: rotate(360deg); } }

/* content = flex column (scroll body + sticky footer); jQuery .show() clears the
   inline display:none so this flex applies */
#profileContent { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }

/* close button — standard look, like every other modal (.mg-mclose), pinned top-right */
.profile-close-btn {
    position: absolute; top: 16px; right: 16px; z-index: 10;
    width: 32px !important; height: 32px !important; min-width: 0 !important;
    padding: 0 !important; margin: 0 !important; border: none !important; border-radius: 50% !important;
    background: rgba(255,255,255,0.1) !important; color: #fff !important;
    font-size: 18px !important; font-weight: 400 !important; line-height: 1 !important; box-shadow: none !important;
    cursor: pointer; display: flex !important; align-items: center; justify-content: center; transition: background 0.2s;
}
.profile-close-btn:hover, .profile-close-btn:focus { background: rgba(255,255,255,0.2) !important; color: #fff !important; }

/* scroll body */
.pf-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.pf-scroll::-webkit-scrollbar { display: none; }

/* ── hero ── */
.pf-hero { display: flex; align-items: center; gap: 18px; padding: 28px 24px 20px; }
.pf-avatar-ring { flex: none; border-radius: 50%; padding: 3px; background: rgba(255,255,255,0.12); }
.pf-avatar-ring.is-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.profile-modal-content .pf-avatar { width: 92px !important; height: 92px !important; border-radius: 50% !important; object-fit: cover !important; display: block !important; border: 3px solid #141417 !important; box-shadow: none !important; }
.pf-id { flex: 1; min-width: 0; }
.pf-name { display: block; padding-right: 40px; }
.pf-name-txt { font-size: 23px; font-weight: 800; color: #fff; line-height: 1.2; }
.verification-badge { vertical-align: middle; }
.pf-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.pf-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.72); line-height: 1.4; }
.pf-chip.male { background: rgba(56,151,240,0.14); border-color: rgba(56,151,240,0.25); color: #7bbcff; }
.pf-chip.female { background: rgba(255,46,104,0.14); border-color: rgba(255,46,104,0.25); color: #ff7aa3; }
.pf-looking { font-size: 12.5px; color: rgba(255,255,255,0.45); margin-top: 9px; line-height: 1.4; }
.pf-looking b { color: rgba(255,255,255,0.72); font-weight: 600; }
.profile-badges { margin-top: 8px; }
.profile-badges:empty { margin-top: 0; }
.profile-modal-content .profile-badge.external { display: inline-block; background: rgba(255,200,61,0.12); color: #ffc83d; border: 1px solid rgba(255,200,61,0.2); font-size: 12px; padding: 4px 12px; border-radius: 16px; }

/* favorite chip (heart outline → filled pink) */
.pf-fav-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px 3px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); transition: background .16s, border-color .16s, color .16s; font-family: inherit; line-height: 1.4; }
.pf-fav-ic { display: inline-grid; place-items: center; }
.pf-fav-ic svg { width: 13px; height: 13px; display: block; }
.pf-fav-chip:hover { background: rgba(255,46,104,0.1); border-color: rgba(255,46,104,0.25); color: #ff7aa3; }
.pf-fav-chip.is-fav { background: rgba(255,46,104,0.14); border-color: rgba(255,46,104,0.35); color: #ff5a8a; }
.pf-fav-chip.is-fav .pf-fav-ic svg { fill: currentColor; }

/* ── section ── */
.pf-sec { padding: 0 24px; margin-bottom: 22px; }
.pf-seclabel { color: rgba(255,255,255,0.45); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 11px; }

/* ── PREMIUM PHOTOS — capped grid; cards built by renderProfilePhotos() ── */
.pf-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pf-photos .profile-photo-card { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; cursor: pointer; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); transition: transform .16s; }
.pf-photos .profile-photo-card:hover { transform: translateY(-2px); }
.pf-photos .profile-photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-photos .profile-photo-card.locked img { filter: blur(14px); transform: scale(1.1); }
.photo-lock-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; }
.photo-lock-overlay .lock-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,0.35); color: #fff; }
.photo-lock-overlay .lock-ic svg { width: 15px; height: 15px; }
.photo-lock-overlay .lock-price { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; color: #000; background: #ffc83d; padding: 4px 11px; border-radius: 999px; box-shadow: 0 4px 14px rgba(255,200,61,0.35); }
.photo-lock-overlay .lock-price svg { width: 13px; height: 13px; }
.photo-lock-overlay .lock-text { font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,0.85); letter-spacing: .2px; }
/* "+N more" tile */
.pf-photos .profile-photo-card.photo-more img { filter: blur(8px) brightness(0.45); transform: scale(1.1); }
.photo-more-ov { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff; }
.photo-more-ov .n { font-size: 22px; font-weight: 800; line-height: 1; }
.photo-more-ov .t { font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: .4px; }
/* photo skeleton (loading placeholder) */
.pf-photos .profile-photo-card.photo-skeleton { cursor: default; }
.pf-photos .profile-photo-card.photo-skeleton:hover { transform: none; }
.photo-skeleton-shimmer { width: 100%; height: 100%; background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.06) 20%, rgba(255,255,255,0.02) 40%, rgba(255,255,255,0.02) 100%); background-size: 200% 100%; animation: profileShimmer 1.5s ease-in-out infinite; }
@keyframes profileShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── bio ── */
.pf-bio { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; padding: 14px 16px; }
.pf-bio p { margin: 0; color: rgba(255,255,255,0.72); line-height: 1.6; font-size: 14px; }

/* ── interests ── */
.pf-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-modal-content .profile-interest-tag { padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); transition: background .15s; }
.profile-modal-content .profile-interest-tag:hover { background: rgba(255,255,255,0.09); transform: none; box-shadow: none; }

/* ── stats (social proof) ── */
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pf-stat { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; padding: 13px 14px; }
.pf-stat-ic { color: rgba(255,255,255,0.45); margin-bottom: 7px; }
.pf-stat-ic svg { width: 17px; height: 17px; }
.pf-stat.earn .pf-stat-ic { color: #ffc83d; }
.pf-stat-v { font-size: 17px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; line-height: 1; }
.pf-stat.earn .pf-stat-v { color: #ffc83d; }
.pf-stat-l { font-size: 10px; color: rgba(255,255,255,0.4); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; margin-top: 5px; }

/* ── sticky money CTA bar — theme-proofed buttons ── */
.pf-cta { flex: none; display: flex; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid rgba(255,255,255,0.07); background: #141417; }
.profile-modal-content .pf-cta-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 0 !important; border-radius: 14px !important; padding: 14px !important; font-family: inherit !important;
    font-size: 14.5px !important; font-weight: 800 !important; cursor: pointer; box-shadow: none; text-transform: none !important; letter-spacing: normal !important;
    transition: filter .16s, transform .16s;
}
.profile-modal-content .pf-cta-btn svg { width: 17px; height: 17px; flex: none; }
.profile-modal-content .pf-cta-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.profile-modal-content .pf-cta-sparks { color: #000 !important; background: #ffc83d !important; box-shadow: 0 10px 26px -10px rgba(255,200,61,0.55) !important; }
.profile-modal-content .pf-cta-sparks:hover, .profile-modal-content .pf-cta-sparks:focus { color: #000 !important; background: #ffc83d !important; }
.profile-modal-content .pf-cta-msg { color: #fff !important; background: var(--button-color, #ff2e68) !important; box-shadow: 0 10px 26px -10px var(--accent-glow, rgba(255,46,104,0.45)) !important; }
.profile-modal-content .pf-cta-msg:hover, .profile-modal-content .pf-cta-msg:focus { color: #fff !important; background: var(--button-color, #ff2e68) !important; }

/* ── Mobile fullscreen (PRESERVED — width/height unchanged) ── */
@media (max-width: 900px) {
    #meetgleProfileModal { padding: 0 !important; }
    #meetgleProfileModal > .profile-modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100svh !important;
        max-height: 100vh !important;
        max-height: 100svh !important;
        border-radius: 0 !important;
    }
}
@media (max-width: 560px) {
    .pf-hero { flex-direction: column; text-align: center; gap: 12px; padding-top: 30px; }
    .pf-id { width: 100%; }
    .pf-name { padding-right: 0; }
    .pf-meta { justify-content: center; }
    .pf-looking { text-align: center; }
    .profile-badges { text-align: center; }
    .pf-photos { grid-template-columns: repeat(2, 1fr); }
    .pf-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===== SHARED STYLES (sparks / stickers modals) ===== */

/* Hide scrollbars on send sparks/stickers modals */
.send-sparks-modal-content,
.send-stickers-modal-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.send-sparks-modal-content::-webkit-scrollbar,
.send-stickers-modal-content::-webkit-scrollbar {
    display: none;
}

/* Send sparks quick buttons — dark theme */
.spark-amount-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 15px;
    color: rgba(255,255,255,0.7);
}
.spark-amount-btn:hover {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,200,61,0.4) !important;
    color: white !important;
    transform: scale(1.05);
}
.spark-amount-btn.selected {
    background: #ffc83d !important;
    border-color: #ffc83d !important;
    color: #000 !important;
    box-shadow: 0 2px 12px rgba(255,200,61,0.3);
}

@keyframes pulse-sticker {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; }
}

/* Sticker Grid — dark theme */
.sticker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sticker-grid::-webkit-scrollbar { display: none; }

.sticker-item {
    aspect-ratio: 1;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
    position: relative;
    min-width: 0;
}
.sticker-item:hover {
    border-color: rgba(236,72,153,0.4);
    background: rgba(255,255,255,0.08);
    transform: scale(1.03);
}
.sticker-item.selected {
    border-color: #EC4899;
    background: rgba(236,72,153,0.15);
    box-shadow: 0 0 16px rgba(236,72,153,0.2);
}
.sticker-item img {
    width: 100%;
    height: 60%;
    object-fit: contain;
    flex-shrink: 0;
}
.sticker-item .sticker-name {
    font-size: 9px;
    color: rgba(255,255,255,0.4);
    text-align: center;
    margin-top: 4px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 1.2;
}
