/* Design tokens (--brand, --brand-primary legacy aliases, --bs-primary*, --font, etc.) now live
   in theme.css, loaded before this file — this used to redefine its own :root block here, which
   silently clobbered theme.css's values and the runtime per-community override in
   MainLayout.razor since both targeted the same custom property names. */

a, .btn-link {
    color: var(--brand-primary);
}

a:hover, .btn-link:hover {
    color: var(--brand-primary-dark);
}

.btn-primary {
    color: #fff;
    background-color: var(--brand-primary);
    border-color: var(--brand-primary-dark);
}

.btn-primary:hover, .btn-primary:active {
    background-color: var(--brand-primary-dark);
    border-color: var(--brand-primary-darker);
}

.btn-primary:disabled, .btn-primary.disabled {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary-dark);
    opacity: 0.65;
}

.btn-outline-primary {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.progress-bar {
    background-color: var(--brand-primary);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #c0392b;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.match-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 0.5rem;
    overflow: hidden;
}

.match-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
}

.match-row + .match-row {
    border-top: 1px solid #eee;
}

.my-matrimonial-photo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    flex: 0 0 auto;
}

.match-photo {
    position: relative;
    flex: 0 0 auto;
    width: 130px;
    height: 160px;
}

.match-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.35rem;
}

.match-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 0.35rem;
    background: #f1e4e4;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
}

.shortlist-icon-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--brand-primary);
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.shortlist-icon-btn.active {
    background: var(--brand-primary);
    color: #fff;
}

.platinum-badge {
    position: absolute;
    left: 0.35rem;
    bottom: 0.35rem;
    right: 0.35rem;
    background: linear-gradient(90deg, #b0206e, #8b1a6b);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.3rem 0.4rem;
    border-radius: 999px;
    text-align: center;
}

.match-info {
    flex: 1 1 auto;
    min-width: 0;
}

.match-name {
    color: var(--brand-primary);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
    color: #555;
    font-size: 0.92rem;
    margin-bottom: 0.15rem;
}

.match-meta span {
    display: inline-flex;
    align-items: center;
}

.match-meta span::before {
    content: "\2022";
    margin-right: 0.4rem;
    color: var(--brand-primary);
}

.match-meta strong {
    margin-left: 0.25rem;
    color: #333;
}

.match-action {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    align-self: flex-start;
}

.match-interest-msg {
    font-size: 0.8rem;
    color: #666;
    max-width: 140px;
    text-align: right;
}

@media (max-width: 640px) {
    /* Flexbox line-wrapping decides whether an item fits a line using its unshrunk
       content width, ignoring min-width:0 — so .match-info (long "Job: ..." text)
       got pushed to its own line below the photo, leaving the photo's line half
       empty. Grid sizes .match-info by its column track instead, so it always
       sits beside the photo and wraps its own text within that width. */
    .match-row {
        display: grid;
        grid-template-columns: 100px 1fr;
        grid-template-areas:
            "photo info"
            "action action";
        column-gap: 1rem;
        row-gap: 0.6rem;
        align-items: start;
    }

    .match-photo {
        grid-area: photo;
        width: 100px;
        height: 130px;
    }

    .match-info {
        grid-area: info;
    }

    .match-action {
        grid-area: action;
        flex-direction: row;
        align-items: center;
        align-self: auto;
        margin-left: 0;
    }
}

/* Photo carousel (Details page) — plain CSS/Blazor state, no Bootstrap JS bundle is loaded */
.photo-carousel {
    position: relative;
    margin: -1rem -1.5rem 0;
}

.photo-carousel-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 520px;
    overflow: hidden;
    background: var(--surface-2);
}

.photo-carousel-frame img, .photo-carousel-frame .match-photo-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Desktop: the frame above is full-bleed-width-driven, which on a ~1150px wide content
   column turns a portrait photo into a tall-but-ultra-wide crop window. Cap the whole
   carousel to a sane portrait-card width and center it instead of stretching edge to edge. */
@media (min-width: 1024px) {
    .photo-carousel {
        max-width: 420px;
        margin: 0 auto 1.25rem;
        border-radius: var(--r-card);
        overflow: hidden;
        box-shadow: var(--shadow-card);
    }
}

