/* ════════════════════════════════════════════════════════════════════
   TravelZona — Hashtag Page Styles (Enhanced)
   Shows posts + listings + people + shorts for a hashtag
   Scoped to body.hashtag-page
   ════════════════════════════════════════════════════════════════════ */

/* ─── Smooth scroll for anchor tabs ─── */
html { scroll-behavior: smooth; }

/* ─── Header ─── */
body.hashtag-page .hashtag-header {
    display: flex; align-items: center; gap: 1rem;
    max-width: 42rem; margin: 0 auto; padding: 5rem 1rem 1rem;
}
body.hashtag-page .hashtag-icon {
    width: 4rem; height: 4rem; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-400, #8b5cf6), #ec4899);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.75rem; flex-shrink: 0;
}
body.hashtag-page .hashtag-info { flex: 1; min-width: 0; }
body.hashtag-page .hashtag-title {
    font-size: 1.75rem; font-weight: 800; color: var(--foreground);
    margin: 0; line-height: 1.2; word-break: break-word;
}
body.hashtag-page .hashtag-count {
    font-size: 0.875rem; color: var(--muted-foreground); margin: 0.25rem 0 0;
}

/* ─── Tab navigation (sticky, anchor-based) ─── */
body.hashtag-page .hashtag-tabs {
    display: flex; gap: 0.25rem; border-bottom: 2px solid var(--border);
    max-width: 42rem; margin: 0 auto 1rem; padding: 0 1rem;
    overflow-x: auto; scrollbar-width: none; position: sticky;
    top: 56px; background: var(--background, #f0f4f8); z-index: 40;
    padding-top: 0.5rem; padding-bottom: 0.5rem;
}
body.hashtag-page .hashtag-tabs::-webkit-scrollbar { display: none; }
body.hashtag-page .hashtag-tab {
    padding: 0.5rem 0.875rem; font-size: 0.8125rem; font-weight: 600;
    color: var(--muted-foreground); text-decoration: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    white-space: nowrap; transition: color 0.2s, border-color 0.2s;
    display: flex; align-items: center; gap: 0.25rem;
}
body.hashtag-page .hashtag-tab:hover { color: var(--foreground); }
body.hashtag-page .hashtag-tab.active {
    color: var(--brand-500, #7c3aed);
    border-bottom-color: var(--brand-500, #7c3aed);
}
body.hashtag-page .hashtag-tab-count {
    font-size: 0.625rem; background: var(--muted);
    padding: 0.125rem 0.375rem; border-radius: 999px;
}

/* ─── Action buttons ─── */
body.hashtag-page .hashtag-actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; max-width: 42rem; margin: 0 auto 1.5rem; padding: 0 1rem;
}
body.hashtag-page .hashtag-back-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    color: var(--muted-foreground); text-decoration: none;
    font-size: 0.875rem; font-weight: 600; padding: 0.5rem 0.75rem;
    border-radius: 0.5rem; transition: background 0.2s;
}
body.hashtag-page .hashtag-back-btn:hover { background: var(--muted); color: var(--foreground); }
body.hashtag-page .hashtag-post-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    background: linear-gradient(135deg, var(--brand-500, #7c3aed), #8b5cf6);
    color: white; text-decoration: none; font-size: 0.8125rem; font-weight: 600;
    padding: 0.5rem 0.875rem; border-radius: 0.5rem; transition: transform 0.15s;
}
body.hashtag-page .hashtag-post-btn:hover { transform: translateY(-1px); }

/* ─── Empty state ─── */
body.hashtag-page .hashtag-empty {
    max-width: 42rem; margin: 2rem auto; padding: 3rem 1rem; text-align: center;
}
body.hashtag-page .hashtag-empty i {
    font-size: 3rem; color: var(--muted-foreground); opacity: 0.3; margin-bottom: 1rem;
}
body.hashtag-page .hashtag-empty h2 {
    font-size: 1.25rem; font-weight: 700; margin: 0 0 0.5rem;
}
body.hashtag-page .hashtag-empty p {
    font-size: 0.875rem; color: var(--muted-foreground); margin: 0 0 1.5rem;
}
body.hashtag-page .hashtag-empty .btn-primary {
    display: inline-block; width: auto; padding: 0.625rem 1.5rem;
}

/* ─── Sections ─── */
body.hashtag-page .hashtag-section {
    max-width: 42rem; margin: 0 auto; padding: 1rem 1rem 0;
    scroll-margin-top: 70px;
}
body.hashtag-page .hashtag-section-title {
    font-size: 1rem; font-weight: 700; margin: 0 0 1rem;
    display: flex; align-items: center; gap: 0.5rem; color: var(--foreground);
}
body.hashtag-page .hashtag-section-title i { color: var(--brand-500, #7c3aed); }
body.hashtag-page .hashtag-section-empty {
    font-size: 0.875rem; color: var(--muted-foreground); padding: 1rem 0;
}

/* ─── Posts ─── */
body.hashtag-page .hashtag-posts { display: flex; flex-direction: column; gap: 1rem; }

/* ─── Listings grid ─── */
body.hashtag-page .hashtag-listings-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem;
}
body.hashtag-page .hashtag-listing-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 0.75rem; overflow: hidden; text-decoration: none;
    color: var(--foreground); transition: transform 0.15s, box-shadow 0.15s;
}
body.hashtag-page .hashtag-listing-card:hover {
    transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
body.hashtag-page .hashtag-listing-card img {
    width: 100%; height: 100px; object-fit: cover;
}
body.hashtag-page .hashtag-listing-info {
    padding: 0.625rem; display: flex; flex-direction: column; gap: 0.25rem;
}
body.hashtag-page .hashtag-listing-title {
    font-size: 0.8125rem; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.hashtag-page .hashtag-listing-loc {
    font-size: 0.6875rem; color: var(--muted-foreground);
}
body.hashtag-page .hashtag-listing-meta {
    display: flex; align-items: center; justify-content: space-between; margin-top: 0.25rem;
}
body.hashtag-page .hashtag-listing-price {
    font-size: 0.8125rem; font-weight: 700; color: var(--brand-500, #7c3aed);
}
body.hashtag-page .hashtag-listing-rating {
    font-size: 0.75rem; color: #f59e0b; font-weight: 600;
}

/* ─── People grid ─── */
body.hashtag-page .hashtag-people-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem;
}
body.hashtag-page .hashtag-person-card {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 0.75rem; text-decoration: none; color: var(--foreground);
    transition: transform 0.15s, box-shadow 0.15s;
}
body.hashtag-page .hashtag-person-card:hover {
    transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
body.hashtag-page .hashtag-person-avatar {
    width: 2.75rem; height: 2.75rem; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
body.hashtag-page .hashtag-person-avatar-fallback {
    background: linear-gradient(135deg, var(--brand-400, #8b5cf6), #ec4899);
    display: flex; align-items: center; justify-content: center; color: white;
}
body.hashtag-page .hashtag-person-info {
    flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem;
}
body.hashtag-page .hashtag-person-name {
    font-size: 0.875rem; font-weight: 700;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.hashtag-page .hashtag-person-username {
    font-size: 0.75rem; color: var(--muted-foreground);
}
body.hashtag-page .hashtag-person-type {
    font-size: 0.6875rem; color: var(--brand-500, #7c3aed); font-weight: 600;
    display: flex; align-items: center; gap: 0.25rem;
}

/* ─── Shorts grid ─── */
body.hashtag-page .hashtag-shorts-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem;
}
body.hashtag-page .hashtag-short-card {
    position: relative; border-radius: 0.75rem; overflow: hidden;
    aspect-ratio: 9/16; background: #000; text-decoration: none;
}
body.hashtag-page .hashtag-short-card img,
body.hashtag-page .hashtag-short-card video {
    width: 100%; height: 100%; object-fit: cover;
}
body.hashtag-page .hashtag-short-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: rgba(255,255,255,0.3); font-size: 2rem;
}
body.hashtag-page .hashtag-short-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: white;
}
body.hashtag-page .hashtag-short-caption {
    display: block; font-size: 0.75rem; font-weight: 600; margin-bottom: 0.25rem;
}
body.hashtag-page .hashtag-short-likes {
    font-size: 0.625rem; opacity: 0.7;
}

/* ─── Post tags clickable (global for all pages) ─── */
body.hashtag-page .post-tags a,
body.profile-page .post-tags a,
body.home-page .post-tags a,
body.search-page .post-tags a {
    color: var(--brand-500, #7c3aed); text-decoration: none;
    font-weight: 600; transition: opacity 0.15s;
}
body.hashtag-page .post-tags a:hover,
body.profile-page .post-tags a:hover,
body.home-page .post-tags a:hover,
body.search-page .post-tags a:hover {
    opacity: 0.7; text-decoration: underline;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
    body.hashtag-page .hashtag-listings-grid,
    body.hashtag-page .hashtag-people-grid,
    body.hashtag-page .hashtag-shorts-grid { grid-template-columns: 1fr; }
    body.hashtag-page .hashtag-header { padding: 4rem 1rem 0.75rem; }
    body.hashtag-page .hashtag-icon { width: 3rem; height: 3rem; font-size: 1.25rem; }
    body.hashtag-page .hashtag-title { font-size: 1.25rem; }
    body.hashtag-page .hashtag-actions { flex-direction: column; gap: 0.5rem; }
    body.hashtag-page .hashtag-back-btn,
    body.hashtag-page .hashtag-post-btn { width: 100%; justify-content: center; }
}
