/* ============================================================
   Shared Profile Detail Styles
   Used by: search.html, index.html, saved.html, list-detail.html, public-profile.html
   Source of truth: extracted from search.html (gold standard)
   ============================================================ */

/* ===== Profile Card ===== */
.profile-modal-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 16px;
    padding: 24px;
}
.profile-modal-top {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.profile-modal-avatar-container {
    position: relative;
    flex-shrink: 0;
}
.profile-modal-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.profile-modal-verified {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: white;
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.profile-modal-verified i { color: #3b82f6; font-size: 16px; }
.profile-modal-info { flex: 1; min-width: 0; }
.profile-modal-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.profile-modal-name {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* Tier Badges */
.tier-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.tier-mega { background: #fef3c7; color: #d97706; }
.tier-macro { background: #dbeafe; color: #2563eb; }
.tier-mid { background: #dcfce7; color: #16a34a; }
.tier-micro { background: #f3e8ff; color: #9333ea; }
.tier-nano { background: #fce7f3; color: #db2777; }

.profile-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 10px;
}
.profile-modal-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.profile-modal-bio {
    color: #374151;
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.instagram-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #7c3aed, #ec4899, #f97316);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    margin-top: 12px;
}

/* ===== Stats Bar ===== */
.stats-modal-bar {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 0 16px 16px;
    padding: 12px 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.stat-modal-item {
    text-align: center;
    padding: 4px 2px;
}
.stat-modal-icon { color: #9ca3af; margin-bottom: 2px; font-size: 14px; }
.stat-modal-value { font-size: 14px; font-weight: 700; color: #111827; }
.stat-modal-label { font-size: 8px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.2px; }

/* ===== Section Cards ===== */
.section-modal-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 0 16px 16px;
    padding: 16px;
}
.section-modal-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

/* ===== Social Profiles ===== */
.social-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 8px;
}
.social-modal-item:last-child { margin-bottom: 0; }
.social-modal-left { display: flex; align-items: center; gap: 10px; }
.social-modal-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.social-modal-icon.instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.social-modal-icon.youtube { background: #ff0000; }
.social-modal-icon.twitter { background: #1da1f2; }
.social-modal-icon.tiktok { background: #000000; }
.social-modal-icon.facebook { background: #1877f2; }
.social-modal-icon i { color: white; font-size: 16px; }
.social-modal-name { font-weight: 500; color: #111827; font-size: 13px; text-transform: capitalize; }
.social-modal-handle { font-size: 11px; color: #6b7280; }
.social-modal-right { text-align: right; }
.social-modal-followers { font-weight: 700; color: #111827; font-size: 13px; }
.social-modal-er { font-size: 11px; color: #16a34a; }

/* ===== Categories ===== */
.category-modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.category-modal-tag {
    padding: 6px 12px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 20px;
    font-size: 12px;
}

/* ===== Posts Grid ===== */
.posts-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}
.post-modal-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    background: #f3f4f6;
}
.post-modal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.post-modal-item:hover img { transform: scale(1.05); }
.post-video-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    padding: 4px;
    border-radius: 4px;
}
.post-video-badge i { color: white; font-size: 12px; }

/* ===== Rate Card ===== */
.rate-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.rate-modal-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}
.rate-modal-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.rate-modal-value { font-size: 16px; font-weight: 700; color: #111827; }

/* ===== AI Analytics ===== */
.ai-modal-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 0 16px 16px;
    overflow: hidden;
}
.ai-modal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}
.ai-modal-header i { color: #7c3aed; }
.ai-modal-header span { font-weight: 600; color: #111827; font-size: 14px; }
.ai-modal-badge {
    background: #f3e8ff;
    color: #7c3aed;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 8px;
}
.ai-modal-content { padding: 16px; }
.ai-modal-subsection { margin-bottom: 20px; }
.ai-modal-subsection:last-child { margin-bottom: 0; }
.ai-modal-subsection-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-modal-overview {
    background: #f0fdf4;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #166534;
}
.ai-modal-loading {
    padding: 30px 16px;
    text-align: center;
    color: #6b7280;
}
.ai-modal-loading .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #f3f4f6;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: pdSpin 1s linear infinite;
    margin: 0 auto 12px;
}
@keyframes pdSpin { to { transform: rotate(360deg); } }

/* Quality Scores */
.quality-modal-scores { display: grid; gap: 10px; }
.quality-modal-item { display: flex; align-items: center; gap: 10px; }
.quality-modal-label { width: 90px; font-size: 12px; color: #6b7280; }
.quality-modal-bar {
    flex: 1;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}
.quality-modal-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.quality-modal-fill.high { background: #22c55e; }
.quality-modal-fill.medium { background: #eab308; }
.quality-modal-fill.low { background: #ef4444; }
.quality-modal-value { width: 35px; font-weight: 600; font-size: 12px; text-align: right; }

/* Quality Badge */
.quality-modal-badge {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    margin-left: auto;
}
.quality-modal-badge.high { background: #dcfce7; color: #16a34a; }
.quality-modal-badge.medium { background: #fef3c7; color: #d97706; }
.quality-modal-badge.low { background: #fee2e2; color: #dc2626; }

/* Engagement Stats */
.engagement-modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.engagement-modal-stat {
    background: #f9fafb;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    border: 1px solid #f3f4f6;
}
.engagement-modal-stat.pink { background: #fdf2f8; border-color: #fbcfe8; }
.engagement-modal-stat.blue { background: #eff6ff; border-color: #bfdbfe; }
.engagement-modal-stat.purple { background: #f5f3ff; border-color: #ddd6fe; }
.engagement-modal-stat.green { background: #f0fdf4; border-color: #bbf7d0; }
.engagement-modal-stat i { font-size: 18px; color: #6b7280; margin-bottom: 6px; display: block; }
.engagement-modal-stat.pink i { color: #ec4899; }
.engagement-modal-stat.blue i { color: #3b82f6; }
.engagement-modal-stat.purple i { color: #8b5cf6; }
.engagement-modal-stat.green i { color: #22c55e; }
.engagement-modal-value { font-size: 18px; font-weight: 700; color: #111827; margin-bottom: 2px; }
.engagement-modal-label { font-size: 11px; color: #6b7280; }

/* Trend Badge */
.trend-modal-badge {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: capitalize;
    margin-left: auto;
}
.trend-modal-badge.trend-up { background: #dcfce7; color: #16a34a; }
.trend-modal-badge.trend-down { background: #fee2e2; color: #dc2626; }
.trend-modal-badge.trend-stable { background: #f3f4f6; color: #6b7280; }

/* Demographics */
.demo-modal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.demo-modal-item { background: #f9fafb; border-radius: 10px; padding: 10px; }
.demo-modal-item-label { font-size: 11px; color: #6b7280; margin-bottom: 2px; }
.demo-modal-item-value { font-size: 14px; font-weight: 600; color: #111827; }
.demo-modal-bar-container { margin-top: 12px; }
.demo-modal-bar-item { margin-bottom: 6px; }
.demo-modal-bar-label { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 3px; }
.demo-modal-bar-label span:first-child { color: #374151; }
.demo-modal-bar-label span:last-child { color: #6b7280; }
.demo-modal-bar { height: 5px; background: #f3f4f6; border-radius: 3px; overflow: hidden; }
.demo-modal-bar-fill { height: 100%; border-radius: 3px; }
.demo-modal-section-label { font-size: 11px; font-weight: 600; color: #6b7280; margin-bottom: 8px; margin-top: 12px; }

/* Brand Collaborations */
.brands-modal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.brand-modal-item { background: #f9fafb; border-radius: 10px; padding: 8px; text-align: center; }
.brand-modal-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
    color: #9ca3af;
    font-size: 16px;
}
.brand-modal-name { font-size: 10px; font-weight: 500; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-modal-count { font-size: 9px; color: #9ca3af; }
.brand-modal-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.brand-modal-stat { background: #fff7ed; border-radius: 10px; padding: 10px; text-align: center; }
.brand-modal-stat-value { font-size: 18px; font-weight: 700; color: #ea580c; }
.brand-modal-stat-label { font-size: 10px; color: #9a3412; }

/* Content Mix */
.content-modal-mix-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.content-modal-mix-item { background: #f9fafb; border-radius: 10px; padding: 10px; }
.content-modal-mix-value { font-size: 16px; font-weight: 700; color: #111827; }
.content-modal-mix-label { font-size: 11px; color: #6b7280; }

/* Hashtags */
.hashtag-modal-list { display: flex; flex-wrap: wrap; gap: 6px; }
.hashtag-modal-chip {
    padding: 4px 10px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

/* AI Metadata */
.ai-modal-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    font-size: 10px;
    color: #9ca3af;
}
.ai-modal-metadata span { display: flex; align-items: center; gap: 4px; }
.ai-modal-metadata i { font-size: 11px; }

/* No Data Message */
.no-modal-data-msg {
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    padding: 16px;
}

/* ===== Post Lightbox ===== */
.pd-post-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.pd-post-lightbox.active { display: flex; }
.pd-post-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    color: white;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    z-index: 2001;
}
.pd-post-lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
}
.pd-post-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    background: rgba(255,255,255,0.2);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
}
.pd-post-lightbox-nav.prev { left: 16px; }
.pd-post-lightbox-nav.next { right: 16px; }
.pd-post-lightbox-stats {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    color: white;
    font-size: 14px;
}
.pd-post-lightbox-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}
