/* Isolierte Driver-Card-Sheet Styles (keine Überschneidung mit globalem Footer-Sheet).
   Schritt 1 / ohne addr-collapsed: Transform auf #indexBottomChromeStack (gesamter Block).
   Schritt 2 (addr-collapsed): nur #indexFahrerkarteHome gleitet — Buchungskarte bleibt fix. */
body.ct24-driver-sheet-v2:not(.ct24-index-ux--addr-collapsed) #indexBottomChromeStack {
  --ct24-driver-sheet-offset: 0px;
  transform: translateY(var(--ct24-driver-sheet-offset, 0px));
  transition: transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
body.ct24-driver-sheet-v2:not(.ct24-index-ux--addr-collapsed) #indexBottomChromeStack.ct24-driver-sheet--dragging {
  transition: none !important;
}
body.ct24-driver-sheet-v2.ct24-index-ux--addr-collapsed #indexBottomChromeStack {
  transform: none !important;
  transition: none !important;
}
body.ct24-driver-sheet-v2.ct24-index-ux--addr-collapsed #ct24IndexStep2Sheet {
  --ct24-driver-sheet-offset: 0px;
  transform: translateY(var(--ct24-driver-sheet-offset, 0px));
  transition: transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
body.ct24-driver-sheet-v2.ct24-index-ux--addr-collapsed #ct24IndexStep2Sheet.ct24-driver-sheet--dragging {
  transition: none !important;
}

body.ct24-driver-sheet-v2 #indexFahrerkarteHome.index-fahrerkarte-dock.index-fahrerkarte-dock--embedded {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: auto !important;
  pointer-events: auto;
  overflow: visible !important;
}
/* Griff absolut top:-10px — sonst überlappt er Fahrername / Kartenkopf */
body.ct24-driver-sheet-v2:not(.ct24-is-buchung-page)
  #indexFahrerkarteHome.index-fahrerkarte-dock--embedded:has(#fahrerkarte:not([hidden])) {
  padding-top: 26px !important;
}

body.ct24-driver-sheet-v2 #indexFahrerkarteHome #indexFahrerkarteSheetHandle {
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  box-sizing: border-box;
  min-width: 44px;
  width: max-content;
  max-width: min(220px, calc(100vw - 36px));
  min-height: 28px;
  height: auto;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.08);
  color: #0a0a0a;
  z-index: 50;
  pointer-events: auto;
  padding: 5px 10px 5px 9px;
  margin: 0;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
body.ct24-driver-sheet-v2 #indexFahrerkarteHome #indexFahrerkarteSheetHandle:focus {
  outline: none;
}
body.ct24-driver-sheet-v2 #indexFahrerkarteHome #indexFahrerkarteSheetHandle:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 2px;
}
body.ct24-driver-sheet-v2 #indexFahrerkarteHome #indexFahrerkarteSheetHandle .index-fahrerkarte-sheet-handle__tel {
  pointer-events: none;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: currentColor;
  line-height: 0;
  padding: 0;
  margin: 0;
}
body.ct24-driver-sheet-v2 #indexFahrerkarteHome #indexFahrerkarteSheetHandle .index-fahrerkarte-sheet-handle__tel svg {
  width: 16px;
  height: 16px;
  display: block;
}
body.ct24-driver-sheet-v2 #indexFahrerkarteHome #indexFahrerkarteSheetHandle .index-fahrerkarte-sheet-handle__num {
  pointer-events: auto;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 11.5rem;
  font-family: inherit;
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-tap-highlight-color: transparent;
}
body.ct24-driver-sheet-v2 #indexFahrerkarteHome #indexFahrerkarteSheetHandle .index-fahrerkarte-sheet-handle__num:active {
  color: #404040;
  opacity: 0.92;
}

body.ct24-driver-sheet-v2 #indexFahrerkarteHome #indexFahrerkarteDragZone {
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 34px;
  z-index: 35;
  pointer-events: auto;
  cursor: ns-resize;
  touch-action: none;
}

body.ct24-driver-sheet-v2 #indexFahrerkarteHome:not(:has(#fahrerkarte:not([hidden]))) #indexFahrerkarteSheetHandle {
  display: none;
}

body.ct24-driver-sheet-v2.ct24-is-buchung-page #indexFahrerkarteHome #indexFahrerkarteSheetHandle {
  display: none !important;
}

body.ct24-driver-sheet-v2 #indexFahrerkarteHome #fahrerkarte:not([hidden]) {
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

/* Adresskarte: Chat-Griff am unteren Rand — gleiche Logik wie #indexFahrerkarteSheetHandle (top:-10px), hier bottom:-10px */
body.ct24-driver-sheet-v2 #indexBottomChromeStack > .index-loc-shell.location-card {
  position: relative !important;
  overflow: visible !important;
}

body.ct24-driver-sheet-v2 #indexDestChatGriff.index-loc-sheet-handle--chat {
  display: none;
}

