/* layouts/app.css */


*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-body: #ffffff;
    --bg-elevated: #ffffff;
    --bg-header: #ffffff;
    --bg-header-accent: #2563eb;

    --accent: #2563eb;
    --accent-soft: #edf2ff;
    --accent-soft-strong: #dbe4ff;

    --text-main: #111827;
    --text-muted: #6b7280;

    --border-soft: #e5e7eb;

    --radius-lg: 16px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --radius-pill: 999px;

    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-header: 0 2px 12px rgba(15, 23, 42, 0.06);

    --transition-fast: 0.15s ease-out;
    --transition-med: 0.2s ease-out;


    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, -system-ui, "Segoe UI", sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, -system-ui, "Segoe UI", sans-serif;
    --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, -system-ui, "Segoe UI", sans-serif;
}

/* Body */
body {
    font-family: var(--font-body);
    background: var(--bg-body);
    margin: 0;
    padding: 0;
    color: var(--text-main);
    -webkit-tap-highlight-color: transparent;
}

/* Headings and titles */
h1,
h2,
h3,
h4,
h5,
h6,
.app-brand .brand-text-main,
.form-title,
.modal-title,
.offer-title,
.page-standalone-header-links a {
    font-family: var(--font-heading);
    letter-spacing: 0.01em;
}

.app-header {
    background: var(--bg-header);
    color: var(--text-main);
    padding: 14px 20px 16px;
    box-shadow: var(--shadow-header);
    position: sticky;
    top: 0;
    z-index: 50;
    /* keep header above content & bottom nav */
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        transform var(--transition-med),
        box-shadow var(--transition-med),
        padding var(--transition-med),
        background-color var(--transition-med);
}

/* Header state when user has scrolled (adds subtle shadow/compact state) */
.app-header--scrolled {
    box-shadow: var(--shadow-header);
    background: rgba(255, 255, 255, 0.98);
}

/* Compact header variant (reduced vertical padding) */
.app-header--compact {
    padding-top: 8px;
    padding-bottom: 10px;
}

/* Hidden header state (used when scrolling down) */
.app-header--hidden {
    transform: translateY(-100%);
}

.app-header-inner {
    max-width: 1100px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #e0edff, #c4d7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #1d4ed8;
    box-shadow: 0 0 0 1px rgba(209, 213, 219, 0.9);
}

.brand-text-main {
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 1rem;
}

.brand-text-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Header CTA button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast);
    background: #ffffff;
    color: var(--text-main);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.btn span {
    margin-left: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #f9fafb;
    border-color: rgba(191, 219, 254, 0.9);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.32);
}

.btn-ghost {
    background: transparent;
    color: var(--text-main);
    border-color: rgba(209, 213, 219, 0.9);
}

.btn-ghost:hover {
    background: #f3f4f6;
}

/* Search bar in header */
.search-bar {
    max-width: 1100px;
    margin: 0 auto;
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-bar-row {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-input,
.search-select {
    position: relative;
    flex: 1;
    min-width: 150px;
}

.input-base,
.select-base {
    width: 100%;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(209, 213, 219, 0.9);
    padding: 8px 12px 8px 34px;
    font-size: 0.9rem;
    background: #ffffff;
    color: var(--text-main);
    outline: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background-color var(--transition-fast),
        transform var(--transition-fast);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}

.input-base::placeholder,
.select-base::placeholder {
    color: #9ca3af;
}

.input-base:focus,
.select-base:focus {
    border-color: #2563eb;
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.35),
        0 0 0 5px rgba(59, 130, 246, 0.08);
    background: #ffffff;
    transform: translateY(-1px);
}

.search-bar-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-bar-icon i {
    width: 16px;
    height: 16px;
}

/* Search submit button */
.search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(191, 219, 254, 0.9);
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: #f9fafb;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.18);
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        filter var(--transition-fast);
    white-space: nowrap;
}

.search-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.24);
    filter: brightness(1.03);
}