.photo-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-carousel-prev {
    left: 0.5rem;
}

.photo-carousel-next {
    right: 0.5rem;
}

.photo-carousel-back-btn, .photo-carousel-shortlist-btn {
    position: absolute;
    top: var(--space-4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: none;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.photo-carousel-back-btn { left: var(--space-4); }
.photo-carousel-shortlist-btn { right: var(--space-4); color: var(--brand); }

/* Positioned absolutely over the whole of RemoteImage's nearest position:relative ancestor —
   every call site below that uses ShowSpinner already has (or has been given) one. */
.remote-image-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-3);
}

.photo-carousel-counter {
    position: absolute;
    bottom: var(--space-3);
    right: var(--space-3);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: var(--fs-overline);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--r-chip);
    z-index: 2;
}

/* Lightweight custom modal (Express Interest, etc.) */
.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
}

.modal-card {
    background: var(--surface);
    border-radius: var(--r-card);
    padding: 1.5rem;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

/* Filter sheet — bottom sheet on mobile, side panel on desktop (same breakpoint as the app
   shell). Shares the .modal-backdrop-custom backdrop. */
.filter-sheet {
    background: var(--surface);
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: var(--space-5);
    border-radius: var(--r-card) var(--r-card) 0 0;
    align-self: flex-end;
}

@media (min-width: 1024px) {
    .filter-sheet {
        max-width: 380px;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        align-self: stretch;
        margin-left: auto;
    }

    .modal-backdrop-custom:has(.filter-sheet) {
        justify-content: flex-end;
        padding: 0;
    }
}

.filter-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

/* My Matrimonial — each profile is a full card with clearly separated action sections, instead
   of cramming Edit/Deactivate/Biodata/Recharge into the narrow generic .match-action sidebar
   (which wraps badly once a profile has this many distinct actions, especially on mobile). */
.my-matrimonial-card {
    background: var(--surface);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
}

.my-matrimonial-header {
    display: flex;
    gap: 1rem;
    margin-bottom: var(--space-2);
}

.my-matrimonial-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.expired-alert-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    background: var(--danger-bg);
    color: var(--danger-ink);
    border-radius: var(--r-input);
    padding: var(--space-3);
    margin-top: var(--space-3);
    font-size: var(--fs-meta);
}

.profile-footer-split {
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    gap: var(--space-2);
}

.profile-footer-split .btn-app {
    flex: 1 1 140px;
    min-width: 0;
}

.my-matrimonial-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.my-matrimonial-section-label {
    flex: 0 0 100%;
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
}

.my-matrimonial-inline-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.my-matrimonial-inline-row select {
    flex: 0 1 auto;
    min-width: 8rem;
}

.recharge-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.biodata-locked-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

/* Bottom tab bar — primary mobile nav (MAUI always; Web below the 1024px breakpoint, see
   MainLayout.razor.css). Fixed to the viewport bottom, so .mobile-content gets matching
   padding-bottom below to keep page content from being hidden behind it. */
.bottom-tab-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--surface);
    border-top: 1px solid var(--line);
    z-index: 900;
}

.bottom-tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--ink-3);
    font-size: var(--fs-overline);
    font-weight: 600;
    text-decoration: none;
    min-height: 44px;
}

.bottom-tab-item.active {
    color: var(--brand);
}

.bottom-tab-icon-wrap {
    position: relative;
    display: flex;
}

.bottom-tab-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.2rem;
}

.mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 950;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 80vw;
    max-width: 300px;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-primary-darker) 100%);
    z-index: 960;
    overflow-y: auto;
}

/* NavMenu's own .nav-scrollable is `display: none` until its (hidden, since
   ShowBrandHeader="false" here) checkbox toggle is checked — with no checkbox
   in the DOM and a viewport under 641px, that selector never matches, so the
   drawer would otherwise render as an empty panel. The scoped NavMenu.razor.css
   rule carries a `[b-xxxx]` attribute selector that ties this rule's specificity
   and loads after app.css, so !important is needed to reliably win. */
.mobile-drawer .nav-scrollable {
    display: block !important;
}

.mobile-content {
    padding-top: 1rem;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0) + 1rem);
}

.search-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.5rem 0;
}

