/* ===========================================================
   The Flying Ship — Öffnungszeiten-Pille
   =========================================================== */

.opening-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border-radius: 99px;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  vertical-align: middle;
  white-space: nowrap;
  transition: background 0.3s ease;
}

.opening-pill .opening-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.opening-pill .opening-sub {
  font-weight: 400;
  opacity: 0.85;
  font-size: 0.8em;
}

/* === Geöffnet === */
.opening-pill-open {
  background: rgba(107, 113, 66, 0.13);
  color: #4a4d2c;
}
.opening-pill-open .opening-dot {
  background: #6b7142;
  box-shadow: 0 0 0 0 rgba(107, 113, 66, 0.5);
  animation: opening-pulse-green 2.4s ease-in-out infinite;
}
@keyframes opening-pulse-green {
  0%   { box-shadow: 0 0 0 0   rgba(107, 113, 66, 0.55); }
  60%  { box-shadow: 0 0 0 8px rgba(107, 113, 66, 0); }
  100% { box-shadow: 0 0 0 0   rgba(107, 113, 66, 0); }
}

/* === Schließt bald === */
.opening-pill-closing_soon {
  background: rgba(200, 163, 89, 0.18);
  color: #7a6024;
}
.opening-pill-closing_soon .opening-dot {
  background: #c8a359;
  animation: opening-blink 1.4s ease-in-out infinite;
}
@keyframes opening-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* === Geschlossen / Ruhetag === */
.opening-pill-closed,
.opening-pill-rest_day {
  background: rgba(184, 52, 30, 0.12);
  color: #7a2615;
}
.opening-pill-closed .opening-dot,
.opening-pill-rest_day .opening-dot {
  background: #b8341e;
}

/* === Mobile === */
@media (max-width: 540px) {
  .opening-pill {
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
    gap: 0.4rem;
  }
  .opening-pill .opening-sub {
    display: none;
  }
}

/* === Im Header === */
.nav-opening-pill {
  margin-left: 1rem;
}
@media (max-width: 768px) {
  .nav-opening-pill {
    margin-left: 0.5rem;
  }
}

/* === Auf Startseite (Card-Wrap) === */
.opening-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: #faf6ee;
  border: 1px solid #e9dcb8;
  border-radius: 12px;
  max-width: 520px;
  margin: 1.5rem auto;
}
.opening-card .opening-pill {
  font-size: 1rem;
  padding: 0.6rem 1.3rem;
}
.opening-card .opening-pill .opening-sub {
  display: inline;
  font-size: 0.85em;
}

/* ===========================================================
   ADMIN — Wochentabelle und Sonderzeiten
   =========================================================== */

.opening-week-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.opening-week-table th,
.opening-week-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #e0d8c5;
  vertical-align: middle;
  text-align: left;
}
.opening-week-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888780;
  font-weight: 600;
  background: #faf6ee;
}
.opening-week-table .day-label {
  font-weight: 600;
  color: #2a1810;
  width: 110px;
}

.blocks-cell .blocks-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}
.block-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.block-row input[type="time"] {
  padding: 0.3rem 0.5rem;
  border: 1px solid #d8cdb6;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  width: 110px;
}
.btn-remove-block,
.btn-remove-block-ex {
  background: transparent;
  border: 1px solid transparent;
  color: #b8341e;
  font-size: 1.1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}
.btn-remove-block:hover,
.btn-remove-block-ex:hover {
  background: rgba(184, 52, 30, 0.1);
  border-color: #b8341e;
}
.btn-add-block,
.btn-add-block-ex {
  background: transparent;
  border: 1px dashed #c8a359;
  color: #7a6024;
  padding: 0.3rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
  margin-top: 0.3rem;
}
.btn-add-block:hover,
.btn-add-block-ex:hover {
  background: rgba(200, 163, 89, 0.15);
  border-style: solid;
}

/* === Switch (Toggle für Wochentag offen/zu) === */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #d8cdb6;
  transition: 0.25s;
  border-radius: 24px;
}
.switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}
.switch input:checked + .slider {
  background-color: #6b7142;
}
.switch input:checked + .slider:before {
  transform: translateX(20px);
}