/* General layout */
.page-container {
    max-width: 1100px;
    margin: 18px auto 40px;
    padding: 0 16px 80px;
    /* extra bottom padding for mobile bottom nav */
}

/* Top strip info */
.top-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.top-strip strong {
    color: var(--text-main);
}

/* Offer grid + cards */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.offer-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(229, 231, 235, 0.9);
    position: relative;
    transition:
        transform var(--transition-med),
        box-shadow var(--transition-med),
        border-color var(--transition-med),
        background-color var(--transition-med);
}

.offer-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.12), transparent 60%);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-med);
    z-index: -1;
}

.offer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    border-color: rgba(191, 219, 254, 0.9);
    background-color: #ffffff;
}

.offer-card:hover::before {
    opacity: 1;
}

.offer-image {
    width: 100%;
    height: 180px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition:
        transform var(--transition-med),
        filter var(--transition-med);
}

.offer-card:hover .offer-image img {
    transform: scale(1.04);
    filter: saturate(1.03);
}

.offer-image span {
    font-size: 0.9rem;
    color: #4b5563;
}

.offer-content {
    padding: 10px 14px 12px;
    flex-grow: 1;
}

.offer-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.offer-pill {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    border: 1px solid rgba(209, 213, 219, 0.9);
    color: #4b5563;
    background: #ffffff;
}

.offer-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.meta-icon i {
    width: 14px;
    height: 14px;
}

/* What the user is OFFERING
   - Soft green: calm, trustworthy, “available and safe” */
.offer-description {
    font-size: 0.8rem;
    font-family: "Tahoma", "Segoe UI", system-ui, -system-ui, sans-serif;
    background: linear-gradient(135deg, #f3f6f5, #e9f8f0);
    /* soft mint/green */
    color: #0f172a;
    padding: 4px 8px 3px 10px;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.10);

    display: block;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    /* modern */
    word-wrap: break-word;
    /* legacy */
    word-break: break-word;
    /* extra safety for long tokens */
}

/* What the user WANTS IN EXCHANGE
   - Warm amber: inviting, “opportunity / attention” */