.search-filter-toggle-chevron {
    font-size: 0.6rem;
}

/* Matches/Search page — search bar + Filters button, active-filter chips, result cards. Uses
   its own classes rather than the older shared .match-* ones (still used by My Matrimonial until
   its own redesign pass) to avoid affecting that page before its turn. */
.search-bar-row {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.search-bar-row .field {
    flex: 1;
    margin-bottom: 0;
}

.filter-btn {
    position: relative;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: var(--r-input);
    background: var(--brand);
    color: var(--on-brand);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-btn-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--on-brand);
    color: var(--brand);
    font-size: var(--fs-overline);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.filter-chips-row {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-2);
}

.filter-chips-row .chip {
    flex: 0 0 auto;
}

.filter-chip-remove {
    background: none;
    border: none;
    color: inherit;
    display: flex;
    padding: 0;
    margin-left: 2px;
}

.search-result-card {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) 0;
}

.search-result-card + .search-result-card {
    border-top: 1px solid var(--line);
}

.search-result-photo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    flex: 0 0 auto;
}

.search-result-photo {
    position: relative;
    flex: 0 0 auto;
    width: 96px;
    height: 116px;
}

.search-result-photo img, .search-result-photo .match-photo-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--r-input);
}

.photo-caption {
    font-size: 0.7rem;
    color: var(--ink-3);
    text-align: center;
    max-width: 100px;
}

.search-result-info {
    flex: 1 1 auto;
    min-width: 0;
}

.search-result-name-row {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.search-result-name-row strong {
    font-size: var(--fs-name);
    font-weight: 700;
}

.search-result-verified {
    color: var(--success);
    display: flex;
}

.search-result-meta {
    color: var(--ink-2);
    font-size: var(--fs-meta);
    margin: 2px 0 var(--space-2);
}

.search-result-detail-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--ink-3);
    font-size: var(--fs-meta);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-detail-row svg {
    flex: 0 0 auto;
    color: var(--ink-3);
}

.search-result-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.search-result-actions .btn-app {
    padding: 0 var(--space-3);
    height: 40px;
}

.search-result-actions .btn-app--primary {
    flex: 1;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--r-btn);
    border: 1.5px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.icon-btn.active {
    color: var(--brand);
    border-color: var(--brand);
}

/* Skeleton loading card (infinite scroll) */
.skeleton-card {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) 0;
}

.skeleton-block {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: var(--r-input);
}

.skeleton-photo {
    width: 96px;
    height: 116px;
    flex: 0 0 auto;
}

.skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding-top: var(--space-1);
}

.skeleton-line {
    height: 12px;
    width: 70%;
}

.skeleton-line.short {
    width: 40%;
}

@keyframes skeleton-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.conversation-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.conversation-header .match-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.conversation-header .match-photo img,
.conversation-header .mini-match-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    font-size: 1.2rem;
}

/* Message thread (matched-users chat) */
.message-thread {
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--r-input);
}

.message-bubble-row {
    display: flex;
    margin-bottom: 0.5rem;
}

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

.message-bubble {
    max-width: 70%;
    padding: 0.5rem 0.75rem;
    border-radius: var(--r-input);
    background: var(--surface-2);
}

.message-bubble.mine {
    background: var(--brand);
    color: var(--on-brand);
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.15rem;
}

/* Location autosuggest (free Nominatim-backed) */
.location-input-wrapper {
    position: relative;
}

.location-suggestions {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    max-height: 220px;
    overflow-y: auto;
    margin: 0.15rem 0 0;
    padding: 0;
    list-style: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.location-suggestions li {
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.location-suggestions li:hover {
    background: #f5eaea;
}

.location-input {
    padding-right: 2.25rem;
}

.location-detect-btn {
    background: none;
    border: none;
    color: var(--ink-3);
    position: absolute;
    top: 50%;
    right: var(--space-2);
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    padding: var(--space-1);
}

.location-detect-btn:disabled {
    opacity: 0.6;
}

.location-detect-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Image crop modal (Cropper.js-driven, built dynamically by image-crop.js) */
.image-crop-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 1rem;
}

.image-crop-card {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
    width: 100%;
    max-width: 960px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.image-crop-imgwrap {
    max-height: 78vh;
    overflow: hidden;
}

.image-crop-imgwrap img {
    max-width: 100%;
    display: block;
}

.image-crop-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Site-wide rounded input style */
.form-control, .form-select {
    border-radius: 0.75rem;
    border-color: #e2dcda;
    padding: 0.55rem 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
}

/* Auth pages (Login/Register/OTP/Forgot/Reset) — rounded card, icon avatar, pill CTA */
.auth-card {
    max-width: 420px;
    margin: 1rem auto;
}

.auth-icon-circle {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--brand-tint);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    overflow: hidden;
}

.auth-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.auth-title {
    color: var(--brand);
    font-size: var(--fs-title);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--ink-2);
    margin-bottom: 1.5rem;
}

