/* =========================================================
   Kalender (Belegung)
   ========================================================= */
#calendar { scroll-margin-top: 90px; }

.calendar-main-card {
  border: 1px solid rgba(47,62,47,0.12);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(247,248,245,0.55);
  box-shadow: none;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.calendar-nav-title {
  font-weight: 900;
  color: var(--primary-color);
}

.calendar-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.calendar-month {
  background: #fff;
  border: 1px solid rgba(47,62,47,0.12);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.calendar-title {
  margin: 0;
  padding: 12px 14px;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--primary-color);
  background: linear-gradient(180deg, rgba(102,135,79,0.10), rgba(255,255,255,0));
  border-bottom: 1px solid rgba(47,62,47,0.10);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 12px;
}

.day-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: rgba(47,62,47,0.75);
  text-align: center;
  padding: 6px 0;
}

.day {
  border-radius: 12px;
  text-align: center;
  padding: 10px 0;
  font-weight: 800;
  user-select: none;
  border: 1px solid rgba(47,62,47,0.10);
  background: rgba(247,248,245,0.85);
}

.day.is-past {
  font-weight: 400;
}

.day[data-selectable="true"],
.day[data-selectable-end="true"] {
  width: 100%;
  appearance: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.day[data-selectable="true"]:focus-visible,
.day[data-selectable-end="true"]:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Statusfarben */
.day.is-free {
  background: #79c26b;
  border-color: #4b9a3e;
  color: #103010;
}
.day.is-busy {
  background: #e45a4f;
  border-color: #b8372e;
  color: #ffffff;
}
.day.is-pending {
  background: #d6d9dc;
  border-color: #9aa0a6;
  color: #2b2b2b;
}

/* Gesperrte Tage – weiß + diagonaler Sperrstrich */
.day.is-blocked {
  position: relative;
  background: #ffffff;
  border-color: #b0b0b0;
  color: #666666;
  cursor: not-allowed;
  overflow: hidden;
}

/* diagonale Sperrlinie über das ganze Feld */
.day.is-blocked::after{
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
      135deg,
      rgba(180,180,180,0.0) 0px,
      rgba(180,180,180,0.0) 10px,
      rgba(180,180,180,0.9) 10px,
      rgba(180,180,180,0.9) 12px
  );
  pointer-events: none;
}


/* Wechseltag diagonal */
.day.is-change {
  background: linear-gradient(135deg,
    #79c26b 0%,
    #79c26b 50%,
    #e45a4f 50%,
    #e45a4f 100%
  );
  border-color: rgba(47,62,47,0.30);
}

/* Auswahlbereich (dunkleres Blau) */
.day.is-selected,
.day.is-selected-start,
.day.is-selected-end{
  outline: 3px solid rgba(70, 140, 255, 0.40);
  border-color: rgba(70, 140, 255, 0.75);
  background: rgba(70, 140, 255, 0.22);
}
.day.is-range-bookable{
  background: rgba(70, 140, 255, 0.16);
  border-color: rgba(70, 140, 255, 0.45);
}
.day.is-range-edge-bookable{
  background: rgba(70, 140, 255, 0.22);
  border-color: rgba(70, 140, 255, 0.65);
}

/* Legend */
.calendar-legend-small {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: rgba(47,62,47,0.8);
  font-weight: 750;
  font-size: 0.95rem;
}
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.dot {
  width: 12px; height: 12px; border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(47,62,47,0.16);
  background: rgba(247,248,245,0.85);
}
.dot.is-free { background: #79c26b; }
.dot.is-busy { background: #e45a4f; }
.dot.is-pending { background: #9aa0a6; }
.dot.is-change{
  background: linear-gradient(135deg,
    #79c26b 0%,
    #79c26b 50%,
    #e45a4f 50%,
    #e45a4f 100%
  );
  border-color: rgba(47,62,47,0.22);
}
.dot.is-blocked{
  background-color: #fff;

  /* exakt zwei diagonale Linien per inline-SVG */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cline x1='-2' y1='10' x2='10' y2='-2' stroke='%239b9b9b' stroke-width='2'/%3E%3Cline x1='2' y1='14' x2='14' y2='2' stroke='%239b9b9b' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;

  border-color: #b0b0b0;
}

/* Options / calculator */
.calculator-card-structured {
  border: 1px solid rgba(47,62,47,0.12);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(247,248,245,0.55);
  box-shadow: none;
  margin-top: 12px;
}
.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.calc-label { font-weight: 900; color: var(--primary-color); }
.calc-value { font-weight: 900; font-size: 1.2rem; color: var(--primary-color); }

.price-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(47,62,47,0.10);
  color: rgba(47,62,47,0.85);
}

/* ===== Kalender: Preis-Aufschlüsselung (Beträge rechts bündig, tabellarische Ziffern) ===== */
.price-breakdown { margin-top: 12px; }
.price-breakdown-table { width: 100%; border-collapse: collapse; }
.price-breakdown-table td { padding: 6px 0; vertical-align: top; }
.price-breakdown-table .price-breakdown-head td { padding-top: 10px; }
.price-breakdown-table .price-breakdown-sep td { padding-top: 10px; border-top: 1px solid rgba(47,62,47,0.10); }
.price-breakdown-table .price-breakdown-total td { padding-top: 10px; border-top: 1px solid rgba(47,62,47,0.12); }
.td-right {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Leere Meldungsboxen nie anzeigen (fix für JS clearCalendarError) */
.alert:empty,
.message:empty {
  display: none !important;
  padding: 0 !important;
  border: 0 !important;
}