.offer-looking-for {
    font-size: 0.8rem;
    font-family: "Tahoma", "Segoe UI", system-ui, -system-ui, sans-serif;
    color: #0f172a;
    background: linear-gradient(135deg, #fbfaf3, #f8f3e0);
    /* soft amber */
    padding: 4px 8px 3px 10px;
    border-radius: 6px;
    border: 1px solid #fed7aa;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.10);

    display: block;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.offer-looking-for-label {
    font-family: var(--font-ui);
    font-weight: 600;
    font-style: normal;
    text-transform: none;
    color: #374151;
}

.offer-looking-for-text {
    font-family: var(--font-body);
}

/* Footer of card */
.offer-footer {
    padding: 7px 12px 9px;
    border-top: 1px solid var(--border-soft);
    font-size: 0.78rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    row-gap: 4px;
    /* extra vertical breathing room when items wrap */
}

.offer-footer-date {
    color: var(--text-muted);
    font-family: var(--font-ui);
}

.offer-footer-actions a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    border-radius: 999px;
    padding: 4px 10px;
    background: #eef2ff;
    border: 1px solid rgba(199, 210, 254, 0.9);
    transition:
        background-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        color var(--transition-fast);
}

.offer-footer-actions a:hover {
    background: var(--accent);
    color: #eff6ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.offer-card hr {
    border: none;
    border-top: 1px solid rgba(200, 204, 210, 0.134);
    /* light slate line */
    margin: 6px 0;
}

.offer-card hr,
.offer-detail-info hr {
    border: none;
    border-top: 1px solid rgba(200, 204, 210, 0.134);
    /* light slate line */
    margin: 6px 0;
}

/* Empty state */
.empty {
    text-align: center;
    color: var(--text-muted);
    margin-top: 30px;
    padding: 18px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

/* Form styles (used inside modals and standalone pages) */
.form-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 18px 18px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(229, 231, 235, 0.9);
}

.form-title {
    margin-top: 0;
    margin-bottom: 4px;
    font-size: 1.05rem;
    font-weight: 600;
}

.form-subtitle {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-label {
    font-family: var(--font-ui);
    font-weight: 600;
    display: block;
    margin-top: 10px;
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: #111827;
}

/* ----------------------------------------------------------
 * Conversations list (inside form-card)
 * ---------------------------------------------------------- */
.conversations-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Each conversation row */
.conversation-card {
    border-radius: 12px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    background: linear-gradient(135deg, #ffffff, #f9fafb);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: default;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        background-color var(--transition-fast);
}

.conversation-card:hover {
    transform: translateY(-1px);
    border-color: rgba(191, 219, 254, 0.9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    background: linear-gradient(135deg, #f9fafb, #eef2ff);
}

/* Left side: title + meta */
.conversation-header {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    /* allow text truncation */
}

.conversation-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-main);
}

.conversation-title strong {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.01em;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.conversation-date {
    font-family: var(--font-ui);
}

/* Unread badge */
.badge.badge-unread {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    box-shadow: 0 1px 3px rgba(185, 28, 28, 0.25);
}

/* Right side: action */
.conversation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.conversation-actions .btn {
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* Mobile tweaks */
@media (max-width: 640px) {
    .conversation-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .conversation-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 4px;
    }

    .conversation-title strong {
        max-width: 100%;
    }
}

.wants-label {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;

    display: inline-block;
    color: #111827;
}

.input-control,
.select-control,
.textarea-control {
    width: 100%;
    padding: 8px 11px;
    border-radius: var(--radius-sm);
    border: 1px solid #d1d5db;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    box-sizing: border-box;
    background: #ffffff;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background-color var(--transition-fast),
        transform var(--transition-fast);
    outline: none;
}

.textarea-control {
    min-height: 80px;
    resize: vertical;
}

.input-control:focus,
.select-control:focus,
.textarea-control:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.35),
        0 0 0 5px rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
}

.input-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Category quick chips */
.category-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    margin-top: 4px;
}

.cat-chip {
    border: 1px solid rgba(209, 213, 219, 0.9);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    background: #f9fafb;
    color: #4b5563;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

.cat-chip:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #1f2937;
}

.cat-chip-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

/* Auth modal tabs */
.auth-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid var(--border-soft);
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.auth-tab {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

.auth-tab:hover {
    background: #eef2ff;
    color: #1f2937;
}

.auth-tab-active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.18));
    color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.16);
}

/* Location suggestions dropdown */
.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: #ffffff;
    border-radius: 12px;
    margin-top: 4px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(229, 231, 235, 0.98);
    max-height: 220px;
    overflow-y: auto;
}

.location-suggestion-item {
    padding: 7px 10px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.location-suggestion-item span {
    font-size: 0.9rem;
}

.location-suggestion-item:hover,
.location-suggestion-item.active {
    background: var(--accent-soft);
}

/* Media preview carousel */
.media-preview-wrapper {
    margin-top: 10px;
    border-radius: 12px;
    border: 1px dashed rgba(209, 213, 219, 0.9);
    background: #f9fafb;
    padding: 8px 8px 10px;
}

.media-preview-empty {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 4px 2px 2px;
}

.media-preview-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.media-preview-item {
    position: relative;
    flex: 0 0 84px;
    max-width: 84px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    overflow: hidden;
}

.media-preview-thumb {
    width: 100%;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    overflow: hidden;
}

.media-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview-video-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.media-preview-name {
    font-size: 0.68rem;
    color: #4b5563;
    padding: 0 4px 4px;
    text-align: center;
    word-break: break-word;
}

.media-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    border: none;
    background: rgba(15, 23, 42, 0.6);
    color: #f9fafb;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition:
        background-color var(--transition-fast),
        transform var(--transition-fast);
}

