/* Container is always 100x155, scaled by widget_scale */
.bwc{
  width: 100px;
  height: 155px;
  transform: scale(calc(var(--bwc-widget-scale, 100) / 100));
  transform-origin: top right;
  position: relative;
}
.bwc__btn{
  all: unset;
  width: 100%;
  height: 100%;
  cursor: pointer;
  display:block;
}
.bwc__inner{
  width:100%;
  height:100%;
  box-sizing:border-box;
  border: var(--bwc-border, 0px) solid var(--bwc-border-color, #e5e7eb);
  border-radius: var(--bwc-radius, 12px);
  background: var(--bwc-bg, #0f5a2a);
  color: var(--bwc-text, #fff);
  font: var(--bwc-font, 10px)/1.2 Arial, sans-serif;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  padding: 8px;
  gap: 6px;
  overflow:hidden;
}
.bwc__logo{
  width: 100%;
  max-width: 92px;
  height:auto;
  transform: scale(calc(var(--bwc-seal-scale, 85%) / 100)) translateY(var(--bwc-offset-y, 0px));
  transform-origin: top center;
}
.bwc__company{
  font-size: var(--bwc-company-fs, 12px) !important;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-transform: none;
  text-align:center;
}
.bwc__stars{letter-spacing:1px}
.bwc__labels{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:4px;
  width:100%;
  text-align:center;
  font-weight:700;
  text-transform:uppercase;
}
.bwc__label{color:inherit;text-decoration:none}
.bwc__label:hover{text-decoration:underline}

/* Popup */
.bwc-popup{position:fixed;inset:0;display:none;z-index:999999  
  border-radius: var(--bwc-radius, 12px);
}
.bwc-popup[aria-hidden="false"]{display:block}
.bwc-popup__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45)}
.bwc-popup__panel{
  position:relative;
  margin: 10vh auto 0 auto;
  width: min(420px, 92vw);
  background:#fff;
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  border-radius: var(--bwc-radius, 12px);
  overflow: hidden;
}
.bwc-popup__menu{display:flex;flex-direction:column}
.bwc-popup__item{
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  color:#111;
  text-decoration:none;
  font: 14px/1.2 Arial, sans-serif;
  text-transform:none;
  letter-spacing:0.5px;
}
.bwc-popup__item:hover{background:rgba(0,0,0,0.03)}


/* 10.1.19: Firmenname zentriert über dem Siegel */
.bwc{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.bwc-company{
  margin-bottom:6px;
  text-align:center;
  font-weight:600;
}


/* 10.2.0: Floating widget positioning */
.bwc--floating{
  position: fixed;
  z-index: 999999;
  /* keep scale transform from existing widget sizing */
}
.bwc--floating{
  right: var(--bwc-offx, 20px);
  bottom: var(--bwc-offy, 20px);
}
.bwc--floating{ /* default anchor */
  transform-origin: bottom right;
}
.bwc--floating[style*="--bwc-fpos:lb"]{
  left: var(--bwc-offx, 20px);
  right: auto;
  bottom: var(--bwc-offy, 20px);
  transform-origin: bottom left;
}
.bwc--floating[style*="--bwc-fpos:rm"]{
  right: var(--bwc-offx, 20px);
  left: auto;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%) scale(calc(var(--bwc-widget-scale, 100) / 100));
  transform-origin: center right;
}
.bwc--floating[style*="--bwc-fpos:lm"]{
  left: var(--bwc-offx, 20px);
  right: auto;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%) scale(calc(var(--bwc-widget-scale, 100) / 100));
  transform-origin: center left;
}
/* Ensure normal (non-middle) keeps existing scaling transform */
.bwc--floating:not([style*="--bwc-fpos:rm"]):not([style*="--bwc-fpos:lm"]){
  transform: scale(calc(var(--bwc-widget-scale, 100) / 100));
}


/* 10.2.2: Labels nicht fett und ca. 1pt kleiner als Firmenname */
.bwc__company{
  font-size: var(--bwc-company-fs, 12px) !important;
  text-align:center;
}
.bwc__labels{
  font-weight: 400;
  text-transform: none;
}


/* 10.2.3: Vertikaler Offset für Sterne + Labels Block */
.bwc__stars,
.bwc__labels{
  transform: translateY(var(--bwc-stars-offy, 0px));
}


