/* Beratung buchen – Frontend UI (Solar-Konfigurator Look & Feel)
   - Fixed modal height across steps
   - Light cards, dark text
   - Animated blue gradient like Solar-Konfigurator
*/

:root{
  /* Accent is used for selection borders; buttons use the blue gradient below */
  --bb-accent: #1d4ed8;
  --bb-accent2: #45a3ff;
  --bb-grad-dark: #0b3dd1;
  --bb-grad-light: #45a3ff;

  --bb-card: rgba(255,255,255,0.88);
  --bb-text: #121826;
  --bb-muted: rgba(18,24,38,0.65);
  --bb-border: rgba(26,24,24,.12);
  --bb-radius: 18px;
  --bb-shadow: 0 24px 90px rgba(0,0,0,.35);
}

@keyframes bbw{
  0%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}

body.bb-modal-open{ overflow:hidden; }

/* Prevent global theme pseudo-elements (::before/::after) from interfering */
.bb-open-btn::before, .bb-open-btn::after,
.bb-modal-overlay::before, .bb-modal-overlay::after,
.bb-modal::before, .bb-modal::after,
.bb-modal-overlay *::before, .bb-modal-overlay *::after,
.bb-modal *::before, .bb-modal *::after{
  content: none !important;
  display: none !important;
}

/* Optional button style (shortcode) */
.bb-open-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(120deg, var(--bb-grad-dark), var(--bb-grad-light), var(--bb-grad-dark));
  background-size: 200% 200%;
  animation: bbw 4s ease-in-out infinite;
  box-shadow: 0 10px 30px rgba(29, 78, 216, .25);
  cursor:pointer;
  font-weight: 800;
  letter-spacing: .2px;
}
.bb-open-btn:hover{ filter: brightness(1.03); transform: translateY(-1px); }
.bb-open-btn:active{ transform: translateY(0); }

/* Overlay + modal */
.bb-modal-overlay{
  position: fixed; inset: 0;
  background: rgba(8,12,20,.55);
  backdrop-filter: blur(6px);
  z-index: 999999;
  display:none;
  padding: 18px;
}
.bb-modal-overlay[aria-hidden="false"]{
  display:flex;
  align-items:center;
  justify-content:center;
}

.bb-modal{
  width: min(940px, calc(100vw - 24px));
  height: min(86vh, 760px);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.90));
  border-radius: calc(var(--bb-radius) + 8px);
  box-shadow: var(--bb-shadow);
  overflow:hidden;
  position: relative;
  display:flex;
  flex-direction:column;
  color: var(--bb-text);
}

@media (max-width: 560px){
  .bb-modal{
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    border-radius: 22px;
  }
}

.bb-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--bb-border);
}

.bb-brand{
  display:flex;
  align-items:center;
  gap: 10px;
}

.bb-brand-logo{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--bb-border);
  padding: 6px;
}

