/**
 * Template Helpers - DSGVO & Animation Safety Styles
 * 100% DSGVO-konform, isoliert und ohne Störung des Original-Layouts
 */

/* Responsive Media - Schützt Slider und Canvas-Elemente vor Verzerren */
img:not(.rev_slider img):not([class*="tp-"]):not([data-bgposition]):not([class*="slide"]),
picture:not(.rev_slider picture),
svg,
video {
  max-width: 100%;
}

/* Animations-Sicherheit: Verhindert, dass .wow-Elemente dauerhaft unsichtbar (visibility: hidden) bleiben */
.wow {
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

/* Fallback-Sichtbarkeit für animierte Blöcke (WordPress, Avada/Fusion, Elementor, Divi, WOW) */
.wow-revealed,
.fusion-animated,
.dont-animate .fusion-animated,
.do-animate .fusion-animated,
.elementor-invisible,
.fusion-body .fusion-title .fusion-animated-texts,
[data-animationtype],
.wow {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Verhindert, dass Parallax- und Hintergrund-Container leer bleiben oder zusammenfallen */
.fusion-bg-parallax {
  background-size: cover !important;
  background-position: center center !important;
  min-height: 100%;
}

/* WordPress / Avada / Elementor Header & Hintergrund-Sicherheit */
[style*="--awb-background-image"] {
  background-image: var(--awb-background-image) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}
[style*="--awb-bg-image"] {
  background-image: var(--awb-bg-image) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}
.fusion-fullwidth.desktop[style*="--awb-background-image"],
.fusion-fullwidth[style*="--awb-background-image"],
.fusion-fullwidth[style*="--awb-bg-image"],
.fusion-builder-row-1.desktop {
  min-height: 380px;
}
.header > div > .bgr {
  min-height: 380px;
}
.header > div > .bgr > div {
  min-height: 380px;
  background-size: cover !important;
  background-position: center center !important;
}
.fusion-column-wrapper.fusion-column-has-bg-image,
.fusion-layout-column[style*="--awb-bg-image"] > .fusion-column-wrapper {
  background-size: cover !important;
  background-position: center center !important;
}
@media screen and (max-width: 800px) {
  .header > div > .bgr,
  .header > div > .bgr > div,
  .fusion-fullwidth.desktop[style*="--awb-background-image"],
  .fusion-builder-row-1.desktop {
    min-height: 220px;
  }
}

/* Footer-Schutz */
footer, #rt-footer-surround, .site-footer {
  position: relative;
  z-index: 5;
  clear: both;
}

/* Optimierte Typografie ohne Überschreiben der Original-Farben */
h1, h2, h3, h4, h5, h6 {
  text-rendering: optimizeLegibility;
}

/* DSGVO 2-Click Embed Placeholder Cards */
.dsgvo-embed-card {
  position: relative;
  background: linear-gradient(145deg, #0b1329 0%, #070d1e 100%);
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 2.5rem 1.8rem;
  text-align: center;
  margin: 1.8rem auto;
  max-width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  box-sizing: border-box;
}

.dsgvo-embed-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 28px 28px, 28px 28px;
  pointer-events: none;
  opacity: 0.85;
}

.dsgvo-embed-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
  position: relative;
  z-index: 2;
}

.dsgvo-embed-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.9rem;
  position: relative;
  z-index: 2;
}

.dsgvo-embed-icon svg {
  filter: drop-shadow(0 4px 8px rgba(56, 189, 248, 0.3));
}

.dsgvo-embed-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #ffffff;
  position: relative;
  z-index: 2;
  letter-spacing: -0.2px;
}

.dsgvo-embed-desc {
  font-size: 0.9rem;
  color: #cbd5e1;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

.dsgvo-embed-desc strong {
  color: #ffffff;
}

.dsgvo-embed-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 2;
}

.dsgvo-embed-btn {
  background: linear-gradient(135deg, #009991 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 153, 145, 0.35);
  text-decoration: none;
}

.dsgvo-embed-btn:hover {
  background: linear-gradient(135deg, #00b3a9 0%, #10b981 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 153, 145, 0.5);
  color: #ffffff;
}

.dsgvo-embed-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #94a3b8;
  position: relative;
  z-index: 2;
}

.dsgvo-embed-remember {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  color: #cbd5e1;
}

.dsgvo-embed-remember input {
  accent-color: #009991;
  cursor: pointer;
}

.dsgvo-embed-ext-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.dsgvo-embed-ext-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Responsive Table Wrapper */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Form Feedback Notifications */
.form-feedback-alert {
  padding: 0.85rem 1.2rem;
  border-radius: 8px;
  font-size: 0.92rem;
  margin-top: 1rem;
  display: none;
  line-height: 1.4;
}

.form-feedback-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
}

.form-feedback-error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid #f43f5e;
  color: #fb7185;
}
