/* =============================================
   Grüne Flotte – Schnellaktionen (FAB + Popup / Drawer)
   ============================================= */

.gf-schnell-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Floating Button ---------- */
#gf-schnellaktionen .gf-schnell-fab {
  position: fixed;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  animation: gf-fab-in 0.4s ease both;
}

#gf-schnellaktionen .gf-schnell-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

#gf-schnellaktionen .gf-schnell-fab:focus-visible {
  outline: 3px solid #82ba26;
  outline-offset: 3px;
}

#gf-schnellaktionen .gf-schnell-fab img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  pointer-events: none;
}

@keyframes gf-fab-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FAB-Positionen */
#gf-schnellaktionen.gf-pos-bottom-right .gf-schnell-fab {
  bottom: 24px;
  right: 20px;
}
#gf-schnellaktionen.gf-pos-bottom-left .gf-schnell-fab {
  bottom: 24px;
  left: 20px;
}
#gf-schnellaktionen.gf-pos-bottom-center .gf-schnell-fab {
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
}
#gf-schnellaktionen.gf-pos-bottom-center .gf-schnell-fab:hover {
  transform: translateX(-50%) scale(1.06);
}

/* ---------- Layer (Backdrop + Panel) ---------- */
#gf-schnellaktionen .gf-schnell-layer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: block;
  visibility: hidden;
  pointer-events: none;
}

#gf-schnellaktionen .gf-schnell-layer[aria-hidden="false"] {
  visibility: visible;
  pointer-events: auto;
}

#gf-schnellaktionen
  .gf-schnell-layer[aria-hidden="false"]
  .gf-schnell-backdrop {
  opacity: 1;
}

#gf-schnellaktionen .gf-schnell-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.28s ease;
}

/* ---------- Panel (gemeinsam) ---------- */
#gf-schnellaktionen .gf-schnell-panel {
  z-index: 1;
  width: 100%;
  max-width: 280px;
  background: #82ba26;
  border-radius: 12px;
  overflow: hidden;
  font-family: "Open Sans", sans-serif;
  -webkit-tap-highlight-color: transparent;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

#gf-schnellaktionen .gf-schnell-drawer-handle {
  display: none;
}

#gf-schnellaktionen .gf-schnell-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

#gf-schnellaktionen .gf-schnell-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

#gf-schnellaktionen .gf-schnell-close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ---------- Header ---------- */
#gf-schnellaktionen .gf-schnell-header {
  position: relative;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: normal;
  text-transform: uppercase;
  padding: 8px 8px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#gf-schnellaktionen .gf-schnell-header span {
  flex: 1;
}

/* ---------- Liste ---------- */
#gf-schnellaktionen .gf-schnell-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 4px solid #82ba26;
  background-color: #ffffff;
  border-radius: 12px !important;
  overflow: hidden;
}

#gf-schnellaktionen .gf-schnell-list li {
  border-bottom: 1px solid #f0f0f0;
}

#gf-schnellaktionen .gf-schnell-list li:last-child {
  border-bottom: none;
}

#gf-schnellaktionen .gf-schnell-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px;
  line-height: normal;
  font-weight: 900;
  color: #222222;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: background 0.15s ease;
}

#gf-schnellaktionen .gf-schnell-list li a .gf-schnell-arrow {
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#gf-schnellaktionen .gf-schnell-list li a:hover {
  background-color: #f6f6f6;
  color: #000000;
}

#gf-schnellaktionen .gf-schnell-list li button.gf-schnell-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  margin: 0;
  border: none;
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  line-height: normal;
  font-weight: 900;
  color: #222222;
  letter-spacing: 0.5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

#gf-schnellaktionen .gf-schnell-list li button.gf-schnell-item-btn:hover {
  background-color: #f6f6f6;
  color: #000000;
}

#gf-schnellaktionen .gf-schnell-list li button.gf-schnell-item-btn img {
  flex-shrink: 0;
}

/* ---------- Panel-Body & Servicezentrale ---------- */
#gf-schnellaktionen .gf-schnell-panel-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

#gf-schnellaktionen .gf-schnell-views-stack {
  display: block;
  min-width: 0;
}

#gf-schnellaktionen .gf-schnell-view--main[hidden],
#gf-schnellaktionen .gf-schnell-view--service[hidden] {
  display: none !important;
}

#gf-schnellaktionen .gf-schnell-service-card {
  margin: 0;
  padding: 0 16px 12px;
  border: 4px solid #82ba26;
  background-color: #ffffff;
  border-radius: 12px !important;
  overflow: hidden;
}

#gf-schnellaktionen .gf-schnell-service-heading {
  margin: 0;
  padding: 16px 16px;
  font-size: 14px;
  line-height: normal;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-align: center;
  text-transform: uppercase;
  color: #222222;
}

#gf-schnellaktionen .gf-schnell-service-photo {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 80%;
  height: auto;
  vertical-align: middle;
}

#gf-schnellaktionen .gf-schnell-service-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0 0;
}

#gf-schnellaktionen .gf-schnell-service-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: 5px;
  background: #82ba26;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

#gf-schnellaktionen .gf-schnell-service-btn:hover {
  background: #000000;
  color: #ffffff;
}

#gf-schnellaktionen .gf-schnell-service-btn img {
  flex-shrink: 0;
}

#gf-schnellaktionen .gf-schnell-service-btn--inactive {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: #c8c8c8;
}

#gf-schnellaktionen .gf-schnell-service-back {
  display: block;
  width: calc(100% - 32px);
  margin: 8px auto 0;
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #444444;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

#gf-schnellaktionen .gf-schnell-service-back:hover {
  color: #000000;
}

