/* =============================================================================
 * Org Website Footer - Strip System (parallel rules)
 * =============================================================================
 *
 * The footer reuses the header's strip render path (StripRenderHelper)
 * and emits the same `.website-header-strip-*` / `.website-header-section-*`
 * class names. The runtime rules in web/css/website-header-strips.css are
 * scoped under `.website-header`, so they don't reach footer placements.
 * This file re-scopes the rules that matter for the footer under
 * `.website-footer` and adds the dropup overrides for popovers placed at
 * the bottom of the viewport.
 *
 * Loaded conditionally by views/layouts/website.php only when at least
 * one of the two footer strip slots is populated, so orgs without strips
 * don't pay the byte cost.
 */

/* ---------- Strip wrapper ------------------------------------------------ */

.website-footer .website-header-strip {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.website-footer .website-header-strip:first-of-type {
    border-top: none;
}

.website-footer .website-header-strip-row {
    min-height: 48px;
    gap: 1rem;
}

/* ---------- Per-strip padding ------------------------------------------- */

.website-footer .website-header-strip-pad-tight .website-header-strip-row {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    min-height: 36px;
}

.website-footer .website-header-strip-pad-normal .website-header-strip-row {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.website-footer .website-header-strip-pad-loose .website-header-strip-row {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* ---------- Per-strip vertical alignment -------------------------------- */

.website-footer .website-header-strip-align-start .website-header-strip-row {
    align-items: flex-start;
}

.website-footer .website-header-strip-align-end .website-header-strip-row {
    align-items: flex-end;
}

/* ---------- Per-strip backgrounds --------------------------------------- */

/* Footer strips inherit the footer's own colour palette by default
   (surface = "let the footer's bg show through"); the other variants let
   the strip stand out from the rest of the footer (e.g. a coloured
   pre-footer CTA banner). */
.website-footer .website-header-strip-bg-surface {
    background-color: transparent;
    color: inherit;
}

.website-footer .website-header-strip-bg-primary {
    background-color: var(--website-primary, #0d6efd);
    color: var(--website-on-primary, #fff);
}

.website-footer .website-header-strip-bg-primary a {
    color: var(--website-on-primary, #fff);
}

.website-footer .website-header-strip-bg-dark {
    background-color: #1a1a1a;
    color: #fff;
}

.website-footer .website-header-strip-bg-dark a {
    color: #fff;
}

/* On dark / primary footer bands, redefine the muted/secondary tokens to
   light values - same fix the header strips carry. Descendants that color
   themselves with var(--text-muted) / var(--text-secondary) (the language
   switcher separator, social labels, hour badges, "by subscribing" small
   print) otherwise keep a mid-grey that washes out on the near-black / brand
   background. */
.website-footer .website-header-strip-bg-dark,
.website-footer .website-header-strip-bg-primary {
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-secondary: rgba(255, 255, 255, 0.85);
    --bs-secondary-color: rgba(255, 255, 255, 0.7);
}

.website-footer .website-header-strip-bg-light {
    background-color: #f8f9fa;
    color: #1a1a1a;
}

.website-footer .website-header-strip-bg-transparent {
    background-color: transparent;
}

/* Custom per-strip color (shared StripRenderHelper path). Same inline-var
   contract as the header; re-scoped under .website-footer. */
.website-footer .website-header-strip-bg-custom {
    background-color: var(--strip-custom-bg);
    color: var(--strip-custom-fg);
}

.website-footer .website-header-strip-bg-custom a {
    color: inherit;
}

.website-footer .website-header-strip-bg-custom--dark {
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-secondary: rgba(255, 255, 255, 0.85);
    --bs-secondary-color: rgba(255, 255, 255, 0.7);
}

/* Footer slot positions (pre / post). Pre sits above the column row;
   post below the copyright. Both get a touch of vertical breathing so
   they don't crowd the surrounding footer chrome. */
.website-footer-strip-slot-pre {
    margin-bottom: 0.5rem;
}

.website-footer-strip-slot-post {
    margin-top: 0.5rem;
}

/* ---------- Zones (left / center / right) ------------------------------- */

.website-footer .website-header-zone {
    min-width: 0;
}

.website-footer .website-header-zone-left {
    flex: 0 0 auto;
}

.website-footer .website-header-zone-center {
    flex: 1 1 auto;
}

.website-footer .website-header-zone-right {
    flex: 0 0 auto;
}

/* ---------- Section wrappers -------------------------------------------- */

.website-footer .website-header-section,
.website-footer .website-header-section-wrap {
    display: inline-flex;
    align-items: center;
}

/* Brand-area anchors keep their inherited colour and lose the default
   underline so a logo / wordmark inside a footer strip behaves like the
   header version. */
.website-footer .website-header-section-logo,
.website-footer .website-header-section-wordmark,
.website-footer .website-header-section-brand-combo {
    color: inherit;
    text-decoration: none;
}

.website-footer .website-header-section-logo:hover,
.website-footer .website-header-section-wordmark:hover,
.website-footer .website-header-section-brand-combo:hover,
.website-footer .website-header-section-logo:focus,
.website-footer .website-header-section-wordmark:focus,
.website-footer .website-header-section-brand-combo:focus {
    color: inherit;
    text-decoration: none;
}

/* Logo size in footer is smaller than header by default - footer logos
   are usually a sign-off, not the main brand mark. */
.website-footer .website-header-logo {
    max-height: 32px;
    width: auto;
}

.website-footer .website-header-wordmark {
    font-family: var(--font-family-brand, var(--font-family-heading));
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- Language switcher in footer --------------------------------- */

.website-footer .website-header-section-language .language-text-links {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
}

.website-footer .website-header-section-language .language-separator {
    display: inline;
    opacity: 0.5;
    color: var(--text-muted, currentColor);
    margin: 0 0.15rem;
}

.website-footer .website-header-section-language .language-flags {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
}

/* ---------- Social icons in footer -------------------------------------- */

.website-footer .website-header-section-social a {
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

.website-footer .website-header-section-social a:hover {
    opacity: 1;
}

.website-footer .website-header-section-social .rounded-circle,
.website-footer .website-header-section-social .rounded {
    width: 32px;
    height: 32px;
}

/* ---------- Dropup popovers for theme / language switchers -------------- */

/* The section wrapping logic (ThemeSwitcherSection / LanguageSwitcherSection)
   emits .dropup instead of .dropdown when location='footer'. Bootstrap
   already styles .dropup with the menu rendered upward, but a few small
   nudges keep the menu inside the viewport and visually attached to the
   toggle button when placed near the very bottom of a page. */

.website-footer .dropup > .dropdown-menu {
    margin-bottom: 0.25rem;
}

/* The default .dropdown-menu-end alignment is right-edge of the toggle.
   In a footer post-strip placed in the right zone, that's still the
   right call - so no override needed for end-alignment. */
