/* Spartent Club Info – UI v1.0 · iPhone 15 / 16 */

:root {
  --color-red: #b91c1c;
  --color-red-dark: #991b1b;
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #4b5563;
  --color-border: #e5e7eb;
  --color-nav-bg: #fafafa;
  --color-card-shadow: rgba(0, 0, 0, 0.07);
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-size-base: 1.125rem;
  --line-height: 1.5;
  --space-xs: 0.375rem;
  --space-sm: 0.625rem;
  --space-md: 1rem;
  --space-lg: 1.25rem;
  --space-xl: 1.75rem;
  --radius: 12px;
  --radius-sm: 8px;
  --touch-min: 50px;
  --nav-height: 76px;
  /* iPhone 15/16: 393px · Pro Max: 430px */
  --max-width: 430px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  max-width: var(--max-width);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 8px);
  -webkit-font-smoothing: antialiased;
}

/* —— Kopfzeile mit Logo —— */
.site-header {
  background: var(--color-red);
  color: #fff;
  padding-top: max(env(safe-area-inset-top, 0px), 12px);
  padding-right: var(--space-md);
  padding-bottom: var(--space-md);
  padding-left: var(--space-md);
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 10px var(--color-card-shadow);
}

.site-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

/* —— Inhalt —— */
.main-content {
  padding: var(--space-lg) var(--space-md) var(--space-md);
}

.view[hidden] {
  display: none !important;
}

.block {
  margin-bottom: var(--space-xl);
}

.block--compact {
  margin-bottom: var(--space-lg);
}

.block-heading {
  margin: 0 0 var(--space-md);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
}

.block-heading--small {
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.block-intro {
  margin: 0 0 var(--space-lg);
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

.empty-hint {
  margin: 0;
  padding: var(--space-md);
  text-align: center;
  font-size: 1rem;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
}

/* —— Datum (gross, rot) —— */
.datum {
  margin: 0;
  font-weight: 800;
  color: var(--color-red);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.datum--compact {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

/* —— Organisator: 👤 Name —— */
.organisator--compact {
  margin: var(--space-xs) 0 var(--space-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* —— Termin-Karten (kompakt) —— */
.termine-list--compact {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.termin-card--compact {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fafafa;
  box-shadow: none;
}

.termin-card__aktivitaet {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* —— Buttons: 📄 Einladung öffnen —— */
.btn-invite {
  display: block;
  min-height: var(--touch-min);
  line-height: 1.35;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--color-red);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

.class-width-full {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

button.btn-invite {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  -webkit-user-select: none;
  user-select: none;
}

.btn-invite--compact {
  min-height: 44px;
  margin-top: var(--space-xs);
  padding: 0.5rem var(--space-sm);
  font-size: 0.9375rem;
  font-weight: 600;
}

.btn-invite--list {
  min-height: 56px;
  font-size: 1.0625rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--color-card-shadow);
}

.btn-invite:active {
  background: var(--color-red-dark);
}

.btn-invite--disabled {
  background: #9ca3af;
  pointer-events: none;
  cursor: default;
}

/* —— Einladungen-Liste —— */
.einladungen-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* —— Navigation unten (iPhone Safe Area) —— */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 20;
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md) max(env(safe-area-inset-bottom, 0px), 10px);
  background: var(--color-nav-bg);
  border-top: 2px solid var(--color-border);
  box-shadow: 0 -4px 20px var(--color-card-shadow);
}

.bottom-nav__btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: calc(var(--nav-height) - 12px);
  padding: var(--space-xs) var(--space-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__icon {
  font-size: 1.625rem;
  line-height: 1;
}

.bottom-nav__btn--active {
  color: var(--color-red);
  background: #fff;
  box-shadow: 0 1px 8px var(--color-card-shadow);
}

.bottom-nav__btn--active .bottom-nav__label {
  font-weight: 800;
}

/* iPhone 15 / 16 (393px) und Pro Max (430px) */
@media (min-width: 390px) {
  :root {
    --font-size-base: 1.1875rem;
  }

  .site-title {
    font-size: 1.35rem;
  }

  .datum--compact {
    font-size: 1.5625rem;
  }
}

/* Grössere Schrift wenn Nutzer System-Zoom nutzt */
@media (prefers-reduced-motion: reduce) {
  .btn-invite:active {
    transition: none;
  }
}
