@tailwind base;
@tailwind components;
@tailwind utilities;

/* ===================================================== */
/* Root defaults (Fallback außerhalb des AMD-Scopes)      */
/* ===================================================== */
:root {
  --background: #ffffff;
  --foreground: #171717;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
  }
}

body {
  color: var(--foreground);
  background: var(--background);
  font-family: Arial, Helvetica, sans-serif;
}

/* ===================================================== */
/* Global Fixes                                           */
/* ===================================================== */

/* iOS / Safari: Tap-Highlight aus + weniger Render-Flackern (nur Transfer-App) */
body[data-app="amd-transfer"] * {
  -webkit-tap-highlight-color: transparent;
}

@supports (-webkit-touch-callout: none) {
  body[data-app="amd-transfer"] .ios-fix {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

/* Google-Autocomplete immer über dem Layout anzeigen */
.pac-container {
  z-index: 10000 !important;
}

/* Telefonnummern nie umbrechen (z. B. Buttons, Copy-Text) */
a[href^="tel:"],
.no-break-phone {
  white-space: nowrap;
  word-break: keep-all;
}

/* ===================================================== */
/* AMD Transfer Theme (scoped) — nur Optik, keine Logik   */
/* Aktiv über: <body data-app="amd-transfer">             */
/* ===================================================== */
body[data-app="amd-transfer"] {
  /* Brand */
  --amd-red: #c1272d;
  --amd-gold: #c09743;
  --amd-cedar: #176f4b;

  /* Semantik */
  --amd-primary: var(--amd-red);
  --amd-accent: var(--amd-cedar);

  /* UI */
  --amd-bg: #f6f7fa;
  --amd-card-bg: rgba(255, 255, 255, 0.92);
  --amd-border: rgba(17, 24, 39, 0.10);
  --amd-text: #0f172a;
  --amd-muted: rgba(15, 23, 42, 0.70);
  --amd-heading: #0b1b33;

  --amd-shadow-card: 0 18px 50px rgba(2, 6, 23, 0.10);
  --amd-shadow-soft: 0 10px 25px rgba(2, 6, 23, 0.08);

  background: var(--amd-bg);
  color: var(--amd-text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    "Noto Sans", "Helvetica Neue", sans-serif;
}

@layer base {
  body[data-app="amd-transfer"] h1,
  body[data-app="amd-transfer"] h2,
  body[data-app="amd-transfer"] h3 {
    color: var(--amd-heading);
    letter-spacing: -0.02em;
  }

  body[data-app="amd-transfer"] p,
  body[data-app="amd-transfer"] span,
  body[data-app="amd-transfer"] label {
    color: var(--amd-text);
  }

  /* Bulletpoints in Zedern-Grün */
  body[data-app="amd-transfer"] ul li::marker {
    color: var(--amd-cedar);
  }
}

/* ===================================================== */
/* Components                                             */
/* ===================================================== */
@layer components {
  /* Buttons */
  .btn {
    @apply py-3 px-6 rounded-lg font-medium transition;
  }

  .btn-primary {
    @apply text-white shadow-lg;
    @apply bg-[color:var(--amd-primary,#c1272d)];
    @apply hover:bg-[color:var(--amd-gold,#c09743)];
    @apply focus:outline-none focus:ring-2 focus:ring-[color:var(--amd-accent,#176f4b)];
  }

  .btn-secondary {
    @apply bg-white border border-gray-200 shadow-sm;
    @apply hover:border-[color:var(--amd-accent,#176f4b)] hover:bg-[#FAFAF9];
    @apply focus:outline-none focus:ring-2 focus:ring-[color:var(--amd-accent,#176f4b)];
    color: var(--amd-heading, #0b1b33);
  }

  .btn-disabled {
    @apply bg-gray-200 text-gray-500 cursor-not-allowed;
  }

  /* Einheitlicher Bild-Container für ExtrasStep */
  .extras-img-wrapper {
    @apply w-24 h-40 overflow-hidden rounded bg-white flex items-center justify-center;
  }

  .extras-img-wrapper img {
    @apply h-full w-auto object-contain;
  }
}

/* ===================================================== */
/* Optional: Language Switcher Styling                    */
/* ===================================================== */
body[data-app="amd-transfer"] .lang-switch {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--amd-border);
  border-radius: 999px;
}

body[data-app="amd-transfer"] .lang-switch button,
body[data-app="amd-transfer"] .lang-switch a {
  background: transparent !important;
  color: var(--amd-heading) !important;
}

body[data-app="amd-transfer"] .lang-switch button[aria-pressed="true"],
body[data-app="amd-transfer"] .lang-switch button[aria-current="true"],
body[data-app="amd-transfer"] .lang-switch .active {
  background: var(--amd-primary) !important;
  color: #fff !important;
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.10);
}
/* Flag Switcher (Pills) – kompakter */
@layer components {
  body[data-app="amd-transfer"] .amd-flag-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;                    /* weniger Abstand zwischen den Pills */
    padding: 0.26rem 0.32rem;        /* weniger Außenpadding */
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(17, 24, 39, 0.10);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.08);
  }

  body[data-app="amd-transfer"] .amd-flag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;                    /* Icon dichter am Text */
    padding: 0.38rem 0.7rem;         /* deutlich schlanker */
    border-radius: 999px;
    font-weight: 800;
    font-size: 10px;                 /* statt 12px */
    letter-spacing: 0.08em;
    color: var(--amd-primary, #002147);
    background: transparent;
    border: 1px solid transparent;
    line-height: 1;
    white-space: nowrap;
  }

  body[data-app="amd-transfer"] .amd-flag-pill:hover {
    background: rgba(0, 33, 71, 0.06);
  }

  body[data-app="amd-transfer"] .amd-flag-pill[aria-pressed="true"] {
    background: #fff;
    border-color: rgba(192, 151, 67, 0.55);
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.10);
  }

  body[data-app="amd-transfer"] .amd-flag-icon {
    width: 18px;                     /* kleineres Icon */
    height: 18px;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.10);
  }
}



  body[data-app="amd-transfer"] .amd-topbar .amd-flag-pill {
    padding: 0.35rem 0.55rem;
    font-size: 10px;
    letter-spacing: 0.07em;
  }

  body[data-app="amd-transfer"] .amd-topbar .amd-flag-icon {
    width: 18px;
    height: 18px;
  }


/* Transfer-App: Primärbutton bleibt rot – kein Gold Hover */
.btn-primary {
  background-color: var(--amd-primary, #c1272d) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:focus-visible {
  background-color: #a91f24 !important;
  color: #fff !important;
  filter: none !important;
}

.btn-primary:active {
  background-color: #8f1a1f !important;
}

/* ===================================================== */
/* AMD Transfer – Header Mobile Fix                       */
/* ===================================================== */
@media (max-width: 520px) {
  body[data-app="amd-transfer"] .amd-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Logo darf schrumpfen statt Layout sprengen */
  body[data-app="amd-transfer"] .amd-topbar .amd-logo {
    flex: 1 1 auto;
    min-width: 140px;
    max-width: 55%;
  }

  /* Flag-Switcher: kleiner + skaliert, damit er im Rahmen bleibt */
  body[data-app="amd-transfer"] .amd-topbar .amd-flag-switcher,
  body[data-app="amd-transfer"] .amd-topbar .lang-switch {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    transform: scale(0.88);
    transform-origin: right center;
  }

  body[data-app="amd-transfer"] .amd-topbar .amd-flag-pill {
    padding: 0.35rem 0.55rem;
    font-size: 10px;
    letter-spacing: 0.07em;
  }

  body[data-app="amd-transfer"] .amd-topbar .amd-flag-icon {
    width: 18px;
    height: 18px;
  }

  /* Tour-Button: nie über den Rand */
  body[data-app="amd-transfer"] .amd-topbar .amd-tour-btn {
    flex: 0 0 auto;
    max-width: 100%;
    white-space: nowrap;
    margin-left: auto;
  }
}


/* Counter Pills: iPhone Tap darf NICHT “springen” */
body[data-app="amd-transfer"] .counter-pill:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.14);
}

/* Ring nur bei Tastatur (Tab) */
body[data-app="amd-transfer"] .counter-pill:focus-visible {
  box-shadow:
    inset 0 0 0 1px rgba(31, 111, 58, 0.22),
    0 0 0 4px rgba(31, 111, 58, 0.10);
}

/* iOS Safari: korrektes Clipping in Cards (verhindert „Plus läuft raus“) */
body[data-app="amd-transfer"] .amd-card-clip {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  transform: translateZ(0);
}

/* ===================================================== */
/* Legal Pages: Header Logo fix                           */
/* ===================================================== */
[data-app="amd-transfer"] .amd-header .amd-logo img {
  height: 44px;
  width: auto;
  display: block;
}

@media (max-width: 520px) {
  [data-app="amd-transfer"] .amd-header .amd-logo img {
    height: 38px;
  }
}

/* ===================================================== */
/* Footer (GLOBAL, auch für /legal/*)                     */
/* ===================================================== */
.amd-footer {
  background: #0b1220;
  color: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 3rem;
  padding: 2.5rem 1rem;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-title {
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
}

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

.footer-links li {
  margin-bottom: 0.55rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
}

.footer-links a:hover {
  color: var(--amd-gold, #c09743);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.footer-social img {
  width: 28px;
  height: 28px;
  opacity: 0.9;
}

.footer-social img:hover {
  opacity: 1;
}

/* Spalten symmetrischer verteilen */
.amd-footer .footer-grid {
  justify-items: stretch;
}

.amd-footer .footer-column--right {
  justify-self: end;
  text-align: right;
}

.amd-footer .footer-column--left {
  justify-self: start;
  text-align: left;
}

.amd-footer .footer-column--center {
  justify-self: center;
  text-align: center;
}

/* RTL Support nur im Footer */
.amd-footer[dir="rtl"] .footer-column:not(.footer-column--center) {
  text-align: right;
}

/* ===================================================== */
/* FINAL: Mobile Footer kompakt (GLOBAL, auch /legal/*)   */
/* ===================================================== */
@media (max-width: 640px) {
  .amd-footer {
    margin-top: 18px !important;
    padding: 16px 14px 22px !important;
  }

  .footer-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "left right"
      "center center" !important;
    gap: 14px 16px !important;
    text-align: left !important;
    max-width: 980px !important;
    margin: 0 auto !important;
    align-items: start !important;
  }

  .footer-column--left {
    grid-area: left !important;
    justify-self: start !important;
    text-align: left !important;
  }

  .footer-column--right {
    grid-area: right !important;
    justify-self: end !important;
    text-align: right !important;
  }

  .footer-column--center {
    grid-area: center !important;
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    text-align: center !important;
    margin-top: 4px !important;
  }

  .footer-title {
    font-size: 13px !important;
    margin: 0 0 8px 0 !important;
  }

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

  .footer-links a {
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  .footer-social {
    gap: 10px !important;
  }

  .footer-social img {
    width: 22px !important;
    height: 22px !important;
  }

  /* RTL: links/rechts tauschen, Center bleibt */
  .amd-footer[dir="rtl"] .footer-column--left {
    text-align: right !important;
    justify-self: end !important;
  }
  .amd-footer[dir="rtl"] .footer-column--right {
    text-align: left !important;
    justify-self: start !important;
  }
}

/* ===================================================== */
/* FINAL: Mobile CTA + Platz (NUR App, nicht Legal)       */
/* ===================================================== */
@media (max-width: 640px) {
  /* CTA unten symmetrisch */
  body[data-app="amd-transfer"] .amd-whatsapp-cta {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 28px) !important;
    max-width: 640px !important;
    bottom: 14px !important;
    margin: 0 !important;
    z-index: 60 !important;
    box-sizing: border-box !important;
    justify-content: center;
  }

  /* Platz für CTA: nur in der App */
  body[data-app="amd-transfer"] main {
    padding-bottom: 110px !important;
  }
}
/* ===================================================== */
/* ULTIMATE OVERRIDE: Footer auf Mobile wirklich kompakt  */
/* (App + Legal)                                         */
/* ===================================================== */
@media (max-width: 820px){

  /* weniger Außenabstand und weniger Innenpadding */
  body[data-app="amd-transfer"] .amd-footer,
  .amd-footer{
    margin-top: 14px !important;
    padding: 14px 12px 16px !important;
  }

  /* 2 Spalten, Social unten */
  body[data-app="amd-transfer"] .footer-grid,
  .footer-grid{
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "left right"
      "center center" !important;
    gap: 10px 14px !important;
    align-items: start !important;
    text-align: left !important;
  }

  body[data-app="amd-transfer"] .footer-column--left,
  .footer-column--left{
    grid-area: left !important;
    justify-self: start !important;
    text-align: left !important;
  }

  body[data-app="amd-transfer"] .footer-column--right,
  .footer-column--right{
    grid-area: right !important;
    justify-self: end !important;
    text-align: right !important;
  }

  body[data-app="amd-transfer"] .footer-column--center,
  .footer-column--center{
    grid-area: center !important;
    justify-self: center !important;
    text-align: center !important;
    margin-top: 6px !important;
  }

  /* Typo kompakter */
  body[data-app="amd-transfer"] .footer-title,
  .footer-title{
    font-size: 13px !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.2 !important;
  }

  body[data-app="amd-transfer"] .footer-links li,
  .footer-links li{
    margin-bottom: 6px !important;
  }

  body[data-app="amd-transfer"] .footer-links a,
  .footer-links a{
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  /* Social kleiner + weniger Abstand */
  body[data-app="amd-transfer"] .footer-social,
  .footer-social{
    gap: 10px !important;
    margin-top: 2px !important;
  }

  body[data-app="amd-transfer"] .footer-social img,
  .footer-social img{
    width: 22px !important;
    height: 22px !important;
  }

  /* RTL nur im Footer */
  body[data-app="amd-transfer"] .amd-footer[dir="rtl"] .footer-column--left,
  .amd-footer[dir="rtl"] .footer-column--left{
    text-align: right !important;
    justify-self: end !important;
  }

  body[data-app="amd-transfer"] .amd-footer[dir="rtl"] .footer-column--right,
  .amd-footer[dir="rtl"] .footer-column--right{
    text-align: left !important;
    justify-self: start !important;
  }
}
/* ===================================================== */
/* FINAL FIX: Footer + CTA (App)                          */
/* Social nicht hinter fixed CTA verstecken               */
/* ===================================================== */
@media (max-width: 820px){

  /* CTA bleibt fixed wie gehabt */
  body[data-app="amd-transfer"] .amd-whatsapp-cta{
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 28px) !important;
    max-width: 640px !important;
    bottom: 14px !important;
    margin: 0 !important;
    z-index: 60 !important;
    box-sizing: border-box !important;
  }

  /* WICHTIG: Scroll-Platz NACH dem Footer, damit Social sichtbar wird */
  body[data-app="amd-transfer"] .amd-footer{
    margin-bottom: 92px !important; /* ca. CTA-Höhe + Abstand */
  }
}
/* ===================================================== */
/* FINAL FIX: Footer Grid kompakt + symmetrisch (Legal+App) */
/* ===================================================== */
@media (max-width: 820px){

  /* Footer kompakter */
  body[data-app="amd-transfer"] .amd-footer,
  .amd-footer{
    margin-top: 14px !important;
    padding: 14px 12px 16px !important;
  }

  /* 2 Spalten + Center unten */
  body[data-app="amd-transfer"] .footer-grid,
  .footer-grid{
    display:grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "left right"
      "center center" !important;
    gap: 10px 14px !important;
    align-items:start !important;
  }

  body[data-app="amd-transfer"] .footer-column--left,
  .footer-column--left{ grid-area:left !important; text-align:left !important; }

  body[data-app="amd-transfer"] .footer-column--right,
  .footer-column--right{ grid-area:right !important; text-align:right !important; }

  body[data-app="amd-transfer"] .footer-column--center,
  .footer-column--center{ grid-area:center !important; text-align:center !important; margin-top: 6px !important; }

  /* Typo/Abstände kompakt */
  body[data-app="amd-transfer"] .footer-title,
  .footer-title{ font-size: 13px !important; margin: 0 0 6px 0 !important; line-height: 1.2 !important; }

  body[data-app="amd-transfer"] .footer-links li,
  .footer-links li{ margin-bottom: 6px !important; }

  body[data-app="amd-transfer"] .footer-links a,
  .footer-links a{ font-size: 13px !important; line-height: 1.2 !important; }

  body[data-app="amd-transfer"] .footer-social img,
  .footer-social img{ width: 22px !important; height: 22px !important; }
}
/* Mobile: "Tour anfragen" oben ausblenden */
@media (max-width: 640px) {
  body[data-app="amd-transfer"] .amd-topbar .amd-tour-btn {
    display: none !important;
  }
}
/* Mobile: "Tour anfragen" überall ausblenden (auch wenn er unten fixiert ist) */
@media (max-width: 640px) {
  body[data-app="amd-transfer"] .amd-tour-btn {
    display: none !important;
  }
}
/* =========================================
   Back Button – rot wie Primärbutton
   ========================================= */

body[data-app="amd-transfer"] .btn-glass-back,
body[data-app="amd-transfer"] #backToTransferApp {
  display: inline-flex;
  align-items: center;
  gap: .45rem;

  padding: .55rem 1.05rem;
  border-radius: 999px;

  background-color: var(--amd-primary, #c1272d);
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 26px rgba(193, 39, 45, 0.32);

  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;

  transition: background-color .18s ease, box-shadow .18s ease, transform .12s ease;
}

body[data-app="amd-transfer"] .btn-glass-back:hover,
body[data-app="amd-transfer"] #backToTransferApp:hover {
  background-color: #a91f24;
  box-shadow: 0 14px 32px rgba(193, 39, 45, 0.42);
}

body[data-app="amd-transfer"] .btn-glass-back:active,
body[data-app="amd-transfer"] #backToTransferApp:active {
  background-color: #8f1a1f;
  transform: translateY(1px);
  box-shadow: 0 8px 18px rgba(193, 39, 45, 0.35);
}

/* iOS: kein Tap-Zoom, kein Springen */
body[data-app="amd-transfer"] #backToTransferApp {
  -webkit-tap-highlight-color: transparent;
}

/* ===== Legal Header Layout (wie Hauptseite) ===== */
.legal-topbar{
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246,247,250,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17,24,39,.08);
}

.legal-topbar-inner{
  width: min(1100px, 100% - 1.6rem);
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.legal-brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 0;
}
.legal-brand img{
  height: 44px;
  width: auto;
  display:block;
}

.back-glass{
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  padding:.62rem 1.05rem;
  border-radius:999px;
  border:1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 26px rgba(2,6,23,.10);
  color: var(--amd-heading,#0b1b33);
  text-decoration:none;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}
.back-glass:hover{
  background: rgba(255,255,255,.92);
  border-color: rgba(17,24,39,.16);
}

.legal-lang{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
}

.legal-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration:none;
  border: 1px solid transparent;
  font-weight: 800;
  color: var(--amd-heading,#0b1b33);
  line-height: 1;
  white-space:nowrap;
}

.legal-pill img{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display:block;
}

.legal-pill.is-active{
  border-color: rgba(193,39,45,.55);
  box-shadow: 0 10px 18px rgba(193,39,45,.12);
}

@media (max-width: 720px){
  .legal-topbar-inner{ width: calc(100% - 1.2rem); }
  .legal-brand img{ height: 40px; }
  .back-glass{ padding:.58rem .95rem; }
  .legal-pill{ padding: 7px 10px; gap:7px; }
  .legal-pill img{ width: 20px; height: 20px; }
}
/* ============================
   Legal pages: Header Mobile Fix
   ============================ */
@media (max-width: 520px){

  /* Header darf umbrechen statt überlappen */
  .legal-topbar-inner{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  /* Logo bleibt sichtbar und bekommt Platz */
  .legal-brand{
    flex: 0 0 auto;
    max-width: 60%;
  }
  .legal-brand img{
    height: 42px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
  }

  /* Sprachleiste geht in eigene Zeile und wird kompakter */
  .legal-lang{
    flex: 1 1 100%;
    justify-content: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 999px;
  }

  /* Pills kleiner */
  .legal-pill{
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1;
    border-radius: 999px;
    white-space: nowrap;
  }

  .legal-pill img{
    width: 18px;
    height: 18px;
  }
}
/* ============================
   Legal pages: Footer symmetry
   ============================ */
@media (max-width: 820px){
  .amd-footer .footer-grid{
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 18px 26px !important;
    align-items: start !important;
  }

  /* Links sauber links ausrichten */
  .amd-footer .footer-column{
    justify-self: start !important;
    text-align: left !important;
  }

  .amd-footer .footer-links{
    margin: 0 !important;
    padding: 0 !important;
  }
}

@media (max-width: 420px){
  .amd-footer .footer-grid{
    grid-template-columns: 1fr !important;
  }
  .amd-footer .footer-column--center{
    order: 3; /* Social nach unten */
  }
}
@media (max-width: 520px){

  /* Brand + Switcher nehmen volle Breite, nie overlap */
  .legal-brand{ max-width: 100% !important; }
  .legal-lang{ width: 100% !important; }

  /* wenn das Logo zu breit ist: sauber kürzen statt Pill drüber */
  .legal-brand a{ display:flex; max-width: 100%; }
  .legal-brand img{ max-width: 100%; height: 38px !important; }
}
@media (max-width: 820px){
  /* auf Mobile: beide Spalten linksbündig für echte Symmetrie */
  .footer-column--right{
    justify-self: start !important;
    text-align: left !important;
  }
}