.btn-pill {
    border-radius: var(--r-chip);
    padding: 0.7rem 1.5rem;
    font-weight: 700;
    width: 100%;
}

.password-field-wrap {
    position: relative;
}

.password-toggle-btn {
    background: none;
    border: none;
    color: var(--ink-3);
    position: absolute;
    top: 50%;
    right: var(--space-3);
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    padding: var(--space-1);
}

.phone-input-group {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-input);
    overflow: hidden;
    background: var(--surface);
    height: 52px;
}

.phone-input-group select {
    border: none;
    border-right: 1px solid var(--line-strong);
    border-radius: 0;
    background: var(--surface-2);
    max-width: 6rem;
    flex: 0 0 auto;
    height: auto;
}

.phone-input-group input {
    border: none;
    border-radius: 0;
    flex: 1 1 auto;
    height: auto;
}

.phone-input-group select:focus, .phone-input-group input:focus {
    box-shadow: none;
    border-color: var(--line-strong);
}

.auth-footer-link {
    text-align: center;
    margin-top: 1rem;
}

.otp-boxes {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.5rem 0;
}

.otp-box {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-input);
    color: var(--ink);
    background: var(--surface);
}

.otp-box:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-tint);
}

/* Details page action bar (Shortlist / Chat Now) */
/* Profile Details — sheet overlapping the photo header, fact chips, 2-col detail grid, sticky bar */
.profile-sheet {
    position: relative;
    margin: -28px -1.5rem 0;
    background: var(--surface);
    border-radius: var(--r-card) var(--r-card) 0 0;
    padding: var(--space-5) var(--space-4) var(--space-4);
    box-shadow: var(--shadow-card);
}

.profile-sheet-name-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.profile-sheet-name-row h1 {
    font-size: var(--fs-title);
    font-weight: 800;
    margin: 0;
}

.profile-sheet-subtitle {
    color: var(--ink-2);
    font-size: var(--fs-meta);
    margin-top: 2px;
}

.profile-fact-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.detail-section {
    margin-top: var(--space-4);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3) var(--space-4);
    margin-top: var(--space-2);
}

.detail-item .overline {
    display: block;
    margin-bottom: 2px;
}

.detail-item-value {
    font-size: var(--fs-base);
    font-weight: 600;
}

.profile-sticky-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: var(--space-2);
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: var(--space-3) 0;
    margin-top: var(--space-4);
}

.profile-sticky-bar .btn-app--primary {
    flex: 1;
}

/* Matrimonial profile creation wizard step indicator */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.wizard-step-circle {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--ink-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.wizard-step-circle.active {
    background: var(--brand);
    color: var(--on-brand);
}

.wizard-step-line {
    flex: 1 1 2rem;
    max-width: 2.5rem;
    height: 2px;
    background: var(--surface-2);
}

.wizard-step-line.active {
    background: var(--brand);
}

.wizard-step-caption {
    text-align: center;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1.5rem;
}

/* Interests/Chats page (Received / Sent / Shortlist segmented view, or the plain Chats list) */
.request-card {
    position: relative;
    display: flex;
    gap: 1rem;
    background: var(--surface);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    padding: 1rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.request-card-photo {
    position: relative;
    flex: 0 0 auto;
    width: 90px;
    height: 100px;
}

.request-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.request-card-info {
    flex: 1 1 auto;
    min-width: 0;
}

.request-card-info h5 {
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.chat-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #eee;
    border-top: none;
    padding: 0.75rem 1rem;
}

.chat-list-item .match-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
}

.chat-list-item .match-photo img,
.chat-list-item .mini-match-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    font-size: 1.4rem;
}