/* === Sonderzeiten === */
.exception-form-grid {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 1rem;
  align-items: end;
  margin-top: 0.75rem;
}
.exception-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: #5a4a3a;
}
.exception-form-grid label.checkbox-inline {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.exception-form-grid input[type="text"],
.exception-form-grid input[type="date"] {
  padding: 0.4rem 0.65rem;
  border: 1px solid #d8cdb6;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
}
@media (max-width: 700px) {
  .exception-form-grid {
    grid-template-columns: 1fr;
  }
}

.exception-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.exception-table th,
.exception-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #e0d8c5;
  text-align: left;
}
.exception-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888780;
}
.ex-state {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.ex-state-open {
  background: rgba(107, 113, 66, 0.15);
  color: #4a4d2c;
}
.ex-state-closed {
  background: rgba(184, 52, 30, 0.12);
  color: #7a2615;
}

.opening-preview-card {
  border-left: 4px solid #c8a359;
}

/* ===========================================================
   FRONTEND — Eleganter Öffnungszeiten-Block + Kontakt-Liste
   (überschreibt teilweise alte .hours / .contact-list Styles)
   =========================================================== */

/* Pille oben in der Card — etwas verschoben */
.oc-card .opening-pill {
  margin-bottom: 0.85rem;
}

/* Liste statt Tabelle */
.hours-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: 0.95rem;
  color: #5a4a3a;
}
.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid rgba(200, 163, 89, 0.18);
  border-radius: 6px;
  transition: background 0.2s ease;
}
.hours-row:last-child {
  border-bottom: 0;
}
.hours-row .hours-day {
  flex: 1;
}
.hours-row .hours-time {
  color: #2a1810;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hours-row .hours-rest {
  color: #888780;
  font-style: italic;
  font-size: 0.92em;
}

/* Heutiger Tag — goldene Hervorhebung */
.hours-row-today {
  background: linear-gradient(90deg, rgba(200, 163, 89, 0.16) 0%, rgba(200, 163, 89, 0.10) 100%);
  border-bottom: 1px solid transparent !important;
  position: relative;
}
.hours-row-today .hours-day,
.hours-row-today .hours-time {
  font-weight: 600;
  color: #2a1810;
}
.hours-row-today .hours-today-tag {
  font-weight: 400;
  color: #7a6024;
  font-size: 0.85em;
  margin-left: 0.25rem;
}

/* Notiz-Trenner */
.hours-note {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(200, 163, 89, 0.25);
  font-size: 0.88rem;
  color: #888780;
  font-style: italic;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
}

/* === Eleganter Kontakt — klickbare Items === */
.contact-list-elegant {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}
.contact-list-elegant > li {
  margin: 0;
}
.contact-link {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0.6rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(200, 163, 89, 0.18);
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  transition: background 0.18s ease, transform 0.18s ease;
}
.contact-list-elegant > li:last-child .contact-link {
  border-bottom: 0;
}
.contact-link:hover {
  background: rgba(200, 163, 89, 0.08);
  transform: translateX(2px);
}
.contact-link:focus-visible {
  outline: 2px solid #c8a359;
  outline-offset: 2px;
}

.contact-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(200, 163, 89, 0.18);
  color: #7a6024;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.18s ease;
}
.contact-link:hover .contact-icon {
  background: rgba(200, 163, 89, 0.32);
}

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.contact-label {
  font-size: 0.7rem;
  color: #888780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.contact-main {
  color: #2a1810;
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
}
.contact-sub {
  color: #888780;
  font-size: 0.82rem;
  margin-top: 1px;
}

/* Mobile-Anpassung */
@media (max-width: 540px) {
  .hours-row {
    padding: 0.55rem 0.4rem;
    font-size: 0.9rem;
  }
  .contact-link {
    padding: 0.7rem 0.5rem;
    gap: 0.7rem;
  }
  .contact-main {
    font-size: 0.88rem;
  }
}