.media-preview-remove:hover {
    background: rgba(220, 38, 38, 0.9);
    transform: scale(1.05);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 80;
    /* sit above sticky header (z-index: 50) and bottom nav */
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    background: var(--bg-elevated);
    border-radius: 18px;
    max-width: 720px;
    width: 100%;
    margin: 0 14px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 10px 16px 8px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f9fafb;
}

.modal-title {
    font-size: 0.98rem;
    font-weight: 600;
}

.modal-close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    color: #6b7280;
    padding: 4px;
    border-radius: 999px;
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast);
}

.modal-close:hover {
    background: #e5e7eb;
    color: #111827;
    transform: rotate(3deg);
}

.modal-body {
    padding: 14px 16px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ----------------------------------------------------------
 * Image zoom overlay for conversation images
 * ---------------------------------------------------------- */
.image-zoom-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.70);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 90;
    /* above other modals */
}

.image-zoom-backdrop.show {
    display: flex;
}

.image-zoom-inner {
    position: relative;
    max-width: 94vw;
    max-height: 94vh;
    border-radius: 18px;
    background: #0b1120;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.6);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-zoom-inner img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.image-zoom-close {
    position: absolute;
    top: 6px;
    right: 6px;
    border: none;
    background: rgba(15, 23, 42, 0.7);
    color: #e5e7eb;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        background-color var(--transition-fast),
        transform var(--transition-fast);
}

.image-zoom-close:hover {
    background: rgba(30, 64, 175, 0.9);
    transform: scale(1.04);
}

/* Offer details in modal */
/* Offer detail main layout (optional, for nicer side-by-side) */
.offer-detail-main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.offer-detail-image {
    flex: 1 1 320px;
    min-width: 260px;
}

.offer-detail-info {
    flex: 1 1 260px;
}

/* Main media area with arrows */
.offer-detail-main-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
}

.offer-detail-main-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Arrow buttons for carousel */
.offer-media-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(15, 23, 42, 0.4);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 2;
    transition:
        background-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.offer-media-nav:hover {
    background: rgba(37, 99, 235, 0.8);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
}

.offer-media-nav-prev {
    left: 8px;
}

.offer-media-nav-next {
    right: 8px;
}

/* Thumbnails row (horizontal scroll) */
.offer-detail-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 8px;
    padding-bottom: 4px;
    overflow-x: auto;
}

.offer-detail-thumb {
    flex: 0 0 80px;
    /* fixed-ish width per thumb */
}

/* Thumbnail card style */
.offer-detail-thumb img,
.offer-detail-thumb-video {
    width: 100%;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

/* Video thumb content */
.offer-detail-thumb-video-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.offer-detail-thumb-name {
    font-size: 0.7rem;
    color: #4b5563;
    padding: 0 4px 4px;
    text-align: center;
    word-break: break-word;
}

/* Active thumb highlight */
.offer-detail-thumb-active {
    outline: 2px solid #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

/* Optional: make thumbs slightly zoom on hover like main image */
.offer-detail-thumb-img.zoom-on-hover:hover {
    transform: scale(1.03);
}

.offer-detail-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.offer-detail-section-title {
    font-weight: 600;
    margin-top: 12px;
    margin-bottom: 4px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #4b5563;
}

.offer-detail-contact {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    margin-top: 10px;
    font-size: 0.9rem;
    border: 1px solid rgba(191, 219, 254, 0.9);
}

/* Standalone page wrapper (for direct access) */
.page-standalone-container {
    max-width: 800px;
    margin: 30px auto;
    background: var(--bg-elevated);
    padding: 20px 22px 26px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.page-standalone-header-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
}

.page-standalone-header-links a:hover {
    text-decoration: underline;
}

/* Bottom nav (app-wide, card-like) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.06);
    padding: 6px 12px;
    z-index: 30;
    display: block;
    /* visible on all screen sizes */
}

.bottom-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}

.bottom-nav-item {
    flex: 1;
    border-radius: 14px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition:
        background-color var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        color var(--transition-fast);
}