.chat-list-item:first-child {
    border-top: 1px solid #eee;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.chat-list-item:last-child {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.chat-list-info {
    flex: 1 1 auto;
    min-width: 0;
}

.chat-list-info h5.match-name {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.chat-list-father-name {
    font-size: 0.75rem;
    color: var(--ink-3, #6b635d);
}

.chat-list-meta {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.chat-list-time {
    font-size: 0.75rem;
    color: #999;
}

.chat-list-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0 0.3rem;
}

/* Home dashboard */
/* Home header: community logo mark + greeting + notification bell */
.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
}

.home-header-identity {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.home-logo-mark {
    width: 44px;
    height: 44px;
    border-radius: var(--r-btn);
    object-fit: cover;
    font-size: 1.1rem;
}

.home-logo-mark-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: var(--r-btn);
    overflow: hidden;
    flex: 0 0 auto;
}

/* Sidebar brand header — community logo + name, desktop sidebar only */
.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    overflow: hidden;
}

.sidebar-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--r-btn);
    object-fit: cover;
    font-size: 0.85rem;
    flex: 0 0 auto;
}

.sidebar-brand-logo-wrap {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: var(--r-btn);
    overflow: hidden;
    flex: 0 0 auto;
}

.sidebar-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-greeting-name {
    margin: 0;
    font-size: var(--fs-h2);
    font-weight: 800;
}

.home-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
}

.home-bell-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
}

.dashboard-profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    padding: 1rem;
    margin-bottom: 1rem;
}

.dashboard-profile-card img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.dashboard-profile-photo-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
}

.dashboard-profile-info {
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-profile-info h5 {
    margin-bottom: 0.1rem;
}

.progress-track {
    height: 6px;
    border-radius: var(--r-chip);
    background: var(--surface-2);
    overflow: hidden;
    margin-top: var(--space-1);
}

.progress-fill {
    height: 100%;
    background: var(--brand);
    border-radius: var(--r-chip);
}

.dashboard-nudge-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--brand-tint);
    color: var(--brand);
    border-radius: var(--r-input);
    padding: var(--space-3);
    margin-top: var(--space-3);
    text-decoration: none;
    font-size: var(--fs-meta);
}

.dashboard-nudge-row span {
    flex: 1;
}

.profile-nudge-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--success-bg);
    border-radius: var(--r-input);
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.25rem;
}

.dashboard-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.dashboard-section-header h5 {
    margin: 0;
}

/* Stats tiles (Interests received / Shortlisted / Unread chats) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.stats-tile {
    text-align: center;
    padding: var(--space-3);
    text-decoration: none;
    color: inherit;
    display: block;
}

.stats-tile strong {
    display: block;
    font-size: var(--fs-title);
    font-weight: 800;
}

.stats-tile span {
    font-size: var(--fs-meta);
    color: var(--ink-3);
}

/* "N members are looking for you" compact teaser row */
.looking-for-you-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--surface);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    padding: var(--space-3) var(--space-4);
    text-decoration: none;
    color: var(--ink);
    margin-top: var(--space-3);
}

.looking-for-you-row span {
    flex: 1;
    font-weight: 600;
}

.stacked-avatars {
    display: flex;
}

.stacked-avatars > * {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface);
    margin-left: -10px;
    font-size: 0.75rem;
}

.stacked-avatars > *:first-child {
    margin-left: 0;
}

.mini-match-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.mini-match-card {
    position: relative;
    flex: 0 0 auto;
    width: 150px;
    border-radius: var(--r-input);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--line);
    background: var(--surface);
}

.mini-match-card img, .mini-match-photo-placeholder {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.mini-match-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-tint);
    color: var(--brand);
    font-size: 2.5rem;
    font-weight: 600;
}

.mini-match-new-badge {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    background: var(--success-bg);
    color: var(--success-ink);
    font-size: var(--fs-overline);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--r-chip);
}

.mini-match-info {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.6rem;
    font-size: var(--fs-meta);
    color: var(--ink-2);
}

.mini-match-info strong {
    color: var(--ink);
    font-size: var(--fs-meta);
    margin-bottom: 0.1rem;
}