/* 10.2.5: Popup gleiche Breite/Farbe wie Widget, öffnet nach oben */
.bwc-popup{
  width: 100%;
  background: var(--bwc-bg, #111827);
  color: var(--bwc-text, #ffffff);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  box-sizing: border-box;
}
.bwc--floating{
  /* ensure popup positions relative to widget */
  position: fixed;
}
.bwc--floating .bwc-popup{
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px); /* opens upward */
  top: auto;
  max-width: none;
}
.bwc--floating .bwc-popup:after{
  content:'';
  position:absolute;
  left: 18px;
  bottom: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--bwc-bg, #111827);
}


/* 10.3.5: Popup als Popover (gleiche Breite/Farbe wie Widget, öffnet nach oben) */
[data-bwc]{ position: relative; }

.bwc-popup{
  position: absolute !important;
  inset: auto !important;
  left: 0 !important;
  right: 0 !important;
  bottom: calc(100% + 8px) !important;
  top: auto !important;
  display: none;
  z-index: 999999;
}

.bwc-popup[aria-hidden="false"]{ display:block; }

/* Kein Vollbild-Backdrop mehr */
.bwc-popup__backdrop{ display:none !important; }

.bwc-popup__panel{
  margin: 0 !important;
  width: 100% !important;
  background: var(--bwc-bg, #111827) !important;
  color: var(--bwc-text, #ffffff) !important;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--bwc-radius, 12px);
  overflow: hidden;
}

/* Menü-Items übernehmen Textfarbe */
.bwc-popup__item{
  color: var(--bwc-text, #ffffff) !important;
}

.bwc-popup__item:hover{
  background: rgba(255,255,255,.08) !important;
}

/* kleiner Pfeil nach unten zum Widget */
.bwc-popup__panel:after{
  content:'';
  position:absolute;
  left: 22px;
  bottom: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--bwc-bg, #111827);
}


/* 10.3.6: Fix – Floating Widget muss fixed bleiben (Popup bleibt trotzdem verankert) */
.bwc--floating{
  position: fixed !important;
}
.bwc:not(.bwc--floating){
  position: relative;
}


/* 10.3.7: Popup Typo & Höhe */
.bwc-popup__panel{
  max-height: 155px;
  overflow-y: auto;
  border-radius: var(--bwc-radius, 12px);
  overflow: hidden;
}

/* gleiche Schriftgröße wie Labels (Käuferschutz / Garantie) */
.bwc-popup__item{
  font-size: var(--bwc-font, 12px);
  font-weight: 400;
  line-height: 1.2;
  padding: 10px 14px;
}


/* 10.3.9: Popup kompakter, keine Trennlinien */
.bwc-popup__item{
  padding: 8px 12px !important;
  border-bottom: none !important;
  font-size: var(--bwc-font, 12px) !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.15;
}


/* 10.4.8: Immer 6 Punkte -> passt ohne Scrollen in 155px */
.bwc-popup__panel{
  max-height: 155px !important;
  overflow: hidden !important;
  border-radius: var(--bwc-radius, 12px);
  overflow: hidden;
}
.bwc-popup__item{
  padding: 4px 10px !important;
  border-bottom: none !important;
  line-height: 1.05 !important;
}


/* 10.4.9: Popup Fix-Höhe & feinere Typo */
.bwc-popup__panel{
  height: 155px !important;
  max-height: 155px !important;
  overflow: hidden !important;
  border-radius: var(--bwc-radius, 12px);
  overflow: hidden;
}

/* Schrift 1pt kleiner + 3px nach links */
.bwc-popup__item{
  padding-left: calc(10px - 3px) !important; /* 3px nach links */
}


/* 10.5.0: Drei waagerechte Punkte oben rechts */
.bwc-header{
  position: relative;
}
.bwc-more-dots{
  position:absolute;
  top:6px;
  right:6px;
  width:18px;
  height:12px;
  padding:0;
  background:none;
  border:0;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.bwc-more-dots span{
  display:block;
  width:18px;
  height:2px;
  background:currentColor;
  border-radius:2px;
  opacity:.9;
}


/* 10.5.1: Popup 6 Punkte automatisch auf 155px verteilen & vertikal zentrieren */
.bwc-popup__panel{
  height:155px !important;
  display:flex;
  border-radius: var(--bwc-radius, 12px);
  overflow: hidden;
}

.bwc-popup__list{
  display:flex;
  flex-direction:column;
  justify-content:space-evenly; /* verteilt 6 Punkte automatisch */
  width:100%;
}

/* Fallback falls kein List-Wrapper existiert */
.bwc-popup__panel > *{
  width:100%;
}


/* 10.5.2: Drei waagerechte Punkte im Widget (oben rechts) */
.bwc__inner{ position: relative; }
.bwc__dots{
  position:absolute;
  top:6px;
  right:6px;
  width:18px;
  height:12px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  pointer-events:none; /* Klick bleibt auf dem Button */
  opacity:.9;
}
.bwc__dots span{
  display:block;
  width:18px;
  height:2px;
  background: currentColor;
  border-radius:2px;
}


/* 10.5.3: Mini-Hamburger (sehr klein) */
.bwc__dots{
  width:8px;
  height:8px;
  top:6px;
  right:6px;
}
.bwc__dots span{
  width:4px;
  height:1px;
  margin:0 auto;
}


/* 10.5.4: Popup vertikal sauber zentrieren (6 Einträge) */
.bwc-popup__panel{
  height:155px !important;
  display:flex !important;
  align-items:stretch;
  border-radius: var(--bwc-radius, 12px);
  overflow: hidden;
}

.bwc-popup__list{
  flex:1;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important; /* Zentrum */
  padding: 0 !important;
}

/* Jeder Eintrag bekommt exakt 155/6 px Höhe */
.bwc-popup__item{
  height: calc(155px / 6) !important;
  display:flex !important;
  align-items:center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}


/* 10.5.5: Hamburger etwas breiter & nach rechts */
.bwc__dots{
  right: calc(6px - 3px); /* 3px weiter nach rechts */
}
.bwc__dots span{
  width:7px; /* 4px + 3px */
}


/* 10.5.6: Hamburger vertikaler Abstand 3px */
.bwc__dots{
  height:7px; /* kompakter */
}
.bwc__dots span{
  margin:0 auto;
}
.bwc__dots{
  justify-content: space-between;
}

.bwc__company{font-size: var(--bwc-company-fs, 12px) !important;}

/* Popup Panel: gleiche Randkrümmung wie Widget */
.bwc-popup__panel{border-radius:var(--bwc-radius,12px)!important;overflow:hidden;}

/* Popup Bereinigung: nur Panel sichtbar */
.bwc-popup{
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.bwc-popup__panel{
  background: var(--bwc-bg, #fff);
}

/* Popup Schriftgröße = Labels (Käuferschutz / Garantie) */
.bwc-popup__panel,
.bwc-popup__panel li,
.bwc-popup__panel a {
  font-size: var(--bwc-label-fs, 11px);
  line-height: 1.3;
}

/* Hamburger insgesamt 30px nach unten */
.bwc-hamburger{
  top: calc( var(--bwc-hamburger-top, 0px) + 30px );
}

/* Hamburger (drei Striche) 30px nach unten – korrektes Element */
.bwc__dots{transform: translateY(30px) !important;}

/* Popup: max. Höhe 155px, Abstände wie Labels, oben/unten mehr Rand */
.bwc-popup__panel{
  max-height: 155px;
  padding-top: 14px;
  padding-bottom: 14px;
  box-sizing: border-box;
}

.bwc-popup__panel ul{
  margin: 0;
  padding: 0;
}

.bwc-popup__panel ul li{
  margin: 0 0 6px 0; /* gleicher Abstand wie Label 1 / Label 2 */
}

.bwc-popup__panel ul li:last-child{
  margin-bottom: 0;
}

/* Review form */
.bwc-review__form input, .bwc-review__form select, .bwc-review__form textarea{padding:8px;border:1px solid rgba(0,0,0,.15);border-radius:6px;}
.bwc-review__form button{padding:10px 14px;border-radius:8px;border:0;cursor:pointer;}
.bwc-review__msg{padding:10px 12px;border-radius:8px;margin-bottom:10px;}
.bwc-review__msg--ok{background:rgba(0,128,0,.12);}
.bwc-review__msg--fail{background:rgba(255,0,0,.12);}
.bwc-review__legal{margin-top:12px;font-size:12px;opacity:.85;}

/* Review form (new layout) */
.bwc-review__form h3{margin:0 0 10px 0;}
.bwc-review__fieldset{padding:10px;border:1px solid rgba(0,0,0,.12);border-radius:8px;margin:0 0 12px 0;}
.bwc-review__hint{margin:6px 0 10px 0;font-size:12px;opacity:.8;}
.bwc-review__rating{display:flex;gap:10px;flex-wrap:wrap;}
.bwc-review__label{display:block;margin:10px 0;}
.bwc-review__label input,.bwc-review__label textarea{width:100%;max-width:600px;}
.bwc-review__checkbox{display:block;margin:10px 0;}
.bwc-review__small{font-size:0.95em;opacity:.9;margin:10px 0;}
.bwc-review__submit{padding:10px 14px;border-radius:8px;border:0;cursor:pointer;}
.bwc-review__shortcode-hint{margin-top:10px;font-size:12px;opacity:.8;}

/* Reduce review form font sizes */
.bwc-review, .bwc-review p, .bwc-review label { font-size: 14px; line-height: 1.5; }
.bwc-review h3 { font-size: 16px; margin-bottom: 12px; }
.bwc-review__small { font-size: 13px; }
.bwc-review__fieldset legend { font-size: 14px; }

/* Star rating (Google yellow) */
.bwc-star-rating{display:inline-flex;flex-direction:row-reverse;gap:6px;}
.bwc-star-rating input{display:none;}
.bwc-star-rating label{font-size:26px;line-height:1;cursor:pointer;color:rgba(0,0,0,.25);}
.bwc-star-rating input:checked ~ label,
.bwc-star-rating label:hover,
.bwc-star-rating label:hover ~ label{color:#fbbc05;}

.bwc-review__required-hints{margin-top:12px;padding:10px 12px;border-radius:8px;border:1px solid rgba(0,0,0,.12);background:rgba(0,0,0,.03);font-size:13px;opacity:.95;}