/* nur der Text bekommt den Verlauf */
.bb-brand-title{
  font-weight: 800;
  font-size: 18px;
  background: linear-gradient(135deg, var(--bb-accent), var(--bb-accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bb-brand-badge{
  width:34px; height:34px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, #fff, rgba(255,255,255,0)) ,
              linear-gradient(145deg, var(--bb-grad-dark));
  box-shadow: 0 12px 30px rgba(29,78,216,.20);
  flex: 0 0 auto;
}
.bb-brand-text{
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.bb-steps{ display:flex; gap: 8px; align-items:center; }
.bb-step-dot{
  width: 10px; height:10px; border-radius:999px;
  background: rgba(18,24,38,.18);
}
.bb-step-dot.is-active{
  background: linear-gradient(120deg, var(--bb-grad-dark), var(--bb-grad-light), var(--bb-grad-dark));
  background-size: 200% 200%;
  animation: bbw 4s ease-in-out infinite;
}
.bb-step-dot.is-done{ background: rgba(18,24,38,.35); }

.bb-close{
  width: 42px; height: 42px;
  border-radius: 14px;
  border: 0;
  background: #388e3c;
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 22px;
  line-height: 1;
  cursor:pointer;
  flex: 0 0 auto;
}
.bb-close:hover{ filter: brightness(1.04); }

.bb-body{
  padding: clamp(12px, 2vw, 18px);
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.bb-body h2{
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
}

.bb-muted{ color: var(--bb-muted); margin-top: 8px; font-size: 13px; }

.bb-grid-2{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(12px, 2vw, 18px);
}
@media (max-width: 860px){
  .bb-grid-2{ grid-template-columns: 1fr; }
}

.bb-card{
  background: var(--bb-card);
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius);
  padding: clamp(12px, 2vw, 18px);
}

/* Calendar */
.bb-cal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
}
.bb-cal-title{ font-weight: 900; color: var(--bb-text); }
.bb-cal-nav{
  width: 40px; height: 59px;
  border-radius: 14px;
  border: 1px solid var(--bb-border);
  background: rgba(255,255,255,.85);
  color: var(--bb-text);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.bb-cal-weekdays{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  color: var(--bb-muted);
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 800;
}
.bb-cal-grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.bb-day{
  border: 1px solid var(--bb-border);
  background: rgba(255,255,255,.90);
  border-radius: 14px;
  padding: 10px 8px;
  text-align:center;
  cursor:pointer;
  user-select:none;
  font-weight: 900;
  color: var(--bb-text);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.bb-day:hover{ transform: translateY(-1px); box-shadow: 0 12px 30px rgba(0,0,0,.06); }
.bb-day.is-empty{ opacity: .20; cursor: default; background: transparent; border-color: transparent; box-shadow: none; transform:none; }
.bb-day.is-disabled{ opacity: .35; cursor: not-allowed; background: rgba(255,255,255,.70); transform:none; box-shadow:none; }
.bb-day.is-selected{
  border-color: color-mix(in srgb, var(--bb-accent) 60%, rgba(0,0,0,0));
  box-shadow: 0 16px 40px rgba(29,78,216,.14);
  background: linear-gradient(135deg, rgba(11,61,209,.12), rgba(69,163,255,.10));
}

.bb-hint{ margin-top: 10px; color: var(--bb-muted); font-size: 13px; }

/* Slots */
.bb-subtitle{ font-weight: 900; margin-bottom: 10px; }
.bb-slots{ display:flex; flex-wrap: wrap; gap: 8px; }
.bb-slot{
  border: 1px solid var(--bb-border);
  background: rgba(255,255,255,.92);
  color: var(--bb-text);
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 900;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.bb-slot:hover{ transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,.06); }
.bb-slot.is-selected{
  background: linear-gradient(120deg, rgba(11,61,209,.18), rgba(69,163,255,.12));
  border-color: color-mix(in srgb, var(--bb-accent) 65%, rgba(0,0,0,0));
  box-shadow: 0 16px 40px rgba(29,78,216,.14);
}

/* Reasons */
.bb-reasons{ display:flex; flex-direction:column; gap: 10px; }
.bb-radio{
  display:flex; align-items:center; gap: 12px;
  border: 1px solid var(--bb-border);
  background: rgba(255,255,255,.92);
  border-radius: 16px;
  padding: 12px 12px;
  cursor:pointer;
  font-weight: 900;
  color: var(--bb-text);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.bb-radio:hover{ transform: translateY(-1px); box-shadow: 0 14px 32px rgba(0,0,0,.06); }
.bb-radio input{ transform: scale(1.05); }

/* Form */
.bb-form label{ display:block; font-weight: 900; margin-bottom: 12px; color: var(--bb-text); }
.bb-form input{
  width: 100%;
  margin-top: 6px;
  padding: 12px 6px;
  border-radius: 14px;
  border: 1px solid var(--bb-border);
  background: rgba(255,255,255,.96);
  color: var(--bb-text);
  outline: none;
}
.bb-form input:focus{
  border-color: color-mix(in srgb, var(--bb-accent) 40%, rgba(0,0,0,0));
  box-shadow: 0 10px 30px rgba(29,78,216,.10);
}

/* Privacy link (small, optional) */
.bb-privacy{
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--bb-border);
  display:flex;
  justify-content:flex-end;
}
.bb-privacy a{
  font-size: 12px;
  font-weight: 800;
  color: rgba(11,61,209,.95);
  text-decoration: underline;
}

/* Summary */
.bb-summary{ display:flex; flex-direction:column; gap: 10px; }
.bb-summary-row{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  border-bottom: 1px dashed rgba(0,0,0,.10);
  padding-bottom: 10px;
}
.bb-summary-row:last-child{ border-bottom: 0; padding-bottom: 0; }

/* Footer */
.bb-footer{
  padding: 14px 18px;
  border-top: 1px solid var(--bb-border);
  display:flex;
  justify-content:space-between;
  gap: 12px;
}

.bb-btn{
  border: 0;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 900;
  letter-spacing: .2px;
}
.bb-btn-ghost{
  background: rgba(255,255,255,.92);
  border: 1px solid var(--bb-border);
  color: var(--bb-text);
}
.bb-btn-ghost:not([disabled]),
.bb-btn-primary:not([disabled]){
  background: #388e3c;
  color: #fff;
  border-color: #388e3c;
  box-shadow: 0 10px 30px rgba(56, 142, 60, .22);
}
.bb-btn[disabled]{ opacity: .55; cursor: not-allowed; filter: grayscale(.1); }