#gf-schnellaktionen .gf-schnell-footer {
  flex-shrink: 0;
  padding: 3px 16px 6px;
  font-size: 10px;
  line-height: normal;
  font-weight: 400;
  color: #ffffff !important;
  text-align: center;
}

/* ---------- Desktop: Popup direkt über dem FAB ---------- */
@media (min-width: 601px) {
  #gf-schnellaktionen .gf-schnell-panel {
    position: fixed;
    width: min(280px, calc(100vw - 40px));
    max-width: 280px;
    bottom: calc(24px + 56px + 12px);
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    transform-origin: bottom center;
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.22),
      0 10px 28px rgba(0, 0, 0, 0.14),
      0 2px 8px rgba(0, 0, 0, 0.08);
  }

  #gf-schnellaktionen.gf-pos-bottom-left .gf-schnell-panel {
    left: 20px;
    right: auto;
  }

  #gf-schnellaktionen.gf-pos-bottom-right .gf-schnell-panel {
    right: 20px;
    left: auto;
  }

  #gf-schnellaktionen.gf-pos-bottom-center .gf-schnell-panel {
    left: 50%;
    right: auto;
    transform: translate(-50%, 14px) scale(0.97);
    transform-origin: bottom center;
  }

  #gf-schnellaktionen .gf-schnell-layer[aria-hidden="false"] .gf-schnell-panel {
    opacity: 1;
  }

  #gf-schnellaktionen.gf-pos-bottom-left
    .gf-schnell-layer[aria-hidden="false"]
    .gf-schnell-panel,
  #gf-schnellaktionen.gf-pos-bottom-right
    .gf-schnell-layer[aria-hidden="false"]
    .gf-schnell-panel {
    transform: translateY(0) scale(1);
  }

  #gf-schnellaktionen.gf-pos-bottom-center
    .gf-schnell-layer[aria-hidden="false"]
    .gf-schnell-panel {
    transform: translate(-50%, 0) scale(1);
  }
}

/* ---------- Mobile: Drawer über dem FAB, kein X ---------- */
@media (max-width: 600px) {
  #gf-schnellaktionen .gf-schnell-layer {
    z-index: 100003;
    display: flex;
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
  }

  #gf-schnellaktionen .gf-schnell-fab {
    z-index: 100002;
  }

  #gf-schnellaktionen.gf-pos-bottom-right .gf-schnell-fab,
  #gf-schnellaktionen.gf-pos-bottom-left .gf-schnell-fab,
  #gf-schnellaktionen.gf-pos-bottom-center .gf-schnell-fab {
    bottom: 20px;
    left: 16px;
    right: auto;
    transform: none;
  }
  #gf-schnellaktionen.gf-pos-bottom-right .gf-schnell-fab {
    left: auto;
    right: 16px;
  }
  #gf-schnellaktionen.gf-pos-bottom-center .gf-schnell-fab {
    left: 50%;
    transform: translateX(-50%);
  }
  #gf-schnellaktionen.gf-pos-bottom-center .gf-schnell-fab:hover {
    transform: translateX(-50%) scale(1.06);
  }

  #gf-schnellaktionen .gf-schnell-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 16px 16px 0 0;
    /* Höhe: klassisches vh + dynamisches dvh (mobiler Browser), harte Obergrenze */
    max-height: min(88vh, 560px);
    max-height: min(90dvh, 560px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    transform-origin: center bottom;
    opacity: 0;
    transform: translateY(100%);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow:
      0 -8px 40px rgba(0, 0, 0, 0.18),
      0 -2px 12px rgba(0, 0, 0, 0.1);
    transition:
      opacity 0.3s ease,
      transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      max-height 0.42s ease;
  }

  #gf-schnellaktionen .gf-schnell-layer[aria-hidden="false"] .gf-schnell-panel {
    opacity: 1;
    transform: translateY(0);
  }

  #gf-schnellaktionen .gf-schnell-close {
    display: none;
  }

  #gf-schnellaktionen .gf-schnell-header {
    padding: 10px 16px 0px;
  }

  #gf-schnellaktionen .gf-schnell-drawer-handle {
    display: block;
    flex-shrink: 0;
    width: 40px;
    height: 5px;
    margin: 10px auto 4px;
    border-radius: 99px;
    background: #d8d8d8;
    touch-action: none;
  }

  #gf-schnellaktionen .gf-schnell-header {
    flex-shrink: 0;
    touch-action: none;
    cursor: grab;
  }

  #gf-schnellaktionen .gf-schnell-header:active {
    cursor: grabbing;
  }

  #gf-schnellaktionen .gf-schnell-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  /* Ein Scrollbereich für Liste + Service (Inhalt wächst, Drawer bleibt begrenzt) */
  #gf-schnellaktionen .gf-schnell-views-stack {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  #gf-schnellaktionen .gf-schnell-view--main,
  #gf-schnellaktionen .gf-schnell-view--service {
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  #gf-schnellaktionen .gf-schnell-list {
    flex: 0 0 auto;
    list-style: none;
    margin: 0;
    padding: 0;
    border: 8px solid #82ba26;
    background-color: #ffffff;
    border-radius: 24px !important;
    overflow-x: hidden;
    overflow-y: visible;
  }

  #gf-schnellaktionen .gf-schnell-view--service {
    padding-bottom: 8px;
  }

  #gf-schnellaktionen .gf-schnell-service-card {
    border-width: 8px;
    border-radius: 24px !important;
    padding: 0 16px 16px;
  }

  #gf-schnellaktionen .gf-schnell-footer {
    padding: 0px 16px 12px;
  }

  #gf-schnellaktionen .gf-schnell-panel.gf-schnell-panel--dragging {
    transition: none;
  }

  #gf-schnellaktionen.gf-hide-mobile {
    display: none;
  }
}
