/* MainFooter - the site footer.
   PERF-S17: extracted VERBATIM from an in-body <style> block in MainFooter.razor, which shipped
   these 593 lines inside EVERY HTML response - uncacheable, on every page, whether or not
   the component was visible. Same move and same reasoning as rently-home.css (PUB-9.S3c) and
   dynamic-carousel.css. Razor's @@ at-rule escaping is un-escaped here, so edit the styles in
   THIS file - the .razor no longer carries them. */

    /* Animation Classes */
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

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

    .animate-fade-in {
        animation: fadeIn 0.4s ease-out forwards;
    }

    .animate-fade-in-delayed {
        animation: fadeIn 0.4s ease-out 0.2s forwards;
        opacity: 0;
    }

    /* Desktop Styles (lg and up) */
    .footer-container {
        margin-top: 0;
    }

    .footer-content-container {
        max-width: var(--rently-layout-max-width, 1440px);
        margin: 0 auto;
        padding: 20px 24px 40px;
        min-height: 300px;
    }

    /* Copyright Bar Wrapper - Mobile Margin */
    .copyright-bar-wrapper {
        margin-bottom: 0;
    }

    @media (max-width: 599px) {
        .copyright-bar-wrapper {
            padding-bottom: 12px;
        }
    }

    /* Tablet Styles (md) */
    .tablet-footer-content {
        padding: 30px 20px;
        max-width: 900px;
        margin: 0 auto;
    }

    .tablet-footer-logo {
        text-align: center;
        margin-bottom: 30px;
    }

    .tablet-footer-grid {
        margin-bottom: 30px;
    }

    .tablet-footer-section {
        margin-bottom: 20px;
    }

    /* N5 (2026-07-24): one heading voice for every footer column — mirrors the nav's
       G4 popover-heading recipe (small / tracked / uppercase) so the footer reads as
       the same chrome family as the polished nav. */
    .footer-heading {
        color: rgb(255 255 255 / 92%);
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        margin-bottom: 12px;
    }

    .tablet-footer-heading {
        color: rgb(255 255 255 / 92%);
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        margin-bottom: 12px;
    }

    .tablet-footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .tablet-footer-links li {
        margin-bottom: 8px;
    }

    .tablet-footer-links a {
        color: rgb(255 255 255 / 85%);
        text-decoration: none;
        font-size: 14px;
        transition: all 0.2s ease;
        display: inline-block;
    }

    .tablet-footer-links a:hover {
        color: #fff;
        transform: translateX(2px);
    }

    .tablet-footer-bottom {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding-top: 20px;
        border-top: 1px solid rgb(255 255 255 / 10%);
    }

    .tablet-service-providers {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        flex-wrap: wrap;
    }

    .tablet-provider-logo {
        max-height: 28px;
        max-width: 70px;
        object-fit: contain;
        opacity: 0.85;
        transition: all 0.2s ease;
    }

    .tablet-provider-logo:hover {
        opacity: 1;
        transform: scale(1.05);
    }

    .tablet-social-links {
        display: flex;
        gap: 12px;
    }

    .tablet-social-link {
        transition: transform 0.2s ease;
    }

    .tablet-social-link:hover {
        transform: translateY(-2px);
    }

    /* Mobile Styles (sm and xs) */
    .mobile-footer-content {
        padding: 0;
        background-color: #0f4761;
    }

    .mobile-footer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        background-color: rgb(0 0 0 / 10%);
        border-bottom: 1px solid rgb(255 255 255 / 10%);
    }

    .mobile-logo {
        object-fit: contain;
    }

    .mobile-header-right {
        display: flex;
        align-items: center;
    }

    .mobile-social-icon {
        transition: transform 0.2s ease;
    }

    .mobile-social-icon:active {
        transform: scale(0.9);
    }

    /* Mobile Expansion Panels */
    .mobile-footer-panels {
        background-color: transparent !important;
    }

    .mobile-footer-panels .mud-expand-panel {
        background-color: transparent !important;
        box-shadow: none !important;
        border-bottom: 1px solid rgb(255 255 255 / 10%);
        margin: 0 !important;
    }

    .mobile-footer-panels .mud-expand-panel:last-child {
        border-bottom: none;
    }

    .mobile-footer-panels .mud-expand-panel-header {
        background-color: transparent !important;
        padding: 16px 20px !important;
        min-height: unset !important;
    }

    .mobile-footer-panels .mud-expand-panel-content {
        background-color: rgb(0 0 0 / 5%) !important;
        padding: 0 !important;
    }

    .mobile-panel-title {
        color: #fff;
        font-weight: 500;
    }

    .mobile-panel-links {
        list-style: none;
        padding: 12px 20px 16px;
        margin: 0;
    }

    .mobile-panel-links li {
        margin-bottom: 12px;
    }

    .mobile-panel-links li:last-child {
        margin-bottom: 0;
    }

    .mobile-panel-links a {
        color: rgb(255 255 255 / 85%);
        text-decoration: none;
        font-size: 14px;
        display: block;
        padding: 4px 0;
        transition: all 0.2s ease;
    }

    .mobile-panel-links a:active {
        color: #35a0ae;
        transform: translateX(4px);
    }

    /* Mobile Service Section */
    .mobile-service-section {
        padding: 20px;
        background-color: rgb(0 0 0 / 10%);
        text-align: center;
    }

    .mobile-section-title {
        color: rgb(255 255 255 / 70%);
        margin-bottom: 12px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-service-grid {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .mobile-provider-logo {
        max-height: 20px;
        max-width: 50px;
        object-fit: contain;
        opacity: 0.85; /* N5: unified with the desktop/tablet provider-logo treatment */
        filter: brightness(0.9);
    }

    /* Skeleton Styles */
    .footer-skeleton {
        padding: 20px 24px 40px;
        max-width: var(--rently-layout-max-width, 1440px);
        margin: 0 auto;
    }

    .tablet-footer-skeleton {
        padding: 30px 20px;
        max-width: 900px;
        margin: 0 auto;
    }

    .mobile-footer-skeleton {
        padding: 16px 20px;
    }

    .mobile-skeleton-section {
        padding: 16px 0;
        border-bottom: 1px solid rgb(255 255 255 / 10%);
    }

    .mobile-skeleton-section:last-child {
        border-bottom: none;
    }

    .mobile-social-skeleton {
        padding: 20px;
        text-align: center;
    }

    /* Error State */
    .footer-error-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 60px 20px;
        text-align: center;
        color: white;
    }

    /* Service Provider Logos */
    .service-provider-logo {
        transition: all 0.3s ease;
        opacity: 0.8;
        filter: brightness(0.9);

        /* The width/height ATTRIBUTES (the CLS ratio hint) must not become the rendered
           width: with a presentational width, .img-fluid's height:auto no longer
           shrink-to-fits and max-height:34px stretched all five logos flat (QA R2).
           width:auto restores aspect-driven sizing; object-fit is belt-and-braces. */
        width: auto;
        object-fit: contain;
    }

    .service-provider-logo:hover {
        opacity: 1;
        filter: brightness(1.1);
        transform: scale(1.05);
    }

    /* Social Links */
    .social-link {
        display: inline-block;
        transition: transform 0.2s ease;
    }

    .social-link:hover {
        transform: translateY(-2px);
    }

    /* 2026-07-22: the desktop socials had no spacing rule — the avatars were inline siblings whose only
       separation was markup whitespace, and 3 x 40px overflowed the old fixed 130px column. Matches the
       12px the tablet layout (.tablet-social-links) already used, and the column is now sized to the
       content (3 x 40 + 2 x 12 = 144px) instead of clipping it. */
    .footer-socials-column {
        min-width: 144px;
    }

    .footer-social-links {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Footer Sections */
    .footer-section {
        transition: all 0.3s ease;
    }

    /* Desktop footer link styles */
    .footer-content-container ul.list-unstyled a {
        transition: all 0.2s ease;
        display: inline-block;
        position: relative;

        /* N5: soften the resting state so hover (full white + underline-grow) reads as a
           real state change. !important beats the per-link inline color:#ffffff. */
        color: rgb(255 255 255 / 85%) !important;
    }

    .footer-content-container ul.list-unstyled li {
        margin-bottom: 8px; /* N5: consistent link rhythm (was markup-whitespace spacing) */
    }

    .footer-content-container ul.list-unstyled a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 1px;
        bottom: -2px;
        left: 0;
        background-color: #fff;
        transition: width 0.2s ease;
    }

    .footer-content-container ul.list-unstyled a:hover {
        color: #fff !important; /* N5: lift to full white (was opacity fade) */
        transform: translateX(2px);
    }

    .footer-content-container ul.list-unstyled a:hover::after {
        width: 100%;
    }

    /* N5: keyboard parity with the nav polish — visible focus rings on the dark footer.
       #74d0dc is the house dark-surface teal (AA on both footer surfaces). */
    .footer-content-container ul.list-unstyled a:focus-visible,
    .tablet-footer-links a:focus-visible,
    .social-link:focus-visible {
        outline: 2px solid #74d0dc;
        outline-offset: 2px;
        border-radius: 2px;
    }

    /* N5: hairline seam above the providers/socials bottom row — mirrors .tablet-footer-bottom,
       so the desktop footer gets the same two-tier structure the tablet layout already has. */
    .footer-bottom-row {
        border-top: 1px solid rgb(255 255 255 / 10%);
        padding-top: 20px;
    }

    /* Copyright Bar */
    .footer-copyright-container {
        max-width: var(--rently-layout-max-width, 1440px);
        margin: 0 auto;
        padding: 0 24px;
    }

    .copyright-content {
        min-height: 56px; /* grows from 45px to seat the 44px theme toggle (track + border ≈ 52px) without clipping */
        padding: 6px 24px;
        display: flex;
        align-items: center;
        gap: 16px;
    }

    /* C5 Pt3b — footer theme-toggle group (label + the Compact/OnDarkSurface ThemeToggle). */
    .footer-theme-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .footer-theme-toggle__label {
        color: #AEB9C7; /* N5: was #9AA5B4 ≈4.0:1 on the #0f4761 mobile footer body — ≈5.0:1 now */
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
    }

    /* Theme toggle placement — desktop: its own bottom-row column (.footer-theme-column, beside
       "Our Socials"); tablet: a centered row in .tablet-footer-bottom; mobile: an always-visible
       row below the panels. (It previously sat inside the fixed-130px "Your Account" links column,
       which it overflowed — clipped at the viewport edge.) */
    .mobile-footer-theme {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 4px 20px 12px;
    }

    /* N5: was #35a0ae ≈4.68:1 on #182b3d — lifted to ≈5.9:1 (AA with margin). !important is
       load-bearing: these are MudLinks carrying .mud-primary-text, whose role ink is !important
       (the documented MudBlazor text-utility trap) and would otherwise repaint them #35a0ae. */
    .copyright-links a {
        color: #5db2be !important;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .copyright-links a:hover {
        text-decoration: underline;
        color: #74d0dc !important;
    }

    /* Responsive adjustments */
    @media (max-width: 1479px) {
        .footer-content-container,
        .footer-copyright-container {
            max-width: 100%;
        }
    }

    @media (max-width: 959px) {
        .tablet-footer-content {
            padding: 24px 16px;
        }

        .tablet-footer-grid {
            gap: 0;
        }
    }

    @media (max-width: 599px) {
        /* Stack the bar at narrow widths so the © / theme-toggle / legal-links row never overflows once the toggle
           is added. MudBlazor's .flex-row utility is `flex-direction:row !important`, so this must use both a higher
           specificity (doubled class, 0,2,0 > 0,1,0) AND !important to win — the only way to override an !important
           utility. Restores the intended column layout (the original single-class rule was inert against flex-row). */
        .copyright-content.copyright-content {
            flex-direction: column !important;
            height: auto;
            padding: 16px;
            gap: 8px;
            text-align: center;
        }

        .copyright-links {
            font-size: 13px;
        }

        .copyright-divider {
            margin: 0 6px;
        }

        .mobile-footer-header {
            padding: 12px 16px;
        }

        .mobile-footer-panels .mud-expand-panel-header {
            padding: 12px 16px !important;
        }

        .mobile-panel-links {
            padding: 8px 16px 12px;
        }

        .mobile-service-section {
            padding: 16px;
        }
    }

    /* Touch-friendly adjustments */
    @media (hover: none) and (pointer: coarse) {
        .mobile-panel-links a {
            padding: 6px 0;
            min-height: 44px;
            display: flex;
            align-items: center;
        }

        .tablet-footer-links a {
            padding: 2px 0;
        }
    }

    /* (Removed 2026-07-22.) This was a scroll-in animation: .footer-section started 20px low and
       .footer-section.visible reset it. Nothing ever added .visible — SetupIntersectionObserver() in
       the code-behind was a stub that awaited a Task.Delay and never called JS — so the reset never
       ran and the four link columns (Menu / Our Company / Need Help? / Your Account) sat permanently
       20px BELOW their true position. The Theme column carries no .footer-section class, so it alone
       rendered where it should, which is why its heading looked misaligned with the rest.
       Deleting the rule aligns all six headings; it does not remove a working animation, because
       there was never one to see. (.footer-section keeps its legitimate `transition` rule further up
       in this sheet, used by the link-column hover states.) */

    /* iOS Safe Area Support */
    @supports (padding: max(0px)) {
        .mobile-footer-content {
            padding-bottom: max(0px, env(safe-area-inset-bottom));
        }

        .copyright-content {
            padding-bottom: max(0px, env(safe-area-inset-bottom));
        }

        .mobile-service-section {
            padding-bottom: max(20px, env(safe-area-inset-bottom));
        }
    }

    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }

    /* High contrast mode support.
       S33 — was `prefers-contrast: high`, which is NOT A VALID VALUE. Media Queries Level 5 defines
       `no-preference | more | less | custom`; `high` was an early draft name that never shipped, so
       this query matched nothing and the whole block — the link underlines below and the logo
       contrast boost — has never applied to a single user since it was written. The repo's four
       other prefers-contrast blocks (category-card.css:195, dynamic-carousel.css:468,
       rental-card.css:1443, store-card.css:430) all correctly say `more`; this file alone did not.
       Found by stylelint, which had been failing at HEAD for six days without anyone seeing it. */
    @media (prefers-contrast: more) {
        .footer-content-container ul.list-unstyled a,
        .tablet-footer-links a,
        .mobile-panel-links a {
            text-decoration: underline;
        }

        .service-provider-grid img,
        .mobile-provider-logo {
            opacity: 1;
            filter: contrast(1.2);
        }
    }

    /* Dark mode overrides for MudExpansionPanels */
    .mobile-footer-panels .mud-icon-root {
        color: #fff !important;
    }
