/* ============================================================
   PuroArchive – Base Styles (base.css)
   Reset, Typografie, Layout-Grundgerüst, iOS-Fixes
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,700;0,900;1,400&display=swap');

/* === RESET === */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  /* iOS: verhindert Zoom bei Input-Fokus */
  touch-action: manipulation;
}

body {
  height: 100%;
  overflow: hidden;
  position: fixed;
  width: 100%;
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Kein Text-Selection-Highlighting auf Buttons */
  -webkit-user-select: none;
  user-select: none;
}

/* Nur in Texteingaben erlauben */
input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

button {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

/* === APP-WRAPPER === */

#app {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-bg);
}

/* === SCREEN-CONTAINER === */

.screen-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Alle Screens: absolut positioniert, standardmäßig rechts versteckt */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  overflow: hidden;
  will-change: transform;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  pointer-events: none;
  opacity: 1;
}

.screen.active {
  transform: translateX(0);
  pointer-events: auto;
}

/* Home-Screen: kein Translate, direkt sichtbar */
.screen--home {
  transform: translateX(0);
}

/* Screen-Inhalt (scrollbarer Bereich unter der Nav) */
.screen-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-top: calc(44px + var(--safe-top));
  padding-left: var(--space-5);
  padding-right: var(--space-5);
  padding-bottom: calc(var(--space-10) + var(--safe-bottom));
}

/* Screen-Inhalt ohne seitliche Innenabstände (z.B. für Kamera-Vollbild) */
.screen-content--flush {
  padding-left: 0;
  padding-right: 0;
}

/* === TYPOGRAFIE-KLASSEN === */

.wordmark {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-xl);
  letter-spacing: var(--letter-spacing-tight);
  text-transform: uppercase;
  color: var(--color-text);
  line-height: 1;
}

.label-uppercase {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
}

.card-title {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-2xl);
  letter-spacing: var(--letter-spacing-tight);
  line-height: 1.1;
  color: var(--color-text);
}

.body-text {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--color-text);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-sm {
  font-size: var(--font-size-sm);
}

.text-xs {
  font-size: var(--font-size-xs);
}

/* === HILFSKLASSEN === */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.w-full { width: 100%; }
.h-full { height: 100%; }

/* === SCROLLBAR AUSBLENDEN === */

.screen-content::-webkit-scrollbar,
.scroll-area::-webkit-scrollbar {
  display: none;
}

.screen-content,
.scroll-area {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* === iOS SAFE AREA UTILITIES === */

.pb-safe {
  padding-bottom: calc(var(--space-5) + var(--safe-bottom));
}

/* === DIVIDER === */

.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-4) 0;
}

/* === LEERER ZUSTAND === */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-8);
  text-align: center;
  gap: var(--space-3);
}

.empty-state__icon {
  font-size: 48px;
  opacity: 0.3;
}

.empty-state__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-muted);
}

.empty-state__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 240px;
}
