/* =============================================
   Buchungskalender – Frontend Styles v3
   ============================================= */

.bkcal-wrapper {
    width: 100%;
    max-width: 900px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    background: #fff;
}

/* Header */
.bkcal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #1e3a5f;
    color: #fff;
}
.bkcal-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    opacity: 0.8;
    transition: opacity 0.15s, background 0.15s;
    /* Zeichen exakt zentrieren – unabhängig von Glyph-Metriken */
    display: flex;
    align-items: center;
    justify-content: center;
}
.bkcal-header button:hover { opacity: 1; background: rgba(255,255,255,0.15); }

.bkcal-header button span {
  position: relative;
  top:-3px;
  color: #00ffcf;
  font-size: 48px;
}

.bkcal-header .bkcal-cal-name {
  color: #FFF !important;
  margin-bottom: 0 !important;
  line-height: 1 !important;
  font-size: var(--enfold-font-size-theme-h5, 20px);
  font-weight: normal;
}

/* 2 Monate nebeneinander */
.bkcal-months-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.bkcal-month-panel { padding: 14px 12px 10px; }
.bkcal-month-panel:first-child { border-right: 1px solid #e9ebee; }

/* Monatstitel */
.bkcal-month-title {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 10px;
}

/* Wochentage */
.bkcal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.bkcal-weekdays span {
    text-align: center;
    padding: 4px 0;
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Tag-Grid */
.bkcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }

/* Einzelne Tagzelle */
.bkcal-day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  cursor: default;
  position: relative;
  transition: filter 0.12s ease;
  border: 1px solid #bbb !important;
}

.bkcal-day.empty { background: transparent !important; border: none !important }

/* Vergangene Tage – ausgegraut, kein Hintergrund */
.bkcal-day.past {
    background: transparent !important;
    color: #d1d5db !important;
    font-weight: 400;
}

/* Heutiger Tag – Rahmen */
.bkcal-day.today {
    outline: 2px solid #1e3a5f;
    outline-offset: -2px;
    font-weight: 800;
    z-index: 1;
}

/* Status-Farben – Fallbacks, werden per Shortcode inline überschrieben */
.bkcal-day.free             { background-color: #e2fee2; color: #1f2937; }
.bkcal-day.gebucht          { background-color: #fee2e2; color: #1f2937; }
.bkcal-day.nicht_verfuegbar { background-color: #fef3c7; color: #1f2937; }

/* Hover – nur auf zukünftigen freien Tagen */
.bkcal-day.free:not(.past):hover { filter: brightness(0.93); }

/* Split-Tage – Gradient-Fallbacks (werden per Shortcode mit konfigurierten Farben überschrieben) */
.bkcal-day.gebucht-free          { background: linear-gradient(135deg, #fee2e2 48%, #fff 48%, #fff 52%, #e2fee2 52%); }
.bkcal-day.free-gebucht          { background: linear-gradient(135deg, #e2fee2 48%, #fff 48%, #fff 52%, #fee2e2 52%); }
.bkcal-day.gebucht-gebucht       { background: linear-gradient(135deg, #fee2e2 48%, #fff 48%, #fff 52%, #fee2e2 52%); }
.bkcal-day.nicht_verfuegbar-free { background: linear-gradient(135deg, #fef3c7 48%, #fff 48%, #fff 52%, #e2fee2 52%); }
.bkcal-day.free-nicht_verfuegbar { background: linear-gradient(135deg, #e2fee2 48%, #fff 48%, #fff 52%, #fef3c7 52%); }
.bkcal-day.gebucht-nicht_verfuegbar     { background: linear-gradient(135deg, #fee2e2 48%, #fff 48%, #fff 52%, #fef3c7 52%); }
.bkcal-day.nicht_verfuegbar-gebucht     { background: linear-gradient(135deg, #fef3c7 48%, #fff 48%, #fff 52%, #fee2e2 52%); }
.bkcal-day.nicht_verfuegbar-nicht_verfuegbar { background: linear-gradient(135deg, #fef3c7 48%, #fff 48%, #fff 52%, #fef3c7 52%); }

/* Tooltip-Cursor bei Tagen mit Notiz */
.bkcal-day[title] { cursor: help; }

/* Legende */
.bkcal-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 14px;
    background: #f7f8f9;
    border-top: 1px solid #e9ebee;
}
.bkcal-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}
.bkcal-dot {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.08);
}

/* =============================================
   Responsive – Monate untereinander
   ============================================= */
@media (max-width: 560px) {
    .bkcal-wrapper { max-width: 100%; border-radius: 8px; }
    .bkcal-months-container { grid-template-columns: 1fr; }
    .bkcal-month-panel:first-child { border-right: none; border-bottom: 1px solid #e9ebee; }
    .bkcal-day { font-size: 11px; }
}
