/* ============================================
   TRALENSO UTILITIES
   Shared utility classes used across the app.
   
   TABLE OF CONTENTS:
   1. Layout & Page Structure
   2. Grid Systems
   3. Typography & Headers
   4. Buttons
   5. Form Elements (Inputs, Textareas, Validation)
   6. Character Counter
   7. File Upload
   8. Checkboxes
   9. Categories & Icons
   10. Smart Filters
   11. Reviews & Ratings
   12. Modals
   13. UI States (Empty, Loading, Badges)
   14. Text Utilities
   15. Decorative / Borders
   16. Favorite Heart Button
   17. Tables
   18. Analytics Time Range Selector
   19. Blocking Overlay
   20. Cards
   ============================================ */

/* ============================================
   BREAKPOINT REFERENCE: max-width 1535 / 1279 / 1023 / 767 / 575px (Bootstrap 5).
   One exception: the ultra-wide min-width: 2200px in section 1.
   ============================================ */

@media (max-width: 767px) {
    :root {
        --nav-height: 5.6rem;
    }
}

/* ============================================
   1. LAYOUT & PAGE STRUCTURE
   ============================================ */
.default-page {
    display: flex;
    flex-direction: column;
    background: var(--color-background-light);
}

/* Full width: the sidebar hugs the window edge; .default-page__content caps and centers itself. Capped again above 2200px. */
.default-page__layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    width: 100%;
}

    .default-page__layout > * {
        min-width: 0;
    }

.default-page__sidebar {
    height: 100%;
    width: var(--sidebar-w);
}

.default-page__content {
    grid-column-start: 2;
    min-width: 0;
    margin: 0 auto;
    max-width: var(--page-max-width);
    padding-top: var(--nav-height);
    padding-bottom: var(--page-bottom-gap);
    padding-left: 2rem;
    padding-right: 2rem;
    width: 100%;
}

.default-page__content_banner {
    grid-column-start: 2;
    min-width: 0;
    margin: 0 auto;
    max-width: var(--page-max-width);
    padding-top: 2rem;
    padding-bottom: var(--page-bottom-gap);
    padding-left: 2rem;
    padding-right: 2rem;
    width: 100%;
}

.default-page__content_tab {
    margin: 0 auto;
    max-width: var(--page-max-width);
    padding-left: 4rem;
    padding-right: 4rem;
    width: 100%;
    /* Nothing inside may make the page wider than the screen. `clip`, not `hidden`, so the sticky tabs, map and card still work. */
    overflow-x: clip;
}

.default-page__content_tab-sidebar {
    margin: 0 auto;
    max-width: var(--page-max-width);
    padding-left: 0rem;
    padding-right: 0rem;
    width: 100%;
}

.default_page-content-height {
    margin-top: 3rem;
}

/* The content column on every sidebar page (MyLibrary, Profile, GuideCreate) and the
   whole column on sidebar-less ones (GuideViewer). Always a sibling of
   .default-page__sidebar, never an ancestor — which is exactly why the bottom gap
   belongs here rather than on .default-page. */
.default-home {
    padding-top: var(--nav-height);
    padding-bottom: var(--page-bottom-gap);
}

.default-home__content {
    grid-column-start: 2;
    min-width: 0;
    margin: 0 auto;
    max-width: var(--page-max-width);
    padding-top: var(--nav-height);
    padding-left: 2rem;
    padding-right: 2rem;
    width: 100%;
}