/* Sichtbar + Position: Spiegel zu #indexFahrerkarteSheetHandle (top:-10px / zentriert) */
body.ct24-driver-sheet-v2:not(.ct24-is-buchung-page).ct24-index-ux--addr-only
  #indexBottomChromeStack
  > .index-loc-shell.location-card
  #indexDestChatGriff.index-loc-sheet-handle--chat {
  display: inline-flex;
  position: absolute;
  left: 50%;
  bottom: -10px;
  top: auto;
  transform: translateX(-50%);
  box-sizing: border-box;
  min-width: 44px;
  width: max-content;
  max-width: min(280px, calc(100vw - 36px));
  min-height: 28px;
  height: auto;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.08);
  color: #0a0a0a;
  z-index: 50;
  pointer-events: auto;
  padding: 5px 10px 5px 9px;
  margin: 0;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  appearance: none;
  -webkit-appearance: none;
}
body.ct24-driver-sheet-v2 #indexBottomChromeStack > .index-loc-shell.location-card #indexDestChatGriff.index-loc-sheet-handle--chat:focus {
  outline: none;
}
body.ct24-driver-sheet-v2 #indexBottomChromeStack > .index-loc-shell.location-card #indexDestChatGriff.index-loc-sheet-handle--chat:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 2px;
}
body.ct24-driver-sheet-v2 #indexBottomChromeStack > .index-loc-shell.location-card #indexDestChatGriff.index-loc-sheet-handle--chat:active {
  opacity: 0.92;
}
body.ct24-driver-sheet-v2
  #indexBottomChromeStack
  > .index-loc-shell.location-card
  #indexDestChatGriff.index-loc-sheet-handle--chat
  .index-loc-sheet-handle__ic {
  pointer-events: none;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: currentColor;
  line-height: 0;
  padding: 0;
  margin: 0;
}
body.ct24-driver-sheet-v2
  #indexBottomChromeStack
  > .index-loc-shell.location-card
  #indexDestChatGriff.index-loc-sheet-handle--chat
  .index-loc-sheet-handle__ic
  svg {
  width: 16px;
  height: 16px;
  display: block;
}
body.ct24-driver-sheet-v2
  #indexBottomChromeStack
  > .index-loc-shell.location-card
  #indexDestChatGriff.index-loc-sheet-handle--chat
  .index-loc-sheet-handle__lbl {
  pointer-events: none;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 13rem;
  font-family: inherit;
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.ct24-driver-sheet-v2.ct24-is-buchung-page #indexDestChatGriff.index-loc-sheet-handle--chat {
  display: none !important;
}

/*
 * Index Float-Chat: nur die Fahrerkarte (#indexFahrerkarteHome) sitzt unter dem Chat-Band;
 * Zahlung/Jetzt buchen (#ct24IndexStep2Sheet footer) bleiben im unteren Dock (volle Dock-Breite).
 * Oberkante: JS `--ct24-index-chat-sheet-bottom` (gleiche horizontale Logik wie #ct24IndexChatSheetRoot).
 */
body.ct24-driver-sheet-v2.ct24-index-chat-float-layout:not(.ct24-is-buchung-page)
  #indexFahrerkarteHome.index-fahrerkarte-dock.index-fahrerkarte-dock--embedded {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  width: min(
      560px,
      calc(
        100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) -
          2 * var(--ct24-index-booking-dock-inset-x, 22px)
      )
    ) !important;
  max-width: min(
      560px,
      calc(
        100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) -
          2 * var(--ct24-index-booking-dock-inset-x, 22px)
      )
    ) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  top: calc(
    var(--ct24-index-chat-sheet-bottom, 260px) + var(--ct24-index-chat-to-driver-gap, 10px)
  ) !important;
  /* Über Buchungsfuß im gleichen Stack; unter Chat (#ct24IndexChatSheetRoot ~70) */
  z-index: 68 !important;
  transition: transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
}
body.ct24-driver-sheet-v2.ct24-index-chat-float-layout:not(.ct24-is-buchung-page)
  #indexFahrerkarteHome.index-fahrerkarte-dock.ct24-driver-sheet--dragging {
  transition: none !important;
}

/*
 * Float-Chat: Stylesheet-Translate auf Stack/Step2 würde einen neuen Bezug für fixed Kinder erzeugen
 * (translateY(0) zählt). Ohne diese Override sitzt die Karte geometrisch falsch — oft unter den Buttons.
 */
body.ct24-driver-sheet-v2.ct24-index-chat-float-layout:not(.ct24-is-buchung-page)
  #indexBottomChromeStack.index-bottom-chrome-stack {
  transform: none !important;
  will-change: auto !important;
}
body.ct24-driver-sheet-v2.ct24-index-chat-float-layout:not(.ct24-is-buchung-page)
  #ct24IndexStep2Sheet.ct24-index-step2-sheet {
  transform: none !important;
}
/* Buchungszeile bleibt unten bedienbar, unter der schwebenden Karte */
body.ct24-driver-sheet-v2.ct24-index-chat-float-layout:not(.ct24-is-buchung-page)
  #ct24IndexStep2Sheet.ct24-index-step2-sheet
  > footer.booking-footer.ct24-index-step2-book-footer {
  position: relative;
  z-index: 1;
}