.bottom-nav-item-active {
    border-color: rgba(191, 219, 254, 0.9);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    color: var(--accent);
}

.bottom-nav-item:hover {
    background: #f9fafb;
}

.bottom-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-icon i {
    width: 18px;
    height: 18px;
}

.bottom-nav-label {
    font-family: var(--font-ui);
    font-size: 0.72rem;
}

/* Error state for inputs/selects in Swapa auth modal */
.input-control.input-error,
.select-control.input-error {
    border-color: #dc2626 !important;
    /* Red border */
    background-color: #fef2f2 !important;
    /* Light red background */
    box-shadow:
        0 0 0 1px rgba(220, 38, 38, 0.6),
        0 0 0 5px rgba(248, 113, 113, 0.25);
    /* Red halo */
}

/* Flash / alert banners */
.swapa-alert {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 0.88rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.swapa-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.moderation-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin-left: 6px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.moderation-chip-moderated {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.moderation-chip-pending {
    background: #fefce8;
    color: #854d0e;
    border-color: #facc15;
}

.offer-owner-note {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #4b5563;
    background: #eff6ff;
    border-radius: 6px;
    padding: 4px 8px;
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .app-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar-row {
        flex-direction: column;
    }

    .search-submit {
        width: 100%;
        justify-content: center;
    }

    .bottom-nav {
        display: block;
    }
}

.message-meta .message-read-status {
    margin-left: 8px;
    font-size: 0.75rem;
    color: #c8d6bf;
    font-style: italic;
}

/* ----------------------------------------------------------
 * Scroll-to-top button (floats above bottom nav)
 * ---------------------------------------------------------- */
.scroll-to-top {
    position: fixed;
    right: 16px;
    bottom: 80px;
    /* sit above bottom nav */
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: var(--primary, #4f46e5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
    cursor: pointer;
    z-index: 60;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition:
        opacity var(--transition-med),
        transform var(--transition-med),
        box-shadow var(--transition-fast);
}

.scroll-to-top:hover {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.30);
}

.scroll-to-top i {
    width: 18px;
    height: 18px;
}

.scroll-to-top.scroll-to-top--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@media (max-width: 600px) {
    .scroll-to-top {
        right: 12px;
        bottom: 88px;
        /* slightly higher on small screens */
    }
}

/* Smoothly adjust content position when header hides/shows */
.page-container {
    transition: margin-top var(--transition-med);
}

/* ----------------------------------------------------------
 * Header search collapse/reveal
 * - Header stays visible
 * - Search form slides open on hover or when header has
 *   the .app-header-search-open class (toggled by JS)
 * ---------------------------------------------------------- */
.app-header .search-bar {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    margin-top: 0;
    padding-top: 0;
    transition:
        max-height var(--transition-med),
        opacity var(--transition-med),
        transform var(--transition-med),
        margin-top var(--transition-med),
        padding-top var(--transition-med);
}

/* Show search when header is hovered (desktop)
   or explicitly opened via JS (all devices) */
.app-header:hover .search-bar,
.app-header.app-header-search-open .search-bar {
    max-height: 260px;
    /* enough to show the full form */
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    margin-top: 8px;
    padding-top: 4px;
}

@media (max-width: 640px) {

    /* On small screens, search stays collapsed by default.
       We rely on tap (JS toggle) to show it. */
    .app-header .search-bar {
        max-height: 0;
    }
}

/* ----------------------------------------------------------
 * Conversations / Chat thread styling (WhatsApp-inspired)
 * ---------------------------------------------------------- */
.conversation-thread {
    margin-top: 10px;
    margin-bottom: 14px;
    padding: 10px 10px 12px;
    border-radius: 18px;
    background: #f5f7fb;
    border: 1px solid rgba(209, 213, 219, 0.9);
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-behavior: smooth;
    font-family: var(--font-ui);
    -webkit-overflow-scrolling: touch;
}

.conversation-thread p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Each message line (optional row wrapper if present) */
.message-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.message-row-self {
    justify-content: flex-end;
}

.message-row-other {
    justify-content: flex-start;
}

.message-recalled {
    font-style: italic;
    opacity: 0.75;
}

/* Generic bubble base */
.message-bubble {
    position: relative;
    max-width: 80%;
    padding: 6px 9px;
    border-radius: 16px;
    font-size: 0.8rem;
    line-height: 1.3;
    display: inline-block;
    text-align: left;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    font-family: var(--font-ui);
}

.message-bubble>* {
    display: block;
    width: 100%;
    text-align: left;
}

/* Messages from current user (right aligned, WhatsApp-like green) */
.message-bubble-self {
    margin-left: auto;
    background: #dcf8c6;
    color: #111827;
    border-bottom-right-radius: 4px;
}

/* Tail for self bubble (right side) */
.message-bubble-self::after {
    content: "";
    position: absolute;
    right: -4px;
    bottom: 0;
    width: 8px;
    height: 8px;
    background: #dcf8c6;
    border-bottom-right-radius: 12px;
    box-shadow: 2px 2px 2px rgba(15, 23, 42, 0.04);
}

/* Messages from other user (left aligned, light grey) */
.message-bubble-other {
    margin-right: auto;
    background: #ffffff;
    color: #0f172a;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(209, 213, 219, 0.9);
}

/* Tail for other bubble (left side) */
.message-bubble-other::before {
    content: "";
    position: absolute;
    left: -4px;
    bottom: 0;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-bottom-left-radius: 12px;
    box-shadow: -2px 2px 2px rgba(15, 23, 42, 0.04);
}

/* Image wrapper inside message bubbles */
.message-image-wrapper {
    margin-top: 4px;
    border-radius: 10px;
    overflow: hidden;
    /* Keep image preview compact inside bubble */
    max-width: 220px;
    /* or 100% for full bubble width */
    max-height: 180px;
    /* controls how tall the bubble can get from image */
}

/* Make sure wrapper respects bubble width */
.message-bubble-self .message-image-wrapper,
.message-bubble-other .message-image-wrapper {
    width: 100%;
}

/* The preview image itself */
.message-image-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* or 'contain' if you prefer full image visible */
}

/* Meta row (who + when) */
.message-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.7rem;
    opacity: 0.9;
    width: 100%;
}

