/* ============================================================
   Custom Datepicker Styles
   Themes: dark (auf dunklen Cards), light (auf hellen Cards)
   ============================================================ */
.dp-wrapper {
  position: relative;
  display: block;
}

/* Trigger-Button (das sichtbare Feld) */
.dp-trigger {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(245,241,232,0.14);
  padding: 12px 0 10px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  text-align: left;
  width: 100%;
  cursor: pointer;
  line-height: 1.2;
  min-height: 44px;
  transition: border-color 0.2s;
}
.dp-trigger:hover {
  border-bottom-color: rgba(245,241,232,0.3);
}
.dp-theme-dark .dp-trigger {
  color: #F5F1E8;
}
.dp-theme-light .dp-trigger {
  color: #231B3B;
  border-bottom-color: rgba(27,27,26,0.2);
}

/* Popover */
.dp-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 200;
  background: #1a1922;
  border: 1px solid rgba(245,241,232,0.14);
  border-radius: 12px;
  padding: 16px;
  min-width: 280px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.7);
  font-family: inherit;
}
.dp-theme-light .dp-popover {
  background: #ffffff;
  border-color: rgba(27,27,26,0.15);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.3);
}

/* Header */
.dp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.dp-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(245,241,232,0.08);
  color: #F5F1E8;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background 0.2s;
}
.dp-nav:hover {
  background: rgba(245,241,232,0.15);
}
.dp-theme-light .dp-nav {
  background: rgba(27,27,26,0.08);
  color: #231B3B;
}
.dp-theme-light .dp-nav:hover {
  background: rgba(27,27,26,0.15);
}
.dp-title {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 500;
  color: #F5F1E8;
}
.dp-theme-light .dp-title {
  color: #231B3B;
}

/* Weekday header */
.dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}
.dp-wd {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245,241,232,0.5);
  padding: 4px 0;
}
.dp-theme-light .dp-wd {
  color: rgba(27,27,26,0.5);
}

/* Day grid */
.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dp-empty {
  aspect-ratio: 1;
}
.dp-day {
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  color: #F5F1E8;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  min-height: 32px;
}
.dp-day:hover:not(:disabled) {
  background: rgba(245,241,232,0.1);
}
.dp-day.is-today {
  color: #FF3D9A;
  font-weight: 700;
}
.dp-day.is-selected {
  background: #FF3D9A;
  color: #fff;
  font-weight: 700;
}
.dp-day.is-selected:hover {
  background: #FF3D9A;
}
.dp-day.is-disabled,
.dp-day:disabled {
  color: rgba(245,241,232,0.2);
  cursor: not-allowed;
}

.dp-theme-light .dp-day {
  color: #231B3B;
}
.dp-theme-light .dp-day:hover:not(:disabled) {
  background: rgba(27,27,26,0.08);
}
.dp-theme-light .dp-day.is-today {
  color: #C8543B;
}
.dp-theme-light .dp-day.is-selected {
  background: #FF3D9A;
  color: #fff;
}
.dp-theme-light .dp-day.is-disabled,
.dp-theme-light .dp-day:disabled {
  color: rgba(27,27,26,0.25);
}

/* Mobile: Popover breiter/kompakter */
@media (max-width: 480px) {
  .dp-popover {
    min-width: 260px;
    padding: 12px;
  }
  .dp-day {
    font-size: 13px;
  }
  .dp-title {
    font-size: 15px;
  }
}
