/* ════════════════════════════════════════════════════════════════════
   TravelZona — Features CSS (feature-specific styles)
   Loaded on every page via @import in style.css.
   Home feed, profile partial, marketplace, animations, post menu
   dropdown, toast, FAB, flash messages, responsive breakpoints,
   utility classes.
   ════════════════════════════════════════════════════════════════════ */

/* ─── 5. Home Feed ─────────────────────────── */

/* Weather widget */
.weather-card {
    border-radius: 1rem;
    overflow: hidden;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}
.weather-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.weather-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
}
.weather-info p {
    font-size: 0.875rem;
    opacity: 0.8;
}
.weather-temp {
    text-align: right;
}
.weather-temp .temp {
    font-size: 1.875rem;
    font-weight: 700;
}
.weather-temp .feels {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Stories row */
.stories-row {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    overflow-x: auto;
}
.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    cursor: pointer;
}
.story-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--brand-400), #8b5cf6, #ec4899);
}
.story-avatar.viewed {
    background: var(--muted-foreground);
}
.story-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--background);
}
.story-live {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background: var(--danger);
    color: white;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    animation: pulse 2s infinite;
}
.story-name {
    font-size: 0.625rem;
    color: var(--muted-foreground);
    max-width: 4rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Post card */
.post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm); /* add depth to posts */
}
.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    padding-bottom: 0.5rem;
}
.post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.post-author img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
}
.post-author-name {
    font-size: 0.875rem;
    font-weight: 600;
}
.post-meta {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.post-content {
    padding: 0 1rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
}
.post-media {
    padding: 0 1rem 0.5rem;
}
.post-media img {
    width: 100%;
    max-height: 24rem;
    object-fit: cover;
    border-radius: 0.75rem;
}
.post-tags {
    padding: 0 1rem 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.post-tags a {
    font-size: 0.75rem;
    color: var(--brand-500);
}
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
}
.post-actions-left {
    display: flex;
    gap: 1.25rem;
}
.post-action {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    transition: color 0.2s;
}
.post-action:hover {
    color: var(--brand-500);
}
.post-action.liked {
    color: var(--danger);
}
.post-action.liked i {
    font-weight: 900;
}

/* ─── 6. Shorts ────────────────────────────── */
/* Shorts styles are now in css/shorts.css (separate file, loaded only on /shorts) */

/* ─── 7. Profile Page (partial) ──────────── */
/* Base profile layout rules (.profile-cover, .profile-avatar,
   .profile-info, .profile-name, .profile-username, .profile-badges,
   .profile-bio, .profile-meta, .profile-actions, .profile-stats)
   were MOVED to css/pages/profile.css (scoped under body.profile-page).

   Rules kept below (.profile-stat*, .profile-tabs*, .profile-tab*)
   are still loaded globally — they may also be moved in a future
   cleanup pass once confirmed not used by other pages. */

.profile-stat {
    text-align: center;
    background: transparent;
    border: none;
    cursor: pointer;
}
.profile-stat .num {
    font-size: 1.125rem;
    font-weight: 700;
}
.profile-stat .label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    overflow-x: auto;
}
.profile-tab {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.profile-tab.active {
    color: var(--brand-500);
    border-bottom-color: var(--brand-500);
}

/* ─── 8. Marketplace ───────────────────────── */

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.listing-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.listing-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.listing-body {
    padding: 1rem;
}
.listing-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.listing-location {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}
.listing-price {
    font-size: 1rem;
    font-weight: 700;
}
.listing-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

/* ─── 9. Animations ────────────────────────── */

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
}
.heart-animate {
    animation: heart-beat 0.3s ease-out;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ─── Post Menu Dropdown ───────────────────── */

.post-menu-dropdown {
    position: absolute;
    right: 0;
    top: 2.75rem;
    z-index: 30;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 0.375rem;
    animation: fade-in 0.15s ease-out;
}

.post-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--foreground);
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background 0.15s;
}

.post-menu-item:hover {
    background: var(--muted);
}

.post-menu-item i {
    width: 1rem;
    text-align: center;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.post-menu-item.post-menu-danger {
    color: var(--danger);
}

.post-menu-item.post-menu-danger i {
    color: var(--danger);
}

.post-menu-item.post-menu-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.post-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0.375rem 0;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: fade-in 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    background: var(--foreground);
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--brand-500); }

/* ─── 10. Responsive ───────────────────────── */

/* FAB (Floating Action Button) */
.fab {
    position: fixed;
    bottom: 5.5rem;
    right: 1.5rem;
    z-index: 30;
    width: 3.5rem;
    height: 3.5rem;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.fab:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(14, 165, 233, 0.4);
}
.fab:active {
    transform: scale(0.95);
}

