/* Category Override Button Styles - Fixed Layout */

.task-subcategory {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: var(--spacing-xl) 0 var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.category-override-btn {
  padding: 4px 8px;
  margin-left: 16px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 2px;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.category-override-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.category-override-btn.override-show {
  border-color: var(--success);
  color: var(--success);
}

.category-override-btn.override-show:hover {
  background: var(--success);
  color: var(--surface);
}

.category-override-btn.override-hide {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.category-override-btn.override-hide:hover {
  background: var(--text-muted);
  color: var(--surface);
}

/* Override-Tasks visuell markieren - Fixed positioning */
.task-item.override-visible {
  border-left: 3px solid var(--accent-color);
  background: rgba(177, 32, 9, 0.02);
  position: relative;
  transition: all 0.3s ease;
}

.task-item.override-visible .task-title::before {
  content: " ";
  font-size: 12px;
  opacity: 0.6;
  margin-right: 4px;
}

/* Smooth task transitions */
.task-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Table Layout Protection */
.checklist-table-wrapper {
  table-layout: fixed;
}

.checklist-table {
  table-layout: fixed;
  width: 100%;
}

.checklist-table th:nth-child(1),
.checklist-table td:nth-child(1) {
  width: 120px;
}

.checklist-table th:nth-child(2),
.checklist-table td:nth-child(2) {
  width: auto;
  min-width: 200px;
}

.checklist-table th:nth-child(3),
.checklist-table td:nth-child(3) {
  width: 150px;
}

.checklist-table th:nth-child(4),
.checklist-table td:nth-child(4) {
  width: 120px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .task-subcategory {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .category-override-btn {
    margin-left: 0;
    align-self: stretch;
    text-align: center;
  }
  
  .checklist-table th,
  .checklist-table td {
    width: auto !important;
    min-width: 100px;
  }
}

/* --- Stufe 1: Footer mit Rechtslinks (im PHP-Original nicht vorhanden) --- */
.site-footer {
  max-width: 1200px;
  margin: 3rem auto 2rem;
  padding: 1.5rem 1rem 0;
  border-top: 1px solid #e2e2e2;
  font-size: 0.9rem;
  color: #555;
  text-align: center;
}
.site-footer nav a { color: #555; text-decoration: underline; }
.site-footer nav a:hover { color: #000; }
.legal-page { max-width: 820px; line-height: 1.6; }
.legal-page h2 { margin-top: 2rem; }

/* --- Anbieter-Vorschläge (Stufe 2) ------------------------------------- */
.vorschlag-form label { display:block; font-weight:600; margin-bottom:.5rem; }
.vorschlag-zeile { display:flex; gap:.5rem; flex-wrap:wrap; }
.vorschlag-zeile input {
  padding:.6rem .8rem; border:1px solid #ccc; border-radius:6px; font-size:1rem; max-width:12rem;
}
.vorschlag-zeile button {
  padding:.6rem 1.1rem; border:0; border-radius:6px; background:#B12009; color:#fff;
  font-size:1rem; cursor:pointer;
}
.vorschlag-zeile button:disabled { opacity:.6; cursor:default; }
.vorschlag-form small { display:block; margin-top:.4rem; color:#666; }
.vorschlag-fehler { color:#B12009; margin-top:.8rem; }
.vorschlag-ergebnis { margin-top:1.2rem; }
.vorschlag-ergebnis h3 { margin:0 0 .6rem; font-size:1.05rem; }
.vorschlag-liste { list-style:none; margin:0; padding:0; }
.vorschlag-liste li {
  display:flex; gap:1rem; flex-wrap:wrap; align-items:baseline;
  padding:.6rem .8rem; border:1px solid #e4e4e4; border-radius:6px; margin-bottom:.45rem;
}
.vorschlag-liste li.frei { background:#fafafa; border-style:dashed; }
.vorschlag-kategorie { flex:0 0 13rem; font-weight:600; }
.vorschlag-frei { color:#666; }
.vorschlag-hinweis { margin-top:.8rem; font-size:.85rem; color:#666; line-height:1.4; }

/* --- Buchung eines freien Platzes -------------------------------------- */
.vorschlag-buchen {
  border: 0; background: none; padding: 0; color: #B12009; font: inherit;
  text-decoration: underline; cursor: pointer;
}
.vorschlag-buchen:hover { color: #7d1606; }
.buchung-form {
  width: 100%; margin-top: .6rem; padding: 1rem;
  border: 1px solid #d9d9d9; border-radius: 8px; background: #fff;
  display: flex; flex-direction: column; gap: .7rem;
}
.buchung-titel { margin: 0 0 .2rem; }
.buchung-form label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; }
.buchung-form input[type="text"],
.buchung-form input[type="email"] {
  padding: .55rem .7rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem;
}
.buchung-zahlweise { border: 0; padding: 0; margin: 0; }
.buchung-zahlweise legend { font-size: .9rem; margin-bottom: .3rem; padding: 0; }
.buchung-zahlweise label {
  flex-direction: row; align-items: center; gap: .4rem; font-size: .95rem;
}
.buchung-aktionen { display: flex; gap: .6rem; flex-wrap: wrap; }
.buchung-weiter {
  padding: .6rem 1.2rem; border: 0; border-radius: 6px;
  background: #B12009; color: #fff; font-size: 1rem; cursor: pointer;
}
.buchung-weiter:disabled { opacity: .6; cursor: default; }
.buchung-abbrechen {
  padding: .6rem 1rem; border: 1px solid #ccc; border-radius: 6px;
  background: #fff; font-size: 1rem; cursor: pointer;
}
.buchung-form small { color: #666; line-height: 1.4; }

/* Buchungs-Modal (Overlay ueber der ganzen Seite, per Portal an <body>). */
.buchung-backdrop {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
  animation: buchung-fade 0.15s ease;
}
@keyframes buchung-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.buchung-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: var(--surface, #fff);
  border-radius: 6px;
  padding: 1.6rem 1.5rem 1.4rem;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.28);
}
.buchung-schliessen {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted, #999);
  cursor: pointer;
  padding: 4px;
}
.buchung-schliessen:hover {
  color: var(--text-primary, #1a1a1a);
}
/* Im Modal traegt der Dialog den Rahmen — das Formular selbst braucht keinen. */
.buchung-dialog .buchung-form {
  border: 0;
  padding: 0;
  margin: 0;
}