@media (max-width: 1535px) {
    .default-page__content_banner {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    .default-page__content {
        padding-left: 4rem;
        padding-right: 4rem;
    }


    .default-page__content_tab {
        padding-left: 0rem;
        padding-right: 0rem;
    }
}

/* ULTRA-WIDE (the only min-width query): above 2200px the whole layout re-centers.
   Not 1670 (--page-max-width), which would catch every 1920px monitor. */
@media (min-width: 2200px) {
    .default-page__layout {
        max-width: var(--page-max-width);
        margin: 0 auto;
    }
}

@media (max-width: 1279px) {    
}

/* Sidebar collapse — tablet and below */
@media (max-width: 1023px) {
    /* No bottom padding here (bottom-nav clearance is handled once, in the 767px block). */
    .default-page__layout {
        grid-template-columns: var(--sidebar-w-collapsed) 1fr;
    }

    .default-page__sidebar {
        width: var(--sidebar-w-collapsed);
    }

    .default-page__content {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .default-page__content_banner {
        padding-top: 1.5rem;
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .default_page-content-height {
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    /* Bottom-nav clearance, once, on the page wrapper. ⚠️ Only when no footer follows (the app, _noFooterPrefixes);
       otherwise the footer carries it (see Footer.css). */
    .app-body--no-footer {
        padding-bottom: var(--bottom-nav-clearance);
    }

    .default-page__layout {
        grid-template-columns: 1fr;
    }

    .default-page__sidebar {
        display: none;
    }

    .default-page__content {
        grid-column-start: 1;
    }

    .default_page-content-height {
        margin-top: 1.5rem;
    }

    .default-home__content {
        padding-top: 0rem;
    }
}


/* ============================================
   2. GRID SYSTEMS
   ============================================ */

.column-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.column-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.column-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.column-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}


/* ============================================
   3. TYPOGRAPHY & HEADERS
   Fluid sizes (clamp, 375px → 1920px) instead of breakpoint steps. Mobile floors are at least 11.5px for readability.
   ⚠️ Need a different size on one page? Override it in that page's stylesheet, not with a global breakpoint here.
   ============================================ */

.tralenso-guide-header-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 1.6rem;
    margin-bottom: 1rem;
}

.tralenso-content__header {
    display: flex;
    flex-direction: column;
}

/* ── Shared wrapping for all header classes ── */
.tralenso-header__title,
.tralenso-header__title-2,
.tralenso-header__sub-title,
.tralenso-header__sub-title-2,
.tralenso-header__sub-title-3,
.tralenso-header__description,
.tralenso-header__description-2,
.tralenso-header__sub-description {
    overflow-wrap: break-word;
}

/* Titles */
.tralenso-header__title {
    color: var(--color-dark-text);
    font-size: clamp(1.4rem, 1.25rem + 0.39vw, 2rem);
    font-weight: 600;
    line-height: 1.25;
    text-wrap: balance;
}

.tralenso-header__title-2 {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    align-items: center;
    color: var(--color-dark-text);
    font-size: clamp(1.05rem, 1.09rem + 0.42vw, 1.7rem);
    font-weight: 500;
    line-height: 1.3;
}

/* Sub-Titles */
.tralenso-header__sub-title {
    color: var(--color-dark-text);
    font-size: clamp(1.25rem, 1.1rem + 0.29vw, 1.6rem);
    font-weight: 500;
    line-height: 1.35;
}

.tralenso-header__sub-title-2 {
    color: var(--color-dark-text);
    font-size: clamp(1.3rem, 1.18rem + 0.32vw, 1.8rem);
    font-weight: 500;
    align-self: center;
    margin-right: clamp(0.5rem, 1vw, 1rem);
    line-height: 1.35;
    margin-bottom: 0;
}

.tralenso-header__sub-title-3 {
    color: var(--color-dark-text);
    font-size: clamp(1.15rem, 1.09rem + 0.16vw, 1.4rem);
    font-weight: 500;
    align-self: center;
    margin-right: clamp(1rem, 2vw, 2rem);
    line-height: 1.35;
    margin-bottom: 0;
}

/* Descriptions */
.tralenso-header__description {
    color: var(--color-gray-text);
    font-size: clamp(1.25rem, 1.17rem + 0.23vw, 1.6rem);
    font-weight: 300;
    line-height: 1.55;
}

.tralenso-header__description-2 {
    color: var(--color-gray-text);
    font-size: clamp(1.2rem, 1.19rem + 0.16vw, 1.4rem);
    font-weight: 300;
    line-height: 1.55;
}

.tralenso-header__sub-description {
    color: var(--color-gray-text);
    font-size: clamp(1.2rem, 1.15rem + 0.13vw, 1.4rem);
    font-weight: 300;
    line-height: 1.5;
}

/* Note: these classes don't use variables.css's --fs-* tokens (a separate scale, on purpose for now). */

@media (max-width: 767px) {
    /* Smaller gap on phones. */
    .tralenso-guide-header-content {
        gap: 0.6rem;
    }
}

/* ============================================
   4. BUTTONS

   Interaction model (same as the nav bars):
     • hover is pointer-gated so a tap can't leave a button stuck highlighted
     • :active carries the feedback that touch actually gets — a scale-down press
     • gradients brighten with filter, they never get swapped for a flat colour
     • only transform / filter / colour animate, so nothing reflows mid-transition
   ============================================ */

/* Shared by every button here (add new variants to these lists). :focus-visible, so mouse clicks show no ring. */
.tralenso-primary-btn,
.tralenso-primary-btn-sm,
.tralenso-secondary-btn,
.tralenso-secondary-btn-sm,
.tralenso-remove-btn,
.tralenso-remove-btn-sm,
.btn-icon-primary,
.btn-icon-primary-m,
.btn-icon-primary-sm,
.btn-icon-trash,
.btn-icon-trash-m,
.btn-icon-trash-sm {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

    .tralenso-primary-btn:focus-visible,
    .tralenso-primary-btn-sm:focus-visible,
    .tralenso-secondary-btn:focus-visible,
    .tralenso-secondary-btn-sm:focus-visible,
    .tralenso-remove-btn:focus-visible,
    .tralenso-remove-btn-sm:focus-visible,
    .btn-icon-primary:focus-visible,
    .btn-icon-primary-m:focus-visible,
    .btn-icon-primary-sm:focus-visible,
    .btn-icon-trash:focus-visible,
    .btn-icon-trash-m:focus-visible,
    .btn-icon-trash-sm:focus-visible {
        outline: 0.2rem solid var(--color-primary);
        outline-offset: 0.2rem;
    }

/* Primary Buttons */
.tralenso-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 99rem;
    font-size: 1.4rem;
    gap: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 0.2rem 0.6rem rgba(255, 149, 0, 0.25);
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

    .tralenso-primary-btn:active {
        transform: scale(0.96);
        box-shadow: 0 0.1rem 0.3rem rgba(255, 149, 0, 0.2);
    }

.tralenso-primary-btn-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 99rem;
    font-size: 1.2rem;
    gap: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 0.15rem 0.4rem rgba(255, 149, 0, 0.22);
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

    .tralenso-primary-btn-sm:active {
        transform: scale(0.95);
        box-shadow: 0 0.1rem 0.2rem rgba(255, 149, 0, 0.18);
    }

@media (hover: hover) and (pointer: fine) {
    /* Brighten with filter (keeps the gradient and animates smoothly); never swap the background. */
    .tralenso-primary-btn:hover,
    .tralenso-primary-btn-sm:hover {
        filter: brightness(1.08);
        color: white;
        transform: translateY(-0.1rem);
    }

    .tralenso-primary-btn:hover {
        box-shadow: 0 0.4rem 1.2rem rgba(255, 149, 0, 0.32);
    }

    .tralenso-primary-btn-sm:hover {
        box-shadow: 0 0.3rem 0.8rem rgba(255, 149, 0, 0.28);
    }
}

/* Cancel Buttons */
.tralenso-secondary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    background: transparent;
    color: var(--color-dark-gray-text);
    border: 0.1rem solid rgba(0, 0, 0, 0.14);
    border-radius: 99rem;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

    .tralenso-secondary-btn:active {
        background: rgba(0, 0, 0, 0.06);
        transform: scale(0.96);
    }

.tralenso-secondary-btn-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.2rem;
    background: transparent;
    color: var(--color-dark-gray-text);
    border: 0.1rem solid rgba(0, 0, 0, 0.14);
    border-radius: 99rem;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

    .tralenso-secondary-btn-sm:active {
        background: rgba(0, 0, 0, 0.06);
        transform: scale(0.95);
    }

@media (hover: hover) and (pointer: fine) {
    /* A translucent tint (the page background color would be invisible). */
    .tralenso-secondary-btn:hover,
    .tralenso-secondary-btn-sm:hover {
        background: rgba(0, 0, 0, 0.04);
        color: var(--color-dark-text);
        border-color: rgba(0, 0, 0, 0.24);
    }
}

/* Destructive Buttons */
.tralenso-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    background: transparent;
    color: var(--color-danger);
    border: 0.1rem solid rgba(239, 68, 68, 0.45);
    border-radius: 99rem;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

    .tralenso-remove-btn:active {
        background: rgba(239, 68, 68, 0.14);
        transform: scale(0.96);
    }

.tralenso-remove-btn-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.2rem;
    background: transparent;
    color: var(--color-danger);
    border: 0.1rem solid rgba(239, 68, 68, 0.45);
    border-radius: 99rem;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

    .tralenso-remove-btn-sm:active {
        background: rgba(239, 68, 68, 0.14);
        transform: scale(0.95);
    }

@media (hover: hover) and (pointer: fine) {
    /* A translucent tint, so it works on any background. */
    .tralenso-remove-btn:hover,
    .tralenso-remove-btn-sm:hover {
        background: rgba(239, 68, 68, 0.09);
        color: var(--color-dark-red);
        border-color: var(--color-danger);
    }
}

/* ── Icon buttons ── (round; grouped by size, only padding and glyph size differ) */

.btn-icon-primary,
.btn-icon-primary-m,
.btn-icon-primary-sm,
.btn-icon-trash,
.btn-icon-trash-m,
.btn-icon-trash-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

    /* A deeper press (0.9), since they're small. */
    .btn-icon-primary:active,
    .btn-icon-primary-m:active,
    .btn-icon-primary-sm:active,
    .btn-icon-trash:active,
    .btn-icon-trash-m:active,
    .btn-icon-trash-sm:active {
        transform: scale(0.9);
    }

@media (hover: hover) and (pointer: fine) {
    .btn-icon-primary:hover,
    .btn-icon-primary-m:hover,
    .btn-icon-primary-sm:hover,
    .btn-icon-trash:hover,
    .btn-icon-trash-m:hover,
    .btn-icon-trash-sm:hover {
        filter: brightness(1.1);
        transform: translateY(-0.1rem);
    }

    .btn-icon-primary:hover,
    .btn-icon-primary-m:hover,
    .btn-icon-primary-sm:hover {
        box-shadow: 0 0.3rem 0.8rem rgba(255, 149, 0, 0.3);
    }

    .btn-icon-trash:hover,
    .btn-icon-trash-m:hover,
    .btn-icon-trash-sm:hover {
        box-shadow: 0 0.3rem 0.8rem rgba(204, 33, 38, 0.3);
    }
}

/* Icon glyphs, one rule per size. */
.btn-icon-primary img,
.btn-icon-trash img {
    width: 2rem;
    height: 2rem;
    filter: brightness(0) invert(1);
}

.btn-icon-primary-m img,
.btn-icon-trash-m img {
    width: 2rem;
    height: 2rem;
    filter: brightness(0) invert(1);
}

.btn-icon-primary-sm img,
.btn-icon-trash-sm img {
    width: 1.6rem;
    height: 1.6rem;
    filter: brightness(0) invert(1);
}

.btn-icon-primary {
    padding: 0.6rem;
    background: var(--gradient-primary);
    box-shadow: 0 0.15rem 0.4rem rgba(255, 149, 0, 0.22);
}

.btn-icon-primary-m {
    padding: 0.6rem;
    background: var(--gradient-primary);
    box-shadow: 0 0.15rem 0.4rem rgba(255, 149, 0, 0.22);
}

.btn-icon-primary-sm {
    padding: 0.5rem;
    background: var(--gradient-primary);
    box-shadow: 0 0.15rem 0.4rem rgba(255, 149, 0, 0.22);
}

/* Destructive icon buttons (could become a --gradient-danger token). */
.btn-icon-trash {
    padding: 0.6rem;
    background: linear-gradient(180deg, #CC2126 0%, #a30000 100%);
    box-shadow: 0 0.15rem 0.4rem rgba(204, 33, 38, 0.22);
}

.btn-icon-trash-m {
    padding: 0.6rem;
    background: linear-gradient(180deg, #CC2126 0%, #a30000 100%);
    box-shadow: 0 0.15rem 0.4rem rgba(204, 33, 38, 0.22);
}

.btn-icon-trash-sm {
    padding: 0.5rem;
    background: linear-gradient(180deg, #CC2126 0%, #a30000 100%);
    box-shadow: 0 0.15rem 0.4rem rgba(204, 33, 38, 0.22);
}

    /* Disabled state for every button. */
    .tralenso-primary-btn:disabled,
    .tralenso-primary-btn-sm:disabled,
    .tralenso-secondary-btn:disabled,
    .tralenso-secondary-btn-sm:disabled,
    .tralenso-remove-btn:disabled,
    .tralenso-remove-btn-sm:disabled,
    .btn-icon-primary:disabled,
    .btn-icon-primary-m:disabled,
    .btn-icon-primary-sm:disabled,
    .btn-icon-trash:disabled,
    .btn-icon-trash-m:disabled,
    .btn-icon-trash-sm:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        pointer-events: none;
        box-shadow: none;
        transform: none;
        filter: none;
    }

.tralenso-btn-look-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* Reduced motion: colors and shadows still change, but nothing moves. */
@media (prefers-reduced-motion: reduce) {
    .tralenso-primary-btn,
    .tralenso-primary-btn-sm,
    .tralenso-secondary-btn,
    .tralenso-secondary-btn-sm,
    .tralenso-remove-btn,
    .tralenso-remove-btn-sm,
    .btn-icon-primary,
    .btn-icon-primary-m,
    .btn-icon-primary-sm,
    .btn-icon-trash,
    .btn-icon-trash-m,
    .btn-icon-trash-sm {
        transition-duration: 0.01ms;
    }

        .tralenso-primary-btn:hover,
        .tralenso-primary-btn-sm:hover,
        .tralenso-primary-btn:active,
        .tralenso-primary-btn-sm:active,
        .tralenso-secondary-btn:active,
        .tralenso-secondary-btn-sm:active,
        .tralenso-remove-btn:active,
        .tralenso-remove-btn-sm:active,
        .btn-icon-primary:hover,
        .btn-icon-primary-m:hover,
        .btn-icon-primary-sm:hover,
        .btn-icon-trash:hover,
        .btn-icon-trash-m:hover,
        .btn-icon-trash-sm:hover,
        .btn-icon-primary:active,
        .btn-icon-primary-m:active,
        .btn-icon-primary-sm:active,
        .btn-icon-trash:active,
        .btn-icon-trash-m:active,
        .btn-icon-trash-sm:active {
            transform: none;
        }
}

@media (max-width: 1535px) {
    .tralenso-primary-btn,
    .tralenso-secondary-btn,
    .tralenso-remove-btn {
        padding: 0.7rem 1.4rem;
        font-size: 1.3rem;
    }

    .tralenso-primary-btn-sm,
    .tralenso-secondary-btn-sm,
    .tralenso-remove-btn-sm {
        padding: 0.45rem 1rem;
        font-size: 1.15rem;
    }

    .btn-icon-primary,
    .btn-icon-trash {
        padding: 0.5rem;
    }

        .btn-icon-primary img,
        .btn-icon-trash img {
            width: 2rem;
            height: 2rem;
        }
}

@media (max-width: 1279px) {
}

@media (max-width: 1023px) {
}

@media (max-width: 767px) {
    .tralenso-primary-btn,
    .tralenso-secondary-btn,
    .tralenso-remove-btn {
        padding: 0.65rem 1.2rem;
        font-size: 1.35rem;
        height: 3.6rem;
    }

    .tralenso-primary-btn-sm,
    .tralenso-secondary-btn-sm,
    .tralenso-remove-btn-sm {
        padding: 0.6rem 0.8rem;
        font-size: 1.2rem;
        height: 3rem;
    }

    .btn-icon-primary-m img,
    .btn-icon-trash-m img {
        width: 1.8rem;
        height: 1.8rem;
    }
}

@media (max-width: 575px) {
    .tralenso-primary-btn,
    .tralenso-secondary-btn,
    .tralenso-remove-btn {
        padding: 0.5rem 1.2rem;
        font-size: 1.25rem;
    }

    .tralenso-primary-btn-sm,
    .tralenso-secondary-btn-sm,
    .tralenso-remove-btn-sm {
        padding: 0.6rem 0.8rem;
        font-size: 1rem;
    }

    .btn-icon-primary,
    .btn-icon-trash {
        padding: 0.4rem;
    }

        .btn-icon-primary img,
        .btn-icon-trash img {
            width: 1.6rem;
            height: 1.6rem;
        }
}

/* ============================================
   5. FORM ELEMENTS

   Resting state is quiet (hairline border, no glow); focus is the only thing that
   lights up. Same interaction rules as the buttons: named transition properties,
   pointer-gated hover, nothing that changes layout.
   ============================================ */

/* Input Fields */
.tralenso-input-field {
    min-height: 3.5rem;
    border-radius: 0.8rem;
    border: 0.1rem solid rgba(0, 0, 0, 0.14);
    padding: 0.5rem 1rem;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--color-dark-text);
    width: 100%;
    background: white;
    caret-color: var(--color-primary);
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .tralenso-input-field:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 0.3rem rgba(255, 149, 0, 0.15);
    }

    .tralenso-input-field:disabled {
        background-color: var(--color-bg-secondary);
        color: var(--color-gray-text);
        border-color: rgba(0, 0, 0, 0.08);
        cursor: not-allowed;
    }

    .tralenso-input-field::placeholder {
        color: var(--color-gray-text);
        font-weight: 400;
    }

@media (hover: hover) and (pointer: fine) {
    /* Pointer-gated; never on a focused field (it would replace the orange border). */
    .tralenso-input-field:hover:not(:disabled):not(:focus) {
        border-color: rgba(0, 0, 0, 0.28);
    }
}

.tralenso-input-field-title {
    font-size: 1.2rem;
    color: var(--color-dark-gray-text);
    font-weight: 500;
}

.tralenso-input-field-left-title {
    color: var(--color-gray-text);
    font-size: 1.6rem;
    font-weight: 400;
}

.tralenso-input-field--readonly {
    background-color: var(--color-bg-secondary);
    color: var(--color-dark-gray-text);
    border-color: rgba(0, 0, 0, 0.08);
    cursor: not-allowed;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Textarea */
.tralenso__textarea {
    border-radius: 0.8rem;
    border: 0.1rem solid rgba(0, 0, 0, 0.14);
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-dark-text);
    width: 100%;
    background: white;
    resize: vertical;
    min-height: 12rem;
    caret-color: var(--color-primary);
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .tralenso__textarea:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 0.3rem rgba(255, 149, 0, 0.15);
    }

    .tralenso__textarea:disabled {
        background-color: var(--color-bg-secondary);
        color: var(--color-gray-text);
        border-color: rgba(0, 0, 0, 0.08);
        cursor: not-allowed;
    }

    .tralenso__textarea::placeholder {
        color: var(--color-gray-text);
        font-weight: 400;
    }

@media (hover: hover) and (pointer: fine) {
    .tralenso__textarea:hover:not(:disabled):not(:focus) {
        border-color: rgba(0, 0, 0, 0.28);
    }
}

/* Validation States */
.tralenso-input-field.invalid,
.tralenso__textarea.invalid {
    border-color: var(--color-danger) !important;
}

    /* The focus ring stays red on an invalid field. */
    .tralenso-input-field.invalid:focus,
    .tralenso__textarea.invalid:focus {
        box-shadow: 0 0 0 0.3rem rgba(239, 68, 68, 0.15);
    }

.tralenso-input-wrapper {
    position: relative;
}

.tralenso-validation-error {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.2rem;
    color: var(--color-danger);
    margin-top: 0.3rem;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
    /* Appears: slides down a little and fades in (created by an @if, so it plays only when it shows up). */
    animation: tralensoErrorIn var(--motion-base) var(--ease-out) backwards;
}

@keyframes tralensoErrorIn {
    from {
        opacity: 0;
        transform: translateY(-0.4rem);
    }
}

    .tralenso-validation-error::before {
        content: "\F431";
        font-family: "bootstrap-icons";
        font-size: 1.2rem;
        speak: none;
    }

/* Input Status Icons */
.tralenso-input-status {
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    font-size: 1.6rem;
    pointer-events: none;
}

.tralenso-input-status--success {
    color: var(--color-success);
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

@media (prefers-reduced-motion: reduce) {
    .tralenso-input-field,
    .tralenso__textarea {
        transition-duration: 0.01ms;
    }
}

@media (max-width: 1535px) {
    .tralenso__textarea {
        font-size: 1.4rem;
    }

    .tralenso-input-field {
        min-height: 3.6rem;
        font-size: 1.3rem;
    }

    .tralenso-input-field-left-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 1279px) {
}

@media (max-width: 1023px) {
    /* Font size on touch screens: see "No zoom on focus" at the end of this section. */
    .tralenso__textarea {
        font-size: 1.3rem;
    }

    .tralenso-input-field {
        padding: 0.8rem 1.2rem;
    }
}

@media (max-width: 767px) {
    /* A shorter field on phones (full-width fields are easy to hit); checkboxes and icon buttons keep their size. */
    .tralenso-input-field {
        min-height: 3.6rem;
        padding: 0.2rem 1rem;
    }
}

@media (max-width: 575px) {
    .tralenso-input-field-left-title {
        color: var(--color-gray-text);
        font-size: 1.3rem;
        font-weight: 400;
    }
}

/* No zoom on focus: iOS Safari zooms into any field under 16px (1.6rem) when it's tapped, and stays zoomed in.
   Every text field, search box, dropdown and textarea gets 1.6rem on touch screens (phones and tablets).
   ⚠️ !important on purpose: it must win over every component's own font-size, including ones added later.
   Computers (a mouse or trackpad) keep each field's own size; they never zoom on focus. */
@media (pointer: coarse) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="color"]),
    select,
    textarea {
        font-size: 1.6rem !important;
    }
}


/* ============================================
   6. CHARACTER COUNTER
   ============================================ */

.tralenso-char-counter {
    font-size: 1.2rem;
    color: var(--color-gray-text);
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}

.tralenso-char-counter--warning {
    color: var(--color-warning);
}

.tralenso-char-counter--limit {
    color: var(--color-danger);
    font-weight: 500;
}

.tralenso-char-counter--hidden {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .tralenso-char-counter {
        transition-duration: 0.01ms;
    }
}


/* ============================================
   7. FILE UPLOAD
   ============================================ */

/* Hidden but still rendered, so Safari opens the picker from a <label> and the keyboard can reach it */
.tralenso-upload-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tralenso-upload-label {
    display: inline-block;
    background: var(--gradient-primary);
    color: #fff;
    padding: 0.4rem 1.2rem;
    border-radius: 99rem;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    width: fit-content;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    box-shadow: 0 0.15rem 0.4rem rgba(255, 149, 0, 0.22);
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

    .tralenso-upload-label:active {
        transform: scale(0.96);
        box-shadow: 0 0.1rem 0.2rem rgba(255, 149, 0, 0.18);
    }

@media (hover: hover) and (pointer: fine) {
    .tralenso-upload-label:hover {
        filter: brightness(1.08);
        color: #fff;
        transform: translateY(-0.1rem);
        box-shadow: 0 0.3rem 0.8rem rgba(255, 149, 0, 0.28);
    }
}

.tralenso-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    /* The real file input is hidden, so the focus ring goes on the visible label. */
    .tralenso-upload-wrapper:focus-within .tralenso-upload-label {
        outline: 0.2rem solid var(--color-primary);
        outline-offset: 0.2rem;
    }

.file-name {
    font-size: 1.2rem;
    color: var(--color-gray-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .tralenso-upload-label {
        transition-duration: 0.01ms;
    }

        .tralenso-upload-label:hover,
        .tralenso-upload-label:active {
            transform: none;
        }
}

/* ============================================
   8. CHECKBOXES
   ============================================ */

.tralenso-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.tralenso-checkbox-label {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tralenso-default-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1.9rem;
    height: 1.9rem;
    flex-shrink: 0;
    border: 0.1rem solid rgba(0, 0, 0, 0.22);
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    position: relative;
    display: inline-block;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

    /* The tick is drawn (two borders on a rotated box), not a "✓" character, so it looks the same on every platform. */
    .tralenso-default-checkbox::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 0.45rem;
        height: 0.9rem;
        border: solid white;
        border-width: 0 0.2rem 0.2rem 0;
        transform: translate(-50%, -55%) rotate(45deg) scale(0);
        transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .tralenso-default-checkbox:checked {
        background: var(--color-primary);
        border-color: var(--color-primary);
    }

        /* A slight overshoot, so ticking feels like a snap. */
        .tralenso-default-checkbox:checked::after {
            transform: translate(-50%, -55%) rotate(45deg) scale(1);
        }

    .tralenso-default-checkbox:active:not(:disabled) {
        transform: scale(0.9);
    }

    .tralenso-default-checkbox:focus-visible {
        outline: none;
        box-shadow: 0 0 0 0.3rem rgba(255, 149, 0, 0.25);
    }

    .tralenso-default-checkbox:disabled {
        background: var(--color-bg-secondary);
        border-color: rgba(0, 0, 0, 0.1);
        cursor: not-allowed;
    }

        .tralenso-default-checkbox:disabled:checked {
            background: var(--color-gray-text);
            border-color: var(--color-gray-text);
        }

@media (hover: hover) and (pointer: fine) {
    .tralenso-default-checkbox:hover:not(:disabled):not(:checked) {
        border-color: var(--color-primary);
        background: var(--color-primary-extra-light);
    }

    .tralenso-default-checkbox:hover:not(:disabled):checked {
        filter: brightness(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tralenso-default-checkbox,
    .tralenso-default-checkbox::after {
        transition-duration: 0.01ms;
    }

        .tralenso-default-checkbox:active:not(:disabled) {
            transform: none;
        }
}

@media (max-width: 1535px) {
}

@media (max-width: 1279px) {
    .tralenso-checkbox-label {
        font-size: 1.5rem;
    }
}

@media (max-width: 1023px) {
}

@media (max-width: 767px) {
    .tralenso-checkbox-label {
        font-size: 1.4rem;
    }

    /* The box doesn't shrink with the label on touch (it's the tap target). */
    .tralenso-default-checkbox {
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 575px) {
    .tralenso-checkbox-label {
        font-size: 1.3rem;
    }
}

/* ============================================
   9. CATEGORIES & ICONS
   ============================================ */

.traLenso-category-icon {
    width: 4rem;
    height: 4rem;
    background-color: currentColor;
    color: var(--color-gray-text);
    mask-image: var(--icon-url);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: var(--icon-url);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: background-color 0.2s ease;
}

.category-btn .traLenso-category-icon {
    background-color: var(--color-gray-text);
}

/* Selected: the same orange as the tile's text (CategoryFilter.css). */
.category-btn.active .traLenso-category-icon {
    background-color: #A34F00;
}

@media (hover: hover) and (pointer: fine) {
    /* :not(.active), so hovering the selected tile keeps its orange icon. */
    .category-btn:not(.active):hover .traLenso-category-icon {
        background-color: var(--color-dark-text);
    }
}

/* Circle Icon with colored background */
.category-icon-circle {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 0.1rem solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0.1rem 0.4rem rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

    .category-icon-circle img,
    .category-icon-circle svg {
        width: 65%;
        height: 65%;
        filter: brightness(0) invert(1); /* Makes the icon white */
    }

        /* ── Per-icon optical nudges (some SVGs have uneven padding) ──
   ⚠️ EVERY selector in a comma list needs its own .category-icon-circle prefix:
   without it, that selector matches those images across the whole site. */

        .category-icon-circle img[src*="vegan-friendly"] {
            margin-bottom: -0.1rem;
        }

        .category-icon-circle img[src*="nature-explorer"],
        .category-icon-circle img[src*="food-enthusiast"],
        .category-icon-circle img[src*="urban-explorer"],
        .category-icon-circle img[src*="coastal-chaser"] {
            margin-bottom: 0.2rem;
        }

        .category-icon-circle img[src*="budget-traveler"] {
            margin-left: 0.2rem;
        }

        .category-icon-circle img[src*="trail-seeker"] {
            margin-left: 0.3rem;
        }

/* Small variant for ActivityCards */
.category-icon-circle--sm {
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    flex-shrink: 0;
}

    .category-icon-circle--sm img,
    .category-icon-circle--sm svg {
        width: 65%;
        height: 65%;
        filter: brightness(0) invert(1); /* Makes the icon white */
    }

        /* Same nudges, same rule: the class prefix repeats on every line. */
        .category-icon-circle--sm img[src*="vegan-friendly"] {
            margin-bottom: -0.1rem;
        }

        .category-icon-circle--sm img[src*="nature-explorer"],
        .category-icon-circle--sm img[src*="food-enthusiast"],
        .category-icon-circle--sm img[src*="urban-explorer"],
        .category-icon-circle--sm img[src*="coastal-chaser"] {
            margin-bottom: 0.2rem;
        }

        .category-icon-circle--sm img[src*="budget-traveler"] {
            margin-left: 0.2rem;
        }

        .category-icon-circle--sm img[src*="trail-seeker"] {
            margin-left: 0.3rem;
        }

/* Category Icon Responsive Scaling */
@media (max-width: 1535px) {
    .category-icon-circle {
        width: 4.6rem;
        height: 4.6rem;
    }

    .category-icon-circle--sm {
        width: 3.2rem;
        height: 3.2rem;
    }
}

@media (max-width: 1023px) {
    .category-icon-circle {
        width: 4.2rem;
        height: 4.2rem;
    }

    .category-icon-circle--sm {
        width: 3.2rem;
        height: 3.2rem;
    }
}

@media (max-width: 575px) {
    .category-icon-circle {
        width: 3.6rem;
        height: 3.6rem;
    }

    .category-icon-circle--sm {
        width: 2.6rem;
        height: 2.6rem;
    }
}

/* ============================================
   10. SMART FILTERS
   ============================================ */

.smart-filter-icon {
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

    .smart-filter-icon img {
        padding-left: 0.1rem;
        padding-bottom: 0.1rem;
        width: 2.2rem;
        height: 2.2rem;
        filter: brightness(0) invert(1);
    }

    .smart-filter-icon.gold {
        background: linear-gradient(135deg, #FFD700, #dd8f00);
        box-shadow: 0 0.2rem 0.6rem rgba(255, 215, 0, 0.35);
    }

    .smart-filter-icon.silver {
        background: linear-gradient(135deg, #C0C0C0, #8d8d8d);
        box-shadow: 0 0.2rem 0.6rem rgba(192, 192, 192, 0.35);
    }

    .smart-filter-icon.bronze {
        background: linear-gradient(135deg, #CD7F32, #9b622d);
        box-shadow: 0 0.2rem 0.6rem rgba(205, 127, 50, 0.35);
    }

.smart-filter-title {
    font-weight: 600;
}

.smart-filter-count {
    font-size: 1.4rem;
    color: var(--color-gray-text);
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    .smart-filter-icon,
    .traLenso-category-icon {
        transition-duration: 0.01ms;
    }
}

@media (max-width: 1023px) {
    .smart-filter-icon {
        width: 3.4rem;
        height: 3.4rem;
    }

        .smart-filter-icon img {
            width: 2rem;
            height: 2rem;
        }
}

@media (max-width: 767px) {
}

@media (max-width: 575px) {
    .smart-filter-icon {
        width: 3rem;
        height: 3rem;
    }

        .smart-filter-icon img {
            padding-left: 0rem;
            width: 1.8rem;
            height: 1.8rem;
        }
}

/* ============================================
   11. REVIEWS & RATINGS
   ============================================ */

.star-rating {
    display: flex;
    align-items: center;
    font-size: 2rem;
    gap: 0.3rem;
    user-select: none;
}

.star-gradient {
    background: var(--gradient-star);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.star-rating-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #fbbf24;
    color: color-mix(in srgb, var(--color-warning) 85%, white);
    margin-right: 0.3rem;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

@media (max-width: 1023px) {
    .star-rating {
        font-size: 1.7rem;
    }

    .star-rating-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 575px) {
    .star-rating {
        font-size: 1.5rem;
    }

    .star-rating-value {
        font-size: 1.35rem;
    }
}
/* ============================================
   12. MODALS
   ============================================ */

.tralenso-close-modal-icon {
    position: absolute;
    top: 0;
    right: -3rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-red);
    border: none;
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease, filter 0.2s ease, transform 0.15s ease;
}

    .tralenso-close-modal-icon:active {
        transform: scale(0.9);
    }

    .tralenso-close-modal-icon:focus-visible {
        outline: 0.2rem solid white;
        outline-offset: 0.2rem;
    }

@media (hover: hover) and (pointer: fine) {
    .tralenso-close-modal-icon:hover {
        opacity: 1;
        filter: brightness(1.08);
        transform: scale(1.06);
    }
}

.tralenso-close-modal-icon-cross {
    display: block;
    height: 1.4rem;
    width: 1.4rem;
}

@media (prefers-reduced-motion: reduce) {
    .tralenso-close-modal-icon {
        transition-duration: 0.01ms;
    }

        .tralenso-close-modal-icon:hover,
        .tralenso-close-modal-icon:active {
            transform: none;
        }
}

@media (max-width: 767px) {
    /* Inside the modal on phones (outside would be off-screen). The white ring separates it from the content. */
    .tralenso-close-modal-icon {
        top: 0.8rem;
        right: 0.8rem;
        width: 3.2rem;
        height: 3.2rem;
        opacity: 1;
        box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.85);
    }
}


/* ============================================
   13. UI STATES (Empty, Loading, Badges)
   ============================================ */

/* Empty State */
.tralenso-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.tralenso-empty-state--card {
    background: white;
    border-radius: 1.2rem;
    border: 0.1rem solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.04), 0 0.4rem 1.2rem rgba(0, 0, 0, 0.04);
}

/* The icon sits on a soft circle. */
.tralenso-empty-state__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 7.2rem;
    height: 7.2rem;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    font-size: 3.2rem;
    color: var(--color-gray-text);
    margin-bottom: 1.5rem;
}

.tralenso-empty-state__title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-dark-text);
    margin-bottom: 0.5rem;
}

.tralenso-empty-state__description {
    font-size: 1.4rem;
    color: var(--color-gray-text);
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

/* The next step under the text (EmptyState's buttons and links): side by side, wrapping on phones. */
.tralenso-empty-state__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* The heart is the one icon where colour means something: it's the favourite symbol. */
.tralenso-empty-state__icon .bi-heart {
    color: #f87171;
}

/* Loading State */
.tralenso-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--color-gray-text);
}

    .tralenso-loading-state p {
        margin-top: 1rem;
        font-size: 1.4rem;
    }

/* Status Badges
   Colours are now derived from the semantic tokens with color-mix instead of eight
   unrelated hex literals — change --color-success once and the badge follows. Same
   fallback-first pattern as .tab-navigation-wrapper: the flat hex is declared first
   for engines without color-mix (older iOS WKWebView), then overridden. */
.tralenso-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1;
    padding-block: 0.5rem;
    white-space: nowrap;
}

.tralenso-badge--success {
    background: #d1fae5;
    background: color-mix(in srgb, var(--color-success) 15%, white);
    color: #065f46;
    color: color-mix(in srgb, var(--color-success) 75%, black);
}

.tralenso-badge--warning {
    background: #fef3c7;
    background: color-mix(in srgb, var(--color-warning) 18%, white);
    color: #92400e;
    color: color-mix(in srgb, var(--color-warning) 70%, black);
}

.tralenso-badge--danger {
    background: #fee2e2;
    background: color-mix(in srgb, var(--color-danger) 15%, white);
    color: #991b1b;
    color: color-mix(in srgb, var(--color-danger) 75%, black);
}

.tralenso-badge--info {
    background: #e0f2fe;
    background: color-mix(in srgb, var(--color-info) 15%, white);
    color: #075985;
    color: color-mix(in srgb, var(--color-info) 75%, black);
}

.tralenso-badge--neutral {
    background: var(--color-bg-secondary);
    color: #4b5563;
    color: var(--color-text-secondary);
}

@media (max-width: 1535px) {
    .tralenso-badge {
        font-size: 1.1rem;
    }
}

@media (max-width: 1023px) {
    .tralenso-empty-state__icon {
        width: 5.6rem;
        height: 5.6rem;
        font-size: 2.4rem;
        margin-bottom: 0.8rem;
    }

    .tralenso-empty-state__title {
        font-size: 1.5rem;
    }

    .tralenso-empty-state__description {
        font-size: 1.2rem;
    }
}

@media (max-width: 575px) {
    .tralenso-badge {
        font-size: 1.1rem;
    }

    .tralenso-empty-state {
        padding: 3rem 1.6rem;
    }
}

/* ============================================
   14. TEXT UTILITIES
   ============================================ */

.tralenso-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================
   15. DECORATIVE / BORDERS
   ============================================ */

.tralenso-border {
    border-bottom: solid 0.1rem var(--border-gray);
    margin: 0.5rem 0;
}

/* ============================================
   16. FAVORITE HEART BUTTON

   The most-tapped control on the platform, so it gets the fullest treatment:
   a real press, a pop on favourite, and a hover that can't stick on touch.
   ============================================ */
:root {
    --fav-btn-base: 3.4rem;
    --fav-btn-icon-base: 1.6rem;
}

.favorite-heart-btn {
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: var(--fav-btn-size, var(--fav-btn-base));
    height: var(--fav-btn-size, var(--fav-btn-base));
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    backdrop-filter: blur(8px) saturate(160%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 0.1rem 0.4rem rgba(0, 0, 0, 0.12);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    z-index: 6;
}

/* Opaque where blur isn't supported — a 75% white disc with a photo bleeding
   through is worse than a flat one. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .favorite-heart-btn {
        background: rgba(255, 255, 255, 0.92);
    }
}

.favorite-heart-btn i {
    font-size: var(--fav-btn-icon-size, var(--fav-btn-icon-base));
    color: var(--color-gray-text);
    line-height: 1;
    transition: color 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Press feedback. */
.favorite-heart-btn:active {
    transform: scale(0.88);
}

.favorite-heart-btn:focus-visible {
    outline: 0.2rem solid var(--color-primary);
    outline-offset: 0.2rem;
}

.favorite-heart-btn.is-favorited i {
    color: var(--color-danger);
}

/* The "pop" when favorited (a slight overshoot): the confirmation that the tap worked. */
.favorite-heart-btn.is-favorited {
    background: rgba(255, 255, 255, 0.85);
}

    .favorite-heart-btn.is-favorited i {
        transform: scale(1.12);
    }

    /* Pressing a favourited heart squashes the icon too, so un-favouriting feels as
       physical as favouriting. */
    .favorite-heart-btn.is-favorited:active i {
        transform: scale(0.95);
    }

@media (hover: hover) and (pointer: fine) {
    /* ⚠️ Pointer-gated: on touch, a stuck hover would look like "favorited". */
    .favorite-heart-btn:hover {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.16);
        transform: scale(1.1);
    }

        /* A lighter --color-danger. */
        .favorite-heart-btn:hover i {
            color: color-mix(in srgb, var(--color-danger) 70%, white);
        }

    .favorite-heart-btn.is-favorited:hover i {
        color: color-mix(in srgb, var(--color-danger) 85%, black);
    }
}

@media (prefers-reduced-motion: reduce) {
    .favorite-heart-btn,
    .favorite-heart-btn i {
        transition-duration: 0.01ms;
    }

        .favorite-heart-btn:hover,
        .favorite-heart-btn:active {
            transform: none;
        }

        /* Colour still carries the state; only the pop is dropped. */
        .favorite-heart-btn.is-favorited i,
        .favorite-heart-btn.is-favorited:active i {
            transform: none;
        }
}

/* ⚠️ position: relative, never static: the ::before tap area would otherwise cover the whole screen (e.g. in FullActivityCardModal). */
.favorite-heart-btn--inline {
    position: relative;
    margin-left: auto;
    top: 0rem;
    flex-shrink: 0;
    background: #f1f1f1;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
}

    .favorite-heart-btn--inline.is-favorited {
        background: #f1f1f1;
    }

@media (hover: hover) and (pointer: fine) {
    .favorite-heart-btn--inline:hover {
        background: rgba(0, 0, 0, 0.05);
        box-shadow: none;
    }
}

/* A bigger invisible tap area (the button is under 44px, and a near-miss would open the card instead). */
.favorite-heart-btn::before {
    content: "";
    position: absolute;
    inset: -0.4rem;
    border-radius: 50%;
}

@media (max-width: 767px) {
    :root {
        --fav-btn-base: 3.2rem;
        --fav-btn-icon-base: 1.5rem;
    }

        /* Wider on touch (about 4.4–4.6rem of real target). */
        .favorite-heart-btn::before {
            inset: -0.6rem;
        }
}

@media (max-width: 575px) {
    :root {
        --fav-btn-base: 2.8rem;
        --fav-btn-icon-base: 1.3rem;
    }

    /* Wider on touch (about 4.4–4.6rem of real target). */
    .favorite-heart-btn::before {
        inset: -0.6rem;
    }
}

/* ============================================
   17. TABLES
   ============================================ */

.tralenso-table-container {
    background: white;
    border-radius: 1.2rem;
    border: 0.1rem solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.04), 0 0.4rem 1.2rem rgba(0, 0, 0, 0.04);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.tralenso-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.4rem;
}

    .tralenso-table thead {
        background: var(--color-bg-secondary);
    }

    .tralenso-table th {
        padding: 1.2rem 1.5rem;
        font-weight: 600;
        color: var(--color-dark-gray-text);
        font-size: 1.2rem;
        text-transform: uppercase;
        text-align: center;
        letter-spacing: 0.05rem;
        white-space: nowrap;
        position: sticky;
        top: 0;
        z-index: 1;
        background: var(--color-bg-secondary);
        border-bottom: 0.1rem solid rgba(0, 0, 0, 0.08);
    }

        .tralenso-table th:first-child {
            text-align: left;
        }

    .tralenso-table td {
        padding: 1.2rem 1.5rem;
        border-bottom: 0.1rem solid rgba(0, 0, 0, 0.06);
        color: var(--color-dark-text);
        text-align: center;
    }

        .tralenso-table td:first-child {
            text-align: left;
        }

        /* Opt-in per cell: fixed-width digits so money and counts line up. */
        .tralenso-table td.is-numeric,
        .tralenso-table th.is-numeric {
            font-variant-numeric: tabular-nums;
            text-align: right;
        }

    .tralenso-table tbody tr:last-child td {
        border-bottom: none;
    }

/* ⚠️ Row hover only on clickable rows (a hover on static rows suggests they're clickable). */
.tralenso-table__row--clickable {
    cursor: pointer;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

    .tralenso-table__row--clickable.expanded {
        background: var(--color-primary-extra-light);
    }

    .tralenso-table__row--clickable:active {
        background: var(--color-primary-light);
    }

@media (hover: hover) and (pointer: fine) {
    .tralenso-table__row--clickable:hover {
        background: var(--color-primary-extra-light);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tralenso-table__row--clickable {
        transition-duration: 0.01ms;
    }
}

@media (max-width: 767px) {
    .tralenso-table th,
    .tralenso-table td {
        padding: 1rem;
    }

    /* Cells don't wrap on phones (the table scrolls sideways instead). */
    .tralenso-table td {
        white-space: nowrap;
    }
}

@media (max-width: 575px) {
    .tralenso-table th,
    .tralenso-table td {
        padding: 0.8rem 0.6rem;
        font-size: 1.2rem;
    }
}

/* ============================================
   18. ANALYTICS TIME RANGE SELECTOR
   ============================================ */
.analytics-time-selector {
    display: flex;
    gap: 0.5rem;
    background: var(--color-bg-secondary);
    border-radius: 99rem;
    width: fit-content;
    padding: 0.4rem;
}

.analytics-time-btn {
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 99rem;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 1.3rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

    .analytics-time-btn:active:not(:disabled) {
        transform: scale(0.95);
    }

    .analytics-time-btn:focus-visible {
        outline: 0.2rem solid var(--color-primary);
        outline-offset: 0.2rem;
    }

    .analytics-time-btn.is-active {
        background: var(--gradient-primary);
        color: white;
        box-shadow: 0 0.1rem 0.3rem rgba(255, 149, 0, 0.3);
    }

    .analytics-time-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

@media (hover: hover) and (pointer: fine) {
    .analytics-time-btn:hover:not(:disabled):not(.is-active) {
        background: rgba(0, 0, 0, 0.04);
        color: var(--color-dark-text);
    }

    .analytics-time-btn.is-active:hover:not(:disabled) {
        filter: brightness(1.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    .analytics-time-btn {
        transition-duration: 0.01ms;
    }

        .analytics-time-btn:active:not(:disabled) {
            transform: none;
        }
}

/* ============================================
   19. BLOCKING OVERLAY (<BlockingOverlay />): full-screen blocker during a slow action (checkout redirect, publish).
   ⚠️ z-index 9998: above every modal, below toasts (10000) and the legal gate (10010). See the ladder in CookieBanner.css.
   ============================================ */
.blocking-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

/* A darker background where blur isn't supported. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .blocking-overlay {
        background-color: rgba(0, 0, 0, 0.6);
    }
}

@keyframes blockingOverlayFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.blocking-overlay__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 2rem 2.5rem;
    background: white;
    border-radius: 1.6rem;
    box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.12), 0 0.8rem 3rem rgba(0, 0, 0, 0.22);
    animation: blockingOverlayRise 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes blockingOverlayRise {
    from {
        opacity: 0;
        transform: translateY(0.8rem) scale(0.98);
    }

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

.blocking-overlay__content .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--color-primary);
}

.blocking-overlay__text {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-dark-text);
    text-align: center;
}

/* The spinner itself keeps turning — it's the only signal that the app hasn't frozen,
   so suppressing it would be worse than the motion it causes. Only the entrance
   animations are dropped. */
@media (prefers-reduced-motion: reduce) {
    .blocking-overlay,
    .blocking-overlay__content {
        animation: none;
    }
}

/* ============================================
   20. CARDS: the generic white card (same family as .tralenso-empty-state--card and .tralenso-table-container).
   ⚠️ Lives here because `tralenso-` means global; never define it in a feature stylesheet.
   ============================================ */

.tralenso-card {
    background: white;
    border: 0.1rem solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.04), 0 0.4rem 1.2rem rgba(0, 0, 0, 0.04);
    border-radius: 1.2rem;
    padding: 2rem;
}

.tralenso-card__title {
    font-size: 1.6rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark-text);
    margin: 0 0 1.6rem 0;
    line-height: 1.3;
}

/* A card with a full-bleed list or grid (the rows have their own padding, so the card adds none). Used by the admin moderation screens. */
.tralenso-card--flush {
    padding: 0;
    overflow: hidden;
}

    .tralenso-card--flush .tralenso-card__title {
        padding: 2rem 2rem 0 2rem;
    }

/* Stacks cards with a gap. Uses `* + *` (not a margin on the card), so there's no trailing margin after the last one. */
.tralenso-card-stack > * + * {
    margin-top: 2rem;
}

@media (max-width: 767px) {
    .tralenso-card {
        padding: 1.6rem;
        border-radius: 1rem;
    }

    .tralenso-card__title {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
    }

    .tralenso-card--flush {
        padding: 0;
    }

        .tralenso-card--flush .tralenso-card__title {
            padding: 1.6rem 1.6rem 0 1.6rem;
        }

    .tralenso-card-stack > * + * {
        margin-top: 1.6rem;
    }
}

/* ===== REEL PILL — one look everywhere (activity + event modals and cards) =====
   Only the LOOK lives here. Each component positions it with its own class. */
.tralenso-reel-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 3.6rem;
    padding: 0 1.4rem 0 1rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 70%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    backdrop-filter: blur(8px) saturate(160%);
    box-shadow: 0 0.1rem 0.4rem rgba(0, 0, 0, 0.2);
    color: var(--color-dark-text);
    font-size: 1.3rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, transform 0.15s ease;
}

    .tralenso-reel-pill i {
        font-size: 1.8rem;
        color: var(--color-primary);
    }

    .tralenso-reel-pill:active {
        transform: scale(0.96);
        background: white;
    }

    .tralenso-reel-pill:focus-visible {
        outline: 0.2rem solid white;
        outline-offset: 0.2rem;
    }

@media (hover: hover) and (pointer: fine) {
    .tralenso-reel-pill:hover {
        background: white;
        color: var(--color-dark-text);
        transform: scale(1.03);
    }
}

/* Icon-only version for cards: a round play button, like a video thumbnail. */
.tralenso-reel-pill--icon {
    width: 4.4rem;
    height: 4.4rem;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

    .tralenso-reel-pill--icon i {
        font-size: 2.4rem;
        padding-left: 0.2rem; /* the play triangle looks off-centre without it */
    }

/* ── Upload overlays: the dark layer + spinner while a photo uploads ──
   ⚠️ Here, not in the creator CSS: ProfileInformation and WideStaticMapComponent (traveler side) use them too,
   and creator.css only loads on creator screens. The spin animation (profile-spin) is in ProfileImageComponent.css. */
.cover-upload-loading-overlay {
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.cover-upload-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid var(--color-primary-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: profile-spin 0.7s linear infinite;
}

.marker-upload-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.2rem;
    background: rgba(0, 0, 0, 0.4);
}