.discover-cards {
    display: flex;
    gap: 0.75rem;
}

.discover-card {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-input);
    padding: 0.9rem;
    text-decoration: none;
    color: inherit;
}

.discover-card-icon {
    color: var(--brand);
    display: flex;
}

.discover-card strong {
    display: block;
    font-size: var(--fs-meta);
}

.discover-card span {
    color: var(--ink-3);
    font-size: var(--fs-overline);
}

.splash-carousel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: -1rem -1.5rem 0;
    padding: 3rem 1.75rem 2.5rem;
    min-height: calc(100vh - 60px);
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 40% at 8% 0%, rgba(224, 164, 88, 0.35) 0%, transparent 70%),
        radial-gradient(ellipse 70% 45% at 100% 100%, color-mix(in srgb, var(--brand-primary, #8b1a1a) 55%, transparent) 0%, transparent 70%),
        linear-gradient(180deg, #fdf6ec 0%, #fbead2 38%, #f4d9ac 62%, color-mix(in srgb, var(--brand-primary, #8b1a1a) 70%, #3a0a0a) 100%);
}

.splash-carousel::before {
    /* Faint repeating diamond motif for texture, echoing a mandala pattern without needing a bitmap asset. */
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.025;
    pointer-events: none;
    background-image:
        linear-gradient(45deg, var(--brand-primary, #8b1a1a) 25%, transparent 25%, transparent 75%, var(--brand-primary, #8b1a1a) 75%),
        linear-gradient(45deg, var(--brand-primary, #8b1a1a) 25%, transparent 25%, transparent 75%, var(--brand-primary, #8b1a1a) 75%);
    background-size: 64px 64px;
    background-position: 0 0, 32px 32px;
}

.splash-badge {
    position: relative;
    z-index: 1;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, #e0a458, #b9762f);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.splash-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fdf6ec;
}

.splash-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary, #8b1a1a);
    color: #fdf6ec;
    font-size: 2.5rem;
    font-weight: 600;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

.splash-community-name {
    position: relative;
    z-index: 1;
    margin-top: 1.25rem;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--brand-primary, #8b1a1a) 85%, black);
    letter-spacing: 0.02em;
}

.splash-divider {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
    width: 100%;
    max-width: 18rem;
    color: #b9762f;
}

.splash-divider span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
}

.splash-divider i {
    font-style: normal;
    font-size: 0.8rem;
}

.splash-divider.small {
    margin-top: 1.5rem;
    max-width: 14rem;
}

.splash-feature-slide {
    position: relative;
    z-index: 1;
    margin-top: 1.5rem;
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 26rem;
}

.splash-feature-slide p {
    font-size: 1.05rem;
    font-weight: 500;
    color: #5a3a1a;
    transition: opacity 0.3s ease;
}

.splash-dots {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.splash-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(139, 26, 26, 0.2);
    cursor: pointer;
    transition: background 0.2s ease;
}

.splash-dot.active {
    background: var(--brand-primary, #8b1a1a);
}

.splash-about {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
    color: color-mix(in srgb, var(--brand-primary, #8b1a1a) 80%, black);
    font-weight: 600;
    font-size: 0.95rem;
    max-width: 26rem;
    text-align: justify;
}

.splash-actions {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 2rem;
    display: flex;
    gap: 0.75rem;
    width: 100%;
    max-width: 20rem;
}

.splash-actions .btn {
    flex: 1;
}

.splash-btn-primary {
    background: var(--brand-primary, #8b1a1a);
    border: 1px solid var(--brand-primary, #8b1a1a);
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    padding: 0.6rem 1rem;
}

.splash-btn-outline {
    background: transparent;
    border: 1px solid #fdf6ec;
    color: #fdf6ec;
    border-radius: 999px;
    font-weight: 600;
    padding: 0.6rem 1rem;
}

.google-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    color: var(--ink-3);
    font-size: var(--fs-meta);
}

.google-auth-divider::before,
.google-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.google-signin-slot {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    height: 48px;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-btn);
    color: var(--ink);
    font-weight: 600;
    padding: 0 1rem;
}

.google-signin-btn:disabled {
    opacity: 0.6;
}