/* Flash messages */
.flash-message {
    position: fixed;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: fade-in 0.3s ease-out;
}
.flash-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}
.flash-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

@media (max-width: 640px) {
    .main-content {
        padding: 56px 6px 76px; /* keep top/bottom padding for fixed header/footer */
    }
    .profile-avatar-section {
        margin-top: -2.5rem;
    }
    .profile-avatar {
        width: 5.5rem;
        height: 5.5rem;
    }
}

@media (min-width: 768px) {
    .hidden { display: none !important; }
    .md\:hidden { display: none !important; }
}
@media (max-width: 767px) {
    .md\:hidden { display: flex !important; }
    .sm\:inline { display: none !important; }
}

/* Utility classes */
.text-center { text-align: center; }
.text-muted { color: var(--muted-foreground); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.w-full { width: 100%; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.p-4 { padding: 1rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.cursor-pointer { cursor: pointer; }
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════
   GLOBAL RESPONSIVE DESIGN (for pages without their own @media queries)
   ════════════════════════════════════════════════════════════════════ */

/* ─── Mobile (max-width: 767px) ─────────────────────────────────── */
@media (max-width: 767px) {
    /* Make all grids responsive */
    .listing-grid,
    .stats-grid,
    .form-grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
    }

    /* Forms: full width inputs */
    .stay-grid,
    .form-row,
    .time-grid {
        grid-template-columns: 1fr !important;
    }

    /* Flex layouts: stack vertically */
    .form-actions,
    .stay-buttons,
    .action-bar,
    .flex-row {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    /* Reduce padding on mobile but keep space for fixed header/footer */
    .main-content {
        padding: 56px 8px 76px !important;
    }

    /* Tables: make scrollable */
    .admin-table-wrap,
    table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Admin table: hide less important columns on mobile */
    .admin-table th:nth-child(3),
    .admin-table td:nth-child(3),
    .admin-table th:nth-child(5),
    .admin-table td:nth-child(5) {
        display: none;
    }

    /* Modals: full screen on mobile */
    .modal-content,
    .modal-overlay > div {
        width: 95% !important;
        max-width: 95% !important;
        margin: 1rem auto !important;
        padding: 1rem !important;
    }

    /* Headings: smaller on mobile */
    h1 { font-size: 1.25rem !important; }
    h2 { font-size: 1.125rem !important; }
    h3 { font-size: 1rem !important; }

    /* Inputs: full width */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Buttons: full width on mobile */
    .btn-primary,
    .btn-secondary,
    .stay-btn,
    button[type="submit"] {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Profile page: stack sections */
    .profile-header,
    .profile-stats {
        flex-direction: column !important;
        text-align: center !important;
    }

    /* Edit profile: stack form sections */
    .edit-profile-section {
        padding: 1rem !important;
    }

    /* AI assistant: full width chat */
    .chat-container,
    .ai-chat-window {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Wallet: stack cards */
    .wallet-card,
    .wallet-transactions {
        padding: 1rem !important;
    }

    /* Login/Register: centered card */
    .auth-form {
        max-width: 100% !important;
        padding: 1.5rem 1rem !important;
    }

    /* Shorts styles are now in css/shorts.css */

    /* Story viewer: full width */
    .story-viewer {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Edit listing: stack sections */
    .edit-listing-section,
    .glass {
        padding: 1rem !important;
    }

    /* Images: responsive */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* ─── Tablet (768px - 1023px) ───────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
    .listing-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ─── Desktop (min-width: 1024px) ───────────────────────────────── */
@media (min-width: 1024px) {
    .listing-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ════════════════════════════════════════════════════════════════════
   SHORTS IN HOME FEED — Carousel (Option C) + Short Post Card (Option A)
   ════════════════════════════════════════════════════════════════════ */

.shorts-carousel {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(124,58,237,0.3) transparent;
    padding-bottom: 0.5rem;
}
.shorts-carousel::-webkit-scrollbar { height: 6px; }
.shorts-carousel::-webkit-scrollbar-track { background: transparent; }
.shorts-carousel::-webkit-scrollbar-thumb {
    background: rgba(124,58,237,0.3);
    border-radius: 3px;
}
.shorts-carousel-track {
    display: flex;
    gap: 0.875rem;
    padding: 0.25rem;
    min-width: min-content;
}
.short-carousel-card {
    flex: 0 0 auto;
    width: 180px;
    background: var(--card, #fff);
    border-radius: 0.875rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border, #e4e4e7);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.short-carousel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.short-carousel-card:hover .short-carousel-play {
    transform: translate(-50%, -50%) scale(1.15);
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}
.short-carousel-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    overflow: hidden;
}
.short-carousel-thumb img,
.short-carousel-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.short-carousel-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: all 0.2s;
    pointer-events: none;
}
.short-carousel-loc {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    max-width: calc(100% - 1rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.short-carousel-info {
    padding: 0.625rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.short-carousel-caption {
    font-size: 0.75rem;
    line-height: 1.3;
    margin: 0;
    color: var(--foreground, #18181b);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2rem;
}
.short-carousel-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    color: var(--muted-foreground, #71717a);
}
.short-carousel-avatar,
.short-carousel-avatar-fallback {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.short-carousel-avatar-fallback {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: white;
    font-weight: 600;
    font-size: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.short-carousel-author {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
.short-carousel-likes {
    display: flex;
    align-items: center;
    gap: 0.1875rem;
    color: #ef4444;
    font-weight: 600;
}

/* ─── Short Post Card (in feed — Option A) ─────────────────────── */
.post-card-short {
    background: var(--card, #fff);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.post-card-short-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
}
.post-card-short-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(56,189,248,0.12));
    color: #7c3aed;
    border: 1px solid rgba(124,58,237,0.25);
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.post-card-short-body {
    position: relative;
    width: 100%;
    max-height: 500px;
    background: #000;
    overflow: hidden;
    cursor: pointer;
    display: block;
    text-decoration: none;
}
.post-card-short-body video {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}
.post-card-short-body img.thumb {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}
.post-card-short-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: all 0.2s;
    pointer-events: none;
}
.post-card-short-body:hover .post-card-short-play {
    transform: translate(-50%, -50%) scale(1.1);
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}
.post-card-short-caption {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--foreground, #18181b);
}
.post-card-short-dest {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    margin: 0 1rem;
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.2);
    border-radius: 9999px;
    color: #7c3aed;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.post-card-short-dest:hover {
    background: rgba(124,58,237,0.15);
}
.post-card-short-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.625rem 1rem 0.875rem;
    border-top: 1px solid var(--border, #e4e4e7);
    margin-top: 0.625rem;
}
.post-card-short-action {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    border: none;
    color: var(--muted-foreground, #71717a);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.375rem 0;
    transition: color 0.2s;
    font-family: inherit;
}
.post-card-short-action:hover { color: #7c3aed; }
.post-card-short-action.liked { color: #ef4444; }
.post-card-short-watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0 1rem 1rem;
    padding: 0.625rem 1.125rem;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: white;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}
.post-card-short-watch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(124,58,237,0.4);
}

@media (max-width: 640px) {
    .short-carousel-card { width: 140px; }
    .short-carousel-play { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }
    .short-carousel-info { padding: 0.5rem 0.625rem; }
    .short-carousel-caption { font-size: 0.6875rem; min-height: 1.75rem; }
    .short-carousel-meta { font-size: 0.625rem; }
    .short-carousel-avatar,
    .short-carousel-avatar-fallback { width: 1rem; height: 1rem; font-size: 0.5625rem; }
    .post-card-short-body { max-height: 400px; }
    .post-card-short-body video,
    .post-card-short-body img.thumb { max-height: 400px; }
}
@media (max-width: 360px) {
    .short-carousel-card { width: 120px; }
    .short-carousel-caption { font-size: 0.625rem; }
    .short-carousel-meta { font-size: 0.5625rem; }
}

/* ════════════════════════════════════════════════════════════════════
   POST ACTIONS + COMMENT MODAL STYLES
   ─────────────────────────────────────────
   Moved here from css/pages/home.css so that ALL pages that display
   post cards (home, search, hashtag, profile, explore) automatically
   get the correct styling for:
   - .post-action-btn (like, comment, bookmark buttons)
   - .post-listing-card (promoted listing cards inside posts)
   - .post-comment-input (inline comment input)
   - .comment-modal-* (the comment popup modal)
   - .comment-item-* (individual comment rendering)
   ════════════════════════════════════════════════════════════════════ */

.post-listing-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border, #e4e4e7);
    border-radius: 0.75rem;
    background: var(--muted, #f4f4f5);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.5rem;
}
.post-listing-card:hover {
    border-color: var(--brand-500, #7c3aed);
    background: var(--background, #fff);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.post-listing-card img {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}
.post-listing-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.125rem;
}
.post-listing-type {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-500, #7c3aed);
    margin-bottom: 0.125rem;
}
.post-listing-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--foreground, #18181b);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.post-listing-price {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-500, #7c3aed);
}
.post-listing-loc {
    font-size: 0.6875rem;
    color: var(--muted-foreground, #71717a);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ════════════════════════════════════════════════════════════════════
   POST ACTION BUTTONS — Like / Comment / Bookmark / Share
   (Restored from old .post-action class — new index.php uses .post-action-btn
   which was never defined in any CSS)
   ════════════════════════════════════════════════════════════════════ */
.post-action-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted-foreground, #71717a);
    font-size: 0.875rem;
    font-family: inherit;
    padding: 0.25rem 0;
    transition: color 0.2s;
}
.post-action-btn:hover {
    color: var(--brand-500, #7c3aed);
}
.post-action-btn.liked {
    color: var(--danger, #ef4444);
}
.post-action-btn.liked i {
    font-weight: 900;
}
.post-action-btn i {
    font-size: 1rem;
}
.post-action-btn span {
    font-weight: 500;
}

/* Badge pills (used by some post types) */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--muted, #f4f4f5);
    color: var(--foreground, #18181b);
}

/* ════════════════════════════════════════════════════════════════════
   POST COMMENT INPUT — the "Add a comment..." box at the bottom of posts
   (Was NEVER defined in CSS — container needs display:flex to put
   avatar + input side by side instead of stacked vertically)
   ════════════════════════════════════════════════════════════════════ */
.post-comment-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border, #e4e4e7);
    margin-top: 0.5rem;
}
.post-comment-input img {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.post-comment-input input[type="text"] {
    flex: 1;
    background: var(--muted, #f4f4f5);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    color: var(--foreground, #18181b);
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.post-comment-input input[type="text"]:focus {
    border-color: var(--brand-500, #7c3aed);
}

/* ════════════════════════════════════════════════════════════════════
   COMMENT POPUP MODAL — opens when user clicks comment button/input
   ════════════════════════════════════════════════════════════════════ */
.comment-modal-content {
    background: var(--card, #fff);
    border-radius: 1rem 1rem 0 0;
    width: 100%;
    max-width: 32rem;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    margin: auto;
    position: relative;
}
@media (min-width: 768px) {
    .comment-modal-content {
        border-radius: 1rem;
        max-height: calc(100vh - 4rem);
    }
}
.comment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border, #e4e4e7);
    flex-shrink: 0;
}
.comment-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}
.comment-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    -webkit-overflow-scrolling: touch;
}
.comment-modal-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border, #e4e4e7);
    flex-shrink: 0;
    background: var(--card, #fff);
    border-radius: 0 0 1rem 1rem;
}
.comment-modal-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comment-modal-footer input[type="text"] {
    flex: 1;
    background: var(--muted, #f4f4f5);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: 9999px;
    padding: 0.625rem 1rem;
    color: var(--foreground, #18181b);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.comment-modal-footer input[type="text"]:focus {
    border-color: var(--brand-500, #7c3aed);
}
.comment-modal-submit {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-500, #7c3aed), #8b5cf6);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.comment-modal-submit:hover:not(:disabled) {
    transform: scale(1.08);
}
.comment-modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Individual comment items inside the modal */
.comment-item {
    display: flex;
    gap: 0.625rem;
    margin-bottom: 1rem;
}
.comment-item-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comment-item-body {
    flex: 1;
    min-width: 0;
}
.comment-item-bubble {
    background: var(--muted, #f4f4f5);
    border-radius: 1rem;
    padding: 0.5rem 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.comment-item-author {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--foreground, #18181b);
}
.comment-item-text {
    font-size: 0.875rem;
    color: var(--foreground, #18181b);
    word-break: break-word;
}
.comment-item-meta {
    display: flex;
    gap: 0.875rem;
    padding: 0.25rem 0.875rem;
    font-size: 0.6875rem;
    color: var(--muted-foreground, #71717a);
    font-weight: 500;
    align-items: center;
}

/* S1.4: Comment Like Button */
.comment-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.6875rem;
    color: var(--muted-foreground, #71717a);
    transition: color 0.15s;
}
.comment-like-btn i {
    font-size: 0.75rem;
}
.comment-like-btn:hover {
    color: #ef4444;
}
.comment-like-btn:hover i {
    color: #ef4444;
}
.comment-like-btn.liked {
    color: #ef4444;
}
.comment-like-btn.liked i {
    color: #ef4444;
}
.comment-like-btn.loading {
    opacity: 0.5;
    pointer-events: none;
}
.comment-like-count {
    font-weight: 500;
}