.message-sender {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.message-time {
    font-size: 0.68rem;
    color: rgba(148, 163, 184, 0.95);
    white-space: nowrap;
}

.message-text {
    font-size: 0.8rem;
    word-wrap: break-word;
    white-space: pre-line;
    width: 100%;
    text-align: left;
    display: block;
}

/* Slightly different meta/text colors inside self bubble */
.message-bubble-self .message-meta {
    color: rgba(75, 85, 99, 0.88);
}

.message-bubble-self .message-time {
    color: rgba(100, 116, 139, 0.95);
}

/* Optional circular avatars if present in markup */
.message-avatar {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #4b5563;
    flex-shrink: 0;
}

.message-row-self .message-avatar {
    order: 2;
}

.message-row-self .message-bubble {
    order: 1;
}

.message-row-other .message-avatar {
    order: 1;
}

.message-row-other .message-bubble {
    order: 2;
}

.offer-messages-unread-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    background-color: #16a34a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
}

.offer-messages-unread-pill:hover,
.btn:hover .offer-messages-unread-pill {
    background-color: #22c55e;
    /* slightly brighter green */
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.4),
        0 4px 8px rgba(22, 163, 74, 0.25);
    transform: translateY(-1px);
}


/* Reply form beneath thread */
.conversation-reply-form {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(229, 231, 235, 0.9);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--font-ui);
}

.conversation-reply-form .form-group {
    margin: 0;
}

.conversation-reply-form textarea.input-control,
.conversation-reply-form textarea.textarea-control {
    border-radius: 12px;
    font-size: 0.82rem;
}

