/* ==========================================================================
   Selected-address card in the booking calculator (new-demo, 2026-10-28, v3) – see js/fs-addr-card.js
   Only .custom-search-container (the calculator) is touched; same selector strength as css/fs-calc-v3.css.
   Owner rules v3: fixed type (line 1 16px/600, line 2 14px/400, postcode 500 – in rem, so a larger browser text size
   scales and simply wraps), no shrinking steps, nothing of the address hidden, no ellipsis / line clamp / fixed height.
   Room comes from the layout: line 2 always runs across the full text width; on phones the controls get their own row.
   ========================================================================== */
html body .custom-search-container .custom-input-wrapper.fs-addr-on{ align-items:stretch !important; }

/* the real input stays in the DOM (name, required, autocomplete) but is visually out of the way while the card shows */
html body .custom-search-container .custom-input-wrapper.fs-addr-on > input{
  position:absolute !important; left:0 !important; top:0 !important; width:1px !important; height:1px !important; min-height:0 !important;
  padding:0 !important; border:0 !important; opacity:0 !important; pointer-events:none !important; clip-path:inset(50%) !important;
}

html body .custom-search-container .fs-addr{
  position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:10px; row-gap:2px; align-items:center;
  width:100%; box-sizing:border-box; min-height:68px; margin:0; padding:12px 14px 12px 52px;
  background:linear-gradient(180deg,#F6F8FB 0%,#F1F4F8 100%); border:1px solid rgba(10,22,40,.06); border-radius:14px;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
html body .custom-search-container .fs-addr[hidden]{ display:none !important; }
html body .custom-search-container .fs-addr:hover{ border-color:rgba(31,62,107,.20); background:linear-gradient(180deg,#F3F6FA 0%,#EDF2F7 100%); }
html body .custom-search-container .fs-addr:focus-within{ border-color:#1F3E6B; box-shadow:0 0 0 3px rgba(46,155,218,.18); }

/* text – one fixed scale everywhere */
html body .custom-search-container .fs-addr-txt{
  display:contents; cursor:text; text-align:left;
}
html body .custom-search-container .fs-addr-l1,
html body .custom-search-container .fs-addr-l2{
  overflow-wrap:break-word; word-break:normal; hyphens:manual; white-space:normal; overflow:visible; text-overflow:clip; cursor:text;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; text-rendering:optimizeLegibility; min-width:0;
}
html body .custom-search-container .fs-addr-l1{
  grid-column:1; grid-row:1; align-self:center;
  font-size:1rem; line-height:1.3; font-weight:600; color:#0A1628; letter-spacing:-.011em;
}
html body .custom-search-container .fs-addr-l2{
  grid-column:1 / -1; grid-row:2;
  font-size:.875rem; line-height:1.43; font-weight:400; color:#4F6075; letter-spacing:0; font-variant-numeric:tabular-nums;
}
html body .custom-search-container .fs-addr-plz{ font-weight:500; color:#2C3D52; }
html body .custom-search-container .fs-addr-l2[hidden]{ display:none; }
html body .custom-search-container .fs-addr.fs-addr-single .fs-addr-l1{ grid-column:1; }

/* pencil – own place in the first row (desktop) or in the controls row (phones) */
html body .custom-search-container .fs-addr-edit{
  grid-column:2; grid-row:1; position:relative; flex:0 0 auto; width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center;
  padding:0; margin:0; border:0; border-radius:10px; background:#fff; color:#1F3E6B; cursor:pointer;
  box-shadow:0 1px 2px rgba(10,22,40,.10), 0 0 0 1px rgba(10,22,40,.05);
  transition:background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
html body .custom-search-container .fs-addr-edit:hover{ background:#0A1628; color:#E2C877; box-shadow:0 4px 12px rgba(10,22,40,.22); }
html body .custom-search-container .fs-addr-edit:active{ transform:scale(.94); }
html body .custom-search-container .fs-addr-edit:focus-visible{ outline:3px solid #2E9BDA; outline-offset:2px; }

/* desktop / tablet ≥992px: line 1 + pencil + "+" in row 1, line 2 below over the full width (≈460px at 1350px) */
html body .custom-search-container #wrapper_pickup_text .fs-addr-edit{ margin-right:44px; }          /* room for the "+" (36px) */
html body .custom-search-container #wrapper_pickup_text.fs-addr-on > .add-stop-inline-btn{ top:11px !important; transform:none !important; }   /* centre = pencil centre (29px) */
html body .custom-search-container .custom-input-wrapper.fs-addr-on > .icon{ top:50% !important; transform:translateY(-50%) !important; }
html body .custom-search-container .custom-stop-row .fs-addr{ min-height:60px; }
html body .custom-search-container .custom-stop-row .fs-addr-edit{ margin-right:48px; }                /* room for the "x" (40px) */
html body .custom-search-container .custom-stop-row .custom-input-wrapper.fs-addr-on ~ .remove-stop-btn{ top:10px !important; transform:none !important; }
@media (min-width:992px){
  /* round trip: the swap disc sits at the right edge of the pickup field / left of the destination icon */
  html body .custom-search-container .custom-form-grid:has(#swap_roundtrip_btn:not([style*="none"])) #wrapper_pickup_text .fs-addr{ padding-right:36px; }
  html body .custom-search-container .custom-form-grid:has(#swap_roundtrip_btn:not([style*="none"])) #wrapper_dropoff_text .fs-addr{ padding-left:64px; }
  /* the field beside the address (airport / terminal) takes the same height, content centred */
  html body .custom-search-container .custom-form-grid #wrapper_dropoff_select .custom-display-trigger,
  html body .custom-search-container .custom-form-grid #wrapper_pickup_select .custom-display-trigger{
    height:auto !important; min-height:max(56px, var(--fs-addr-row, 0px)) !important; line-height:1.35 !important;
    display:flex !important; align-items:center !important; padding-top:8px !important; padding-bottom:8px !important;
  }
}

/* phones ≤991px: both text lines use the whole card width; pin, pencil and "+" / "x" share a slim controls row underneath.
   Touch areas 44×44px (WCAG / Apple guideline), 4px apart – the visible buttons stay 34–36px. */
@media (max-width:991px){
  html body .custom-search-container .fs-addr{
    grid-template-columns:minmax(0,1fr); padding:12px 14px 52px 14px; min-height:0;
  }
  html body .custom-search-container .fs-addr-l1{ grid-column:1; }
  html body .custom-search-container .fs-addr-l2{ grid-column:1; }
  /* hairline between text and controls */
  html body .custom-search-container .fs-addr::after{
    content:""; position:absolute; left:14px; right:14px; bottom:48px; height:1px; background:rgba(10,22,40,.07); pointer-events:none;
  }
  /* pencil: 44px touch area, 34px visible tile */
  html body .custom-search-container .fs-addr-edit{
    position:absolute; bottom:2px; right:2px; width:44px; height:44px; margin:0 !important; background:transparent; box-shadow:none; border-radius:12px;
  }
  html body .custom-search-container .fs-addr-edit::before{
    content:""; position:absolute; inset:5px; border-radius:10px; background:#fff; z-index:0;
    box-shadow:0 1px 2px rgba(10,22,40,.10), 0 0 0 1px rgba(10,22,40,.05); transition:background .15s ease;
  }
  html body .custom-search-container .fs-addr-edit svg{ position:relative; z-index:1; }
  html body .custom-search-container .fs-addr-edit:hover{ background:transparent; box-shadow:none; }
  html body .custom-search-container .fs-addr-edit:hover::before{ background:#0A1628; }
  html body .custom-search-container .fs-addr.fs-addr .fs-addr-edit:focus-visible{ outline:none !important; }   /* ring around the visible tile, not the 44px touch area */
  html body .custom-search-container .fs-addr-edit:focus-visible::before{ box-shadow:0 0 0 3px #2E9BDA, 0 1px 2px rgba(10,22,40,.10); }
  /* pickup: pencil left of the "+" (44px area each, 4px apart) */
  html body .custom-search-container #wrapper_pickup_text .fs-addr-edit{ right:50px; }
  html body .custom-search-container #wrapper_pickup_text.fs-addr-on > .add-stop-inline-btn{
    top:auto !important; bottom:6px !important; right:6px !important; transform:none !important;
  }
  html body .custom-search-container #wrapper_pickup_text.fs-addr-on > .add-stop-inline-btn::after{ content:""; position:absolute; inset:-4px; border-radius:14px; }
  /* stop: pencil left of the "x" */
  html body .custom-search-container .custom-stop-row .fs-addr{ min-height:0; }
  html body .custom-search-container .custom-stop-row .fs-addr-edit{ right:50px; }
  html body .custom-search-container .custom-stop-row .custom-input-wrapper.fs-addr-on ~ .remove-stop-btn{
    top:auto !important; bottom:4px !important; right:4px !important; transform:none !important; width:40px !important; height:40px !important;
  }
  html body .custom-search-container .custom-stop-row .custom-input-wrapper.fs-addr-on ~ .remove-stop-btn::after{ content:""; position:absolute; inset:-2px; }
  /* pin / stop number: left end of the controls row */
  html body .custom-search-container .custom-input-wrapper.fs-addr-on > .icon{ top:auto !important; bottom:10px !important; left:14px !important; transform:none !important; }   /* 28px pin, centre 24px above the bottom = controls row centre */

  /* airport / terminal fields: the full name stays visible on narrow phones (wraps instead of "…") */
  html body .custom-search-container #wrapper_dropoff_select .custom-display-trigger,
  html body .custom-search-container #wrapper_pickup_select .custom-display-trigger{
    height:auto !important; min-height:52px !important; line-height:1.3 !important; white-space:normal !important;
    overflow:visible !important; text-overflow:clip !important; display:flex !important; align-items:center !important;
    padding-top:9px !important; padding-bottom:9px !important;
  }
}

/* moment of choice: text glides in, the gold pin sends one soft ring */
html body .custom-search-container .fs-addr.fs-addr-in :is(.fs-addr-l1,.fs-addr-l2){ animation:fsAddrIn .34s cubic-bezier(.2,.8,.2,1) both; }
html body .custom-search-container .fs-addr.fs-addr-in .fs-addr-l2{ animation-delay:.04s; }
html body .custom-search-container .fs-addr.fs-addr-in .fs-addr-edit{ animation:fsAddrIn .34s .06s cubic-bezier(.2,.8,.2,1) both; }
html body .custom-search-container .custom-input-wrapper.fs-addr-pulse > .icon{ animation:fsAddrPulse .9s ease-out 1; }
@keyframes fsAddrIn{ from{ opacity:0; transform:translateY(5px); } to{ opacity:1; transform:none; } }
@keyframes fsAddrPulse{ 0%{ box-shadow:0 0 0 0 rgba(201,168,76,.55); } 100%{ box-shadow:0 0 0 12px rgba(201,168,76,0); } }

/* label row: "ABHOLADRESSE" and "Meinen Standort verwenden" never touch – the link moves under the title if needed */
html body .custom-search-container #group_pickup > label,
html body .custom-search-container #group_dropoff > label{ flex-wrap:wrap !important; row-gap:6px; column-gap:10px; }

@media (prefers-reduced-motion:reduce){
  html body .custom-search-container .fs-addr.fs-addr-in :is(.fs-addr-l1,.fs-addr-l2),
  html body .custom-search-container .fs-addr.fs-addr-in .fs-addr-edit,
  html body .custom-search-container .custom-input-wrapper.fs-addr-pulse > .icon{ animation:none; }
}
