/**
 * SE TTS Player v5.2.3
 * (c) SoftENGINE GmbH
 */

/* Reset */
#setp-player,
#setp-player *,
#setp-help,
#setp-help * {
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  line-height: 1.4 !important;
}

/* ========================================
   PLAYER CONTAINER
   ======================================== */
#setp-player {
  position: fixed !important;
  z-index: 2147483647 !important;
  right: 20px;
  top: 90px;
  left: auto;
  bottom: auto;
  height: 54px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  font-size: 12px !important;
  background: transparent !important;
  border-radius: 27px !important;
  overflow: visible !important;
}

#setp-player:not(.setp-open) {
  width: 54px !important;
}

#setp-player.setp-open {
  width: auto !important;
  max-width: calc(100vw - 40px) !important;
  background: rgba(0, 30, 28, 0.97) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}

/* ========================================
   PULSIERENDER SCHATTEN - Vorlesen
   ======================================== */

#setp-toggle {
  position: relative !important;
  overflow: visible !important;
}

#setp-speaker {
  position: relative !important;
  z-index: 2 !important;
}

#setp-toggle::after {
  content: "" !important;
  position: absolute !important;
  inset: -6px !important;
  border-radius: 999px !important;
  pointer-events: none !important;
  opacity: 0 !important;
  z-index: 1 !important;
  box-shadow:
    0 0 0 0 rgba(0, 135, 131, 0.95),
    0 0 16px rgba(0, 135, 131, 0.90),
    0 0 32px rgba(0, 135, 131, 0.60) !important;
}

#setp-player.setp-speaking #setp-toggle::after {
  opacity: 1 !important;
  animation: setp-pulse var(--setp-pulse-duration, 0.9s) ease-out infinite !important;
}

@keyframes setp-pulse {
  0% {
    transform: scale(0.92);
    box-shadow:
      0 0 0 0 rgba(0, 135, 131, 0.85),
      0 0 16px rgba(0, 135, 131, 0.90),
      0 0 32px rgba(0, 135, 131, 0.60);
    opacity: 1;
  }
  65% {
    transform: scale(1.10);
    box-shadow:
      0 0 0 16px rgba(0, 135, 131, 0.00),
      0 0 22px rgba(0, 135, 131, 0.55),
      0 0 44px rgba(0, 135, 131, 0.35);
    opacity: 0.70;
  }
  100% {
    transform: scale(1.14);
    box-shadow:
      0 0 0 22px rgba(0, 135, 131, 0.00),
      0 0 24px rgba(0, 135, 131, 0.35),
      0 0 48px rgba(0, 135, 131, 0.20);
    opacity: 0.25;
  }
}


/* ========================================
   TOGGLE (Lautsprecher)
   ======================================== */
#setp-toggle {
  order: 99 !important;
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  flex-shrink: 0 !important;
  background: linear-gradient(145deg, #002220, #007872) !important;
  border-radius: 27px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 15px rgba(0, 100, 100, 0.5) !important;
  transition: box-shadow 0.2s !important;
}

#setp-toggle:hover {
  box-shadow: 0 4px 20px rgba(0, 212, 206, 0.7) !important;
}

#setp-player.setp-open #setp-toggle {
  background: rgba(0, 60, 58, 0.5) !important;
}

#setp-player.setp-open:not(.setp-speaking) #setp-toggle {
  box-shadow: none !important;
}

#setp-speaker {
  width: 36px !important;
  height: 36px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#setp-speaker svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
}

/* ========================================
   PANEL
   ======================================== */
#setp-panel {
  order: 1 !important;
  display: none !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 15px !important;
  height: 100% !important;
}

#setp-player.setp-open #setp-panel {
  display: flex !important;
}

/* ========================================
   BUTTONS
   ======================================== */
#setp-panel button {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 50% !important;
  color: #fff !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#setp-panel button:hover {
  background: rgba(0, 0, 0, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

#setp-panel button svg {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
}

#setp-panel button[data-setp="info"] strong {
  font-size: 16px !important;
  font-weight: 700 !important;
  font-style: italic !important;
  font-family: Georgia, serif !important;
  color: #fff !important;
}

#setp-drag { cursor: grab !important; }
#setp-drag:active { cursor: grabbing !important; }

/* ========================================
   CONTROLS
   ======================================== */
.setp-control {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 32px !important;
  white-space: nowrap !important;
}

.setp-control label {
  color: #b8e0de !important;
  font-size: 11px !important;
}

#setp-vol {
  width: 60px !important;
  height: 4px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 2px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  cursor: pointer !important;
}

#setp-vol::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  width: 14px !important;
  height: 14px !important;
  background: #00d4ce !important;
  border-radius: 50% !important;
}

#setp-vol::-moz-range-thumb {
  width: 14px !important;
  height: 14px !important;
  background: #00d4ce !important;
  border-radius: 50% !important;
  border: none !important;
}

#setp-voice {
  height: 28px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  cursor: pointer !important;
  max-width: 150px !important;
}

#setp-voice option {
  background: #1a2a2c !important;
  color: #fff !important;
}

#setp-status {
  color: #7ed4d0 !important;
  font-size: 11px !important;
  min-width: 50px !important;
  text-align: center !important;
}

/* ========================================
   HELP PANEL - Popup über dem Player
   ======================================== */
#setp-help {
  position: fixed !important;
  z-index: 2147483646 !important;
  background: rgba(8, 18, 20, 0.98) !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5) !important;
  color: #e8f4f4 !important;
  display: none !important;
  /* Größe wird per JS gesetzt */
}

#setp-help.setp-visible {
  display: block !important;
}

#setp-help-inner {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 220px !important;
}

#setp-help-left {
  flex: 1 !important;
  padding: 18px 22px !important;
  overflow-y: auto !important;
}

#setp-help-left h3 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0 0 12px 0 !important;
}

#setp-help-left dl {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  gap: 6px 14px !important;
  align-items: center !important;
  margin: 0 0 16px 0 !important;
}

#setp-help-left dt {
  color: #00bfb8 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
}

#setp-help-left dd {
  font-size: 12px !important;
  color: #c8e4e4 !important;
}


#setp-help-left .setp-help-note {
  font-size: 12px !important;
  color: #fff !important;
  margin: 10px 0 0 0 !important;
}

#setp-help-sep {
  width: 1px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  align-self: stretch !important;
}

#setp-help-right {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
}

.setp-ad-placeholder {
  width: 100% !important;
  height: 100% !important;
  min-height: 120px !important;
  border: 1px dashed rgba(255, 255, 255, 0.25) !important;
  border-radius: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  color: #6aada9 !important;
  font-size: 14px !important;
}

.setp-ad-placeholder small {
  font-size: 11px !important;
  opacity: 0.7 !important;
}

/* Google Translate verstecken */
#google_translate_element,
.goog-te-banner-frame,
.skiptranslate,
.goog-te-gadget {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

body { top: 0 !important; }

/* Responsive */
@media (max-width: 600px) {
  #setp-panel { gap: 5px !important; padding: 0 8px !important; }
  #setp-vol { width: 40px !important; }
  #setp-voice { max-width: 100px !important; }
}