.conversation-reply-form .btn {
    align-self: flex-end;
    margin-top: 2px;
}

.typing-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #6b7280;
    margin: 4px 8px 8px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background-color: #9ca3af;
    animation: typing-bounce 1s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.3s;
}

.offer-card-ad {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.offer-pill-ad {
    background: #fef3c7;
    color: #92400e;
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* Boost badge */
.boost-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
    color: #4a2c00;
    box-shadow: 0 0 0 1px rgba(255, 204, 128, 0.6);
}

/* Boost button */
.boost-offer-btn {
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    background: linear-gradient(135deg, #4c6fff, #6b8bff);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(76, 111, 255, 0.35);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.boost-offer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(76, 111, 255, 0.5);
}

.boost-offer-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(76, 111, 255, 0.45);
}

/* Modal */
.boost-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.boost-modal-backdrop.active {
    display: flex;
}

.boost-modal {
    background: #ffffff;
    border-radius: 18px;
    max-width: 360px;
    width: 100%;
    padding: 16px 18px 18px;
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.25),
        0 0 0 1px rgba(148, 163, 184, 0.25);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.boost-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.boost-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.boost-modal-close {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    color: #64748b;
}

.boost-options {
    display: grid;
    gap: 8px;
    margin: 8px 0 12px;
}

.boost-option {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
    font-size: 13px;
}

.boost-option.active {
    border-color: #4c6fff;
    background: linear-gradient(135deg, #f5f7ff, #ffffff);
    box-shadow: 0 0 0 1px rgba(76, 111, 255, 0.4);
}

.boost-option-title {
    font-weight: 600;
    color: #0f172a;
}

.boost-option-meta {
    font-size: 12px;
    color: #64748b;
}

.boost-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.boost-modal-btn {
    border-radius: 999px;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}

.boost-modal-btn-secondary {
    background: #e2e8f0;
    color: #1e293b;
}

.boost-modal-btn-primary {
    background: #4c6fff;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(76, 111, 255, 0.35);
}

.boost-modal-status {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

/* Profile (scoped inside modal) */
.profile-view .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-view .label {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-main);
}

.profile-view .input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.9);
    padding: 10px 12px;
    font-size: 0.9rem;
    background: #ffffff;
    color: var(--text-main);
    outline: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

.boost-package-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;

    /* Hidden by default; JS should toggle .active */
    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(15, 23, 42, 0.55);
    /* slate-900 @ ~55% */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    /* Prevent background scroll chaining on mobile */
    overscroll-behavior: contain;

    /* Safe padding so the modal never hugs screen edges */
    padding: 16px;
}

.boost-package-modal-backdrop.active {
    display: flex;
}


#boost-package-modal.boost-package-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    padding: 16px;
}

#boost-package-modal.boost-package-modal-backdrop.active {
    display: flex;
}

@keyframes boostModalPop {
    from {
        transform: translateY(12px) scale(0.98);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.boost-package-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.boost-package-close-btn {
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

.boost-package-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
}

.boost-package-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.boost-package-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.boost-package-card-selected {
    border-color: #4c6fff;
    box-shadow: 0 0 0 2px rgba(76, 111, 255, 0.25);
}

.boost-package-price {
    font-weight: 600;
    margin-top: 4px;
}

.boost-package-duration {
    font-size: 0.85rem;
    color: #64748b;
}

.boost-package-description {
    font-size: 0.85rem;
    color: #475569;
    margin-top: 6px;
}


.profile-view .input:focus {
    border-color: var(--accent);
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.35),
        0 0 0 5px rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
}

.profile-view #profile-message,
.profile-view #profile-password-message {
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.profile-view #profile-message:empty,
.profile-view #profile-password-message:empty {
    display: none;
}

@keyframes typing-bounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    40% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .conversation-thread {
        max-height: 320px;
        padding: 8px 8px 10px;
    }

    .message-bubble {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .modal {
        max-height: 88vh;
        margin-top: 8px;
    }
}