/* foto-upload.css — Styling für foto-upload__btn und foto-vorschau-modal. */

/* ── Upload-Button im Header ──────────────────────────────────────────── */

.foto-upload__btn {
  gap: var(--space-2);
  color: var(--text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.foto-upload__btn:hover {
  color: var(--text-primary);
}

.foto-upload__btn svg {
  flex-shrink: 0;
  color: currentColor;
}

.foto-upload__label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1;
}

/* ── Vorschau-Modal: Liste der erkannten Einträge ─────────────────────── */

.foto-vorschau__liste {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-3);
  max-height: 60vh;
  overflow-y: auto;
  padding-right: var(--space-1);
}

/* Scrollbar dezent */
.foto-vorschau__liste::-webkit-scrollbar {
  width: 4px;
}
.foto-vorschau__liste::-webkit-scrollbar-track {
  background: transparent;
}
.foto-vorschau__liste::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

/* ── Einzelne Zeile ───────────────────────────────────────────────────── */

.foto-vorschau__zeile {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.foto-vorschau__zeile:focus-within {
  border-color: var(--profil-aktiv);
  box-shadow: var(--shadow-focus);
}

/* ── Checkbox-Zeile ───────────────────────────────────────────────────── */

.foto-vorschau__check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.foto-vorschau__check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--profil-aktiv);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Felder-Grid ──────────────────────────────────────────────────────── */

.foto-vorschau__felder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

/* Titel und Kategorie volle Breite */
.foto-vorschau__felder .feld__input:nth-child(2),
.foto-vorschau__felder .feld__select {
  grid-column: span 2;
}

@media (max-width: 480px) {
  .foto-vorschau__felder {
    grid-template-columns: 1fr;
  }
  .foto-vorschau__felder .feld__input:nth-child(2),
  .foto-vorschau__felder .feld__select {
    grid-column: span 1;
  }
}

/* ── Loading-State am Button ──────────────────────────────────────────── */

.foto-upload__btn[aria-busy="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.foto-upload__btn[aria-busy="true"] svg {
  animation: foto-upload-spin 1s linear infinite;
}

@keyframes foto-upload-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .foto-upload__btn[aria-busy="true"] svg {
    animation: none;
  }
}
