/* ============================================================
   Hettstedt Live – Modal & Phase-2-Styles
   Ergänzung zu hettstedt-courses.css
   ============================================================ */

/* ── Modal Overlay ─────────────────────────────────────────── */
.hl-modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(10, 15, 30, .72);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: hl-fade-in .18s ease;
}
.hl-modal-overlay[hidden] { display: none; }

@keyframes hl-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal Box ─────────────────────────────────────────────── */
.hl-modal-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.32);
  max-width: 680px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  animation: hl-slide-up .22s cubic-bezier(.4,0,.2,1);
}

@keyframes hl-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Scrollbar dezent */
.hl-modal-box::-webkit-scrollbar       { width: 6px; }
.hl-modal-box::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 3px; }
.hl-modal-box::-webkit-scrollbar-thumb { background: #c0c0c0; border-radius: 3px; }

/* ── Schließen-Button ──────────────────────────────────────── */
.hl-modal-close {
  position: sticky; top: 0; float: right;
  margin: 14px 14px 0 0;
  background: #f3f4f6; border: none; border-radius: 50%;
  width: 34px; height: 34px; font-size: 16px; line-height: 1;
  cursor: pointer; color: #555;
  transition: background .15s, color .15s;
  z-index: 10;
}
.hl-modal-close:hover { background: #e5e7eb; color: #1a1a2e; }

/* ── Modal Inner ───────────────────────────────────────────── */
.hl-modal-inner { padding: 8px 28px 28px; clear: both; }

/* ── Badges ────────────────────────────────────────────────── */
.hl-modal-badges {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 14px;
}

/* ── Titel ─────────────────────────────────────────────────── */
.hl-modal-title {
  font-size: 22px; font-weight: 800; line-height: 1.3;
  color: #1a1a2e; margin: 0 0 20px;
}

/* ── Info-Grid ─────────────────────────────────────────────── */
.hl-modal-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.hl-modal-row {
  display: contents;
}

.hl-modal-icon,
.hl-modal-label,
.hl-modal-value {
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13.5px;
  vertical-align: middle;
}

/* Icon + Label zusammen in einer Spalte */
.hl-modal-icon {
  padding-right: 4px;
  font-size: 16px;
  background: #fafafa;
  white-space: nowrap;
}

.hl-modal-label {
  padding-left: 4px; padding-right: 2px;
  font-weight: 600; color: #555;
  background: #fafafa;
  white-space: nowrap;
}

.hl-modal-value {
  color: #1a1a2e;
}

.hl-modal-value a {
  color: var(--hl-primary, #1a73e8);
  text-decoration: none;
}
.hl-modal-value a:hover { text-decoration: underline; }

.hl-modal-row:last-child .hl-modal-icon,
.hl-modal-row:last-child .hl-modal-label,
.hl-modal-row:last-child .hl-modal-value {
  border-bottom: none;
}

/* ── Auslastungsbalken im Modal ────────────────────────────── */
.hl-modal-bar {
  margin-bottom: 22px;
}
.hl-modal-bar .hl-bar { gap: 12px; }
.hl-modal-bar .hl-bar__track { height: 8px; }

/* ── Beschreibung ──────────────────────────────────────────── */
.hl-modal-desc h3 {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: #888; margin: 0 0 10px;
}
.hl-modal-content {
  font-size: 14.5px; line-height: 1.7; color: #333;
}
.hl-modal-content p  { margin: 0 0 10px; }
.hl-modal-content ul { padding-left: 20px; margin: 0 0 10px; }

/* ── Aktions-Buttons ───────────────────────────────────────── */
.hl-modal-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.hl-btn-secondary {
  display: inline-block; padding: 9px 18px;
  background: #f3f4f6; color: #1a1a2e !important;
  font-size: 13px; font-weight: 600; border-radius: 8px;
  text-decoration: none;
  transition: background .18s, transform .18s;
  border: 1.5px solid #e5e7eb;
}
.hl-btn-secondary:hover {
  background: #e5e7eb; transform: scale(1.02);
}

/* ── "Details"-Link auf Kachel ─────────────────────────────── */
.hl-card__detail-link {
  display: block; text-align: center;
  font-size: 12px; color: var(--hl-primary, #1a73e8);
  padding: 6px 0 2px;
  cursor: pointer; text-decoration: none;
  transition: color .15s;
}
.hl-card__detail-link:hover { text-decoration: underline; }

/* ── Kachel: iCal-Micro-Button ─────────────────────────────── */
.hl-card__ical {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #888;
  text-decoration: none; margin-top: 4px;
  transition: color .15s;
}
.hl-card__ical:hover { color: var(--hl-primary, #1a73e8); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 639px) {
  .hl-modal-box    { border-radius: 12px 12px 0 0; max-height: 95vh; }
  .hl-modal-inner  { padding: 6px 16px 24px; }
  .hl-modal-title  { font-size: 18px; }
  .hl-modal-grid   { font-size: 12.5px; }
  .hl-modal-overlay { align-items: flex-end; padding: 0; }
}

/* ── Sync-Button (Admin AJAX) ──────────────────────────────── */
.hl-sync-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid #fff; border-top-color: transparent;
  border-radius: 50%; animation: hl-spin .6s linear infinite;
  margin-right: 6px; vertical-align: middle;
}
@keyframes hl-spin { to { transform: rotate(360deg); } }

.hl-sync-result {
  display: inline-block; margin-left: 12px;
  font-size: 13px; font-weight: 600;
  padding: 4px 12px; border-radius: 6px;
}
.hl-sync-result--ok    { background: #d4edda; color: #155724; }
.hl-sync-result--error { background: #f8d7da; color: #721c24; }
