/* ============================================================
   Ihrschmuckankauf.de — UI Elements
   WhatsApp · Scroll-to-Top · Barrierefreiheit-Panel
   ============================================================ */

/* ── Gemeinsame Floating-Buttons ───────────────────────────── */
.fab-stack {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  z-index: 10010;
}

.fab-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 16px rgba(0,0,0,0.12);
  position: relative;
  text-decoration: none;
  color: inherit;
  outline: none;
}
.fab-btn:focus-visible {
  outline: 2px solid #343434;
  outline-offset: 3px;
}

/* Tooltip */
.fab-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 0.6rem);
  top: 50%;
  transform: translateY(-50%);
  background: #343434;
  border: 1px solid #333333;
  color: #F5F5F5;
  font-family: Roboto, sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.fab-btn:hover::before,
.fab-btn:focus-visible::before { opacity: 1; }

/* ── Scroll-to-Top ─────────────────────────────────────────── */
#scroll-top-btn {
  background: #343434;
  border: 1px solid #4A4A4A;
  color: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  box-shadow: 0 3px 14px rgba(0,0,0,0.25);
}
#scroll-top-btn.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
#scroll-top-btn:hover {
  background: #1E1E1E;
  border-color: #1E1E1E;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}

/* ── Barrierefreiheit-Button ───────────────────────────────── */
#accessibility-btn {
  background: #343434;
  border: 1px solid #4A4A4A;
  color: #FFFFFF;
  box-shadow: 0 3px 14px rgba(0,0,0,0.25);
}
#accessibility-btn:hover,
#accessibility-btn.active {
  background: #1E1E1E;
  border-color: #1E1E1E;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}

/* ── Barrierefreiheit-Panel ────────────────────────────────── */
#accessibility-panel {
  position: fixed;
  bottom: calc(1.75rem + 48px + 0.75rem + 48px + 1rem);
  right: 1.75rem;
  z-index: 10011;
  width: 300px;
  max-height: calc(100dvh - 1.75rem - 48px - 0.75rem - 48px - 1rem - 1rem);
  background: #FFFFFF;
  border: 1px solid #D0D0D0;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
  font-family: Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#accessibility-panel.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

#accessibility-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #343434 40%, #555555 50%, #343434 60%, transparent);
}

.acc-panel__header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #E0E0E0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.acc-panel__title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #343434;
}
.acc-panel__close {
  background: none;
  border: none;
  color: #666666;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem;
  line-height: 1;
  transition: color 0.2s;
}
.acc-panel__close:hover { color: #343434; }

.acc-panel__body {
  padding: 0.75rem 0;
  overflow-y: auto;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: #D0D0D0 #FFFFFF;
}
.acc-panel__body::-webkit-scrollbar { width: 4px; }
.acc-panel__body::-webkit-scrollbar-track { background: #FFFFFF; }
.acc-panel__body::-webkit-scrollbar-thumb {
  background: #D0D0D0;
  border-radius: 2px;
}
.acc-panel__body::-webkit-scrollbar-thumb:hover { background: #343434; }

.acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  gap: 0.75rem;
  transition: background 0.2s;
}
.acc-row:hover { background: rgba(0,0,0,0.04); }

.acc-row__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #343434;
  flex: 1;
}
.acc-row__icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: #666666;
}
.acc-row__desc {
  font-size: 0.75rem;
  color: #666666;
  display: block;
  margin-top: 0.1rem;
}

/* Toggle */
.acc-toggle { position: relative; flex-shrink: 0; }
.acc-toggle input[type="checkbox"] {
  opacity: 0; width: 0; height: 0; position: absolute;
}
.acc-toggle__slider {
  display: block;
  width: 40px; height: 22px;
  background: #D0D0D0;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.25s;
  position: relative;
}
.acc-toggle__slider::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: all 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.acc-toggle input:checked + .acc-toggle__slider { background: #343434; }
.acc-toggle input:checked + .acc-toggle__slider::after {
  background: #FFFFFF;
  transform: translateX(18px);
  box-shadow: 0 1px 6px rgba(0,0,0,0.35);
}

/* Schriftgröße */
.acc-fontsize { display: flex; align-items: center; gap: 0.5rem; }
.acc-fontsize__btn {
  width: 28px; height: 28px;
  background: #F8F8F8;
  border: 1px solid #D0D0D0;
  border-radius: 4px;
  color: #666666;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.acc-fontsize__btn:hover { border-color: #343434; color: #343434; }
.acc-fontsize__value {
  font-size: 0.82rem;
  color: #343434;
  min-width: 32px;
  text-align: center;
  font-weight: 700;
}

.acc-panel__reset {
  flex-shrink: 0;
  margin: 0.5rem 1.25rem 0.75rem;
  width: calc(100% - 2.5rem);
  background: transparent;
  border: 1px solid #D0D0D0;
  border-radius: 6px;
  color: #666666;
  padding: 0.5rem;
  font-family: Roboto, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.acc-panel__reset:hover { border-color: #343434; color: #343434; }

/* ── Anruf Floating Button ──────────────────────────────────── */
#call-btn {
  background: #343434;
  color: #FFFFFF;
  border: 1px solid #4A4A4A;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
}
#call-btn:hover {
  background: #1E1E1E;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  color: #FFFFFF;
}
#call-btn::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  animation: call-pulse 2.5s ease-out infinite;
}
@keyframes call-pulse {
  0%   { transform: scale(1); opacity: 0.6; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
#call-btn::before {
  background: #1E1E1E;
  border-color: #4A4A4A;
  color: #FFFFFF;
  font-size: 0.78rem;
  padding: 0.5rem 0.8rem;
  max-width: 180px;
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}

/* ── Accessibility CSS-Klassen ─────────────────────────────── */
html.acc-large-text { font-size: 120%; }

html.acc-high-contrast { filter: contrast(1.5); }
html.acc-high-contrast body { background: #FFFFFF !important; color: #000 !important; }
html.acc-high-contrast a { color: #343434 !important; }
html.acc-high-contrast .navbar {
  background: #FFFFFF !important;
  border-bottom-color: #343434 !important;
}

html.acc-reduce-motion *,
html.acc-reduce-motion *::before,
html.acc-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

html.acc-readable-font,
html.acc-readable-font body,
html.acc-readable-font * {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.03em !important;
}

html.acc-line-height body,
html.acc-line-height p,
html.acc-line-height li,
html.acc-line-height td { line-height: 2 !important; }

html.acc-underline-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

html.acc-big-cursor,
html.acc-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M8 2l18 14-8 1 5 9-3 2-5-9-7 5z' fill='%23A67C2E' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E") 2 2, auto !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Tooltips ausblenden auf Touch-Geräten (kein Hover) */
  .fab-btn::before { display: none; }
}

@media (max-width: 480px) {
  .fab-stack { bottom: 1rem; right: 1rem; gap: 0.6rem; }
  .fab-btn { width: 44px; height: 44px; }
  #call-btn { width: 52px; height: 52px; font-size: 1.25rem; }

  #accessibility-panel {
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 12px 12px 0 0;
    bottom: 0;
    transform: translateY(100%) scale(1);
    transform-origin: bottom center;
    max-height: 75dvh;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
  #accessibility-panel.open {
    transform: translateY(0) scale(1);
  }
}
