/*
Theme Name: Avada Child
Description: Child theme for Avada theme
Author: ThemeFusion
Author URI: https://theme-fusion.com
Template: Avada
Version: 1.0.1
Text Domain:  Avada
*/

/* =============================================
   FIXES
   Stand: 04.03.2026
   ============================================= */

/* Fix: Fullwidth-Container Hintergrund sofort sichtbar.
   Avada setzt .fusion-animated auf visibility:hidden bis JS triggert.
   Container sofort sichtbar machen, Inhalt wird weiterhin animiert. */
.fusion-fullwidth.fusion-animated {
  visibility: visible !important;
}

/* =============================================
   RESPONSIVE FIXES - Mobile (Samsung S22 etc.)
   ============================================= */

/* Fix: Mobiles Menue darf nicht breiter als Viewport sein */
.awb-menu.collapse-enabled {
  min-width: min(500px, 100vw) !important;
}

/* Fix: inline-size -webkit-fill-available entfernen (verursacht Overflow) */
@media screen and (max-width: 600px) {
  p {
    inline-size: auto !important;
  }
}

/* Fixes fuer Screens <= 640px (typische Mobile-Breakpoint) */
@media screen and (max-width: 640px) {
  /* Genereller Overflow-Schutz */
  body,
  #wrapper,
  #main {
    overflow-x: hidden;
  }

  .fusion-row {
    max-width: 100vw;
  }

  /* Alle Fusion-Rows mit width > 100%: auf Mobile begrenzen */
  .fusion-builder-row.fusion-row {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Header-Row: width > 100% Overflow verhindern */
  .fusion-header .fusion-row,
  .fusion-tb-header .fusion-row {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Menue-Dropdown nicht ueber Viewport hinaus */
  #menu-premium-schlafen-main-menue-1 {
    left: 0 !important;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Hauptmenue-Panel nicht breiter als Viewport */
  #menu-premium-schlafen-main-menue {
    max-width: 100vw !important;
  }

  /* Tooltip Overflow verhindern */
  [aria-label][role~=tooltip]:after {
    padding-right: 1em !important;
    margin-right: 0 !important;
    white-space: normal !important;
    max-width: 200px;
  }

  /* Bilder responsive */
  .fusion-imageframe img {
    width: 100%;
    height: auto;
  }

  /* wcConfigurator Overflow: margin-left verursacht Ueberlauf */
  [class*="wcConfigurator"] {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Fullwidth-Boxen: negative Margins auf Mobile entfernen */
  .fullwidth-box .fusion-row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Fixes fuer kleine Smartphones <= 480px (Samsung S22 = 360px) */
@media screen and (max-width: 480px) {
  /* Sticky Social Icons: position & groesse anpassen */
  #sticky-social-icons-container {
    left: auto !important;
    right: 0 !important;
  }

  .social-icon {
    width: 50px;
  }

  #sticky-social-icons-container li a {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
}
