@charset "UTF-8";

/* ============================================================
   Digitale Rezept Bibliothek - Stylesheet
   Schriften: Playfair Display + DM Sans
   ============================================================ */

/* -- Hero ---------------------------------------------------- */
.hero {
  padding: 5rem 2.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero-text h1 em { font-style: italic; color: var(--terracotta); }
.hero-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  font-weight: 300;
}
.hero-actions { display: flex; gap: 1rem; align-items: center; }

.btn-large {
  padding: 0.75rem 1.75rem;
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.2s;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}
.btn-terracotta { background: var(--terracotta); color: #fff !important; border: none; text-decoration: none; }
.btn-terracotta:hover { background: #a85226; transform: translateY(-1px); color: #fff !important; }
.btn-outline-dark { background: transparent; color: var(--warm-dark); border: 1.5px solid var(--text-main); }
.btn-outline-dark:hover { background: var(--text-main); color: var(--cream); }

/* -- Suchbox ------------------------------------------------- */
.hero-search {
  background: var(--card-bg);
  border: 1px solid var(--light-border);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 4px 30px rgba(0,0,0,0.06);
  transition: var(--transition);
}
.search-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 0.75rem;
}
.search-bar { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.search-bar input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--light-border);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--terracotta); }
.search-bar button {
  padding: 0.6rem 1.2rem;
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  font-size: 0.875rem;
}
.tag-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag {
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}
.tag-sage { background: #e8ede5; color: var(--sage); border: 1px solid #c8d4c3; }
.tag-sage:hover { background: var(--sage); color: white; }
.tag-gold { background: #f5eddb; color: #9a7530; border: 1px solid #e0d0a8; }
.tag-gold:hover { background: var(--gold); color: var(--warm-dark); }
.tag-terra { background: #f5e8e0; color: var(--terracotta); border: 1px solid #e0c5b5; }
.tag-terra:hover { background: var(--terracotta); color: white; }

/* -- Stats-Leiste -------------------------------------------- */
.stats-bar {
  background: var(--stats-bg);
  padding: 1.25rem 2.5rem;
  transition: var(--transition);
}
.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 3rem;
  align-items: center;
}
.stat { text-align: center; }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--gold);
}
.stat-label {
  font-size: 0.75rem;
  color: #7a706a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-divider { width: 1px; height: 40px; background: #3a3530; }

/* -- Sections & Rezept-Grid ---------------------------------- */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
}
.section-header a {
  color: var(--terracotta);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.recipe-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--light-border);
  transition: all 0.25s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.recipe-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.recipe-card:first-child { grid-column: span 2; }

.card-image {
  height: 200px;
  background: linear-gradient(135deg, #d4a57a 0%, #c1622f 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.recipe-card:first-child .card-image { height: 240px; }
.card-image .emoji {
  font-size: 3.5rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  opacity: 0.8;
}
.card-category {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(6px);
  color: white;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.card-body { padding: 1.25rem; }
.card-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}
.card-body p { font-size: 0.85rem; color: var(--text-muted); font-weight: 300; }
.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 0.75rem;
}

/* -- Kategorien ---------------------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.category-item {
  background: var(--card-bg);
  border: 1px solid var(--light-border);
  border-radius: 8px;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.category-item:hover { border-color: var(--terracotta); background: var(--bg); }
.cat-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.cat-name { font-size: 0.85rem; font-weight: 500; color: var(--text-main); }
.cat-count { font-size: 0.75rem; color: var(--text-subtle); margin-top: 0.2rem; }

/* -- Import/Export-Bar --------------------------------------- */
.action-bar {
  background: linear-gradient(135deg, #1e1a16 0%, #2d2620 100%);
  padding: 2.5rem;
}
.action-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.action-card {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.action-icon { font-size: 2rem; flex-shrink: 0; }
.action-text h4 {
  font-family: 'Playfair Display', serif;
  color: var(--cream);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.action-text p { font-size: 0.8rem; color: #7a706a; line-height: 1.4; }
.action-btn {
  margin-left: auto;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  flex-shrink: 0;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-sage { background: var(--sage); color: white; border: none; }
.btn-sage:hover { background: #657a58; }
.btn-gold { background: var(--gold); color: var(--warm-dark); border: none; }
.btn-gold:hover { background: #b8973e; }

/* -- Auth-Seiten (Login / Register) ------------------------- */
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--bg);
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--light-border);
  border-radius: 14px;
  padding: 2.75rem 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,.07);
  transition: var(--transition);
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo-mark {
  font-size: 2.25rem;
  margin-bottom: .5rem;
}

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--text-main);
  text-align: center;
  margin-bottom: .35rem;
}

.auth-sub {
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.auth-sub a {
  color: var(--terracotta);
  text-decoration: none;
  font-weight: 500;
}

.auth-sub a:hover { text-decoration: underline; }


.auth-errors {
  background: #f5e8e0;
  border-left: 3px solid var(--terracotta);
  border-radius: 8px;
  padding: .8rem 1rem;
  margin-bottom: 1.25rem;
  font-size: .85rem;
  color: #7a2210;
}

.auth-errors ul { padding-left: 1.1rem; }
.auth-errors li { margin-bottom: .2rem; }

.auth-btn {
  width: 100%;
  padding: .75rem;
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .02em;
  transition: all .2s;
  margin-top: .5rem;
}

.auth-btn:hover { background: #a85226; transform: translateY(-1px); }

.auth-remember { margin-bottom: 1.4rem !important; }

/* Sterne-Bewertung */
.recipe-rating {
    padding: .75rem 0 .5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: .75rem;
}
.recipe-rating__label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-subtle);
    margin-bottom: .35rem;
}
.recipe-rating__stars { display: flex; gap: .2rem; }
.star {
    background: none; border: none; cursor: pointer;
    font-size: 1.6rem; line-height: 1;
    color: var(--border);
    transition: color .1s, transform .1s;
    padding: 0;
}
.star--on { color: var(--gold); }
.star:hover { transform: scale(1.15); }

/* Bring! Listen-Status */
.bring-list-status {
    padding: .6rem .8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .88rem;
}
.bring-list-status__current {
    display: flex; align-items: center; gap: .5rem;
    color: var(--text);
}
.bring-list-status__icon { font-size: 1rem; }
.bring-list-status__empty {
    color: var(--text-subtle);
    font-style: italic;
}
.auth-remember__label {
    display: flex; align-items: center; gap: .6rem;
    font-size: .88rem; color: var(--text-muted); cursor: pointer;
}
.auth-remember__check {
    width: 1.1rem; height: 1.1rem; cursor: pointer;
    accent-color: var(--terracotta);
}

.auth-divider {
  text-align: center;
  font-size: .8rem;
  color: var(--text-subtle);
  margin: 1.4rem 0;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--light-border);
}

.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.pw-strength-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--light-border);
  margin-top: .45rem;
  overflow: hidden;
}

.pw-strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .3s, background .3s;
  width: 0%;
}

@media (max-width: 640px) {
  .auth-card { padding: 2rem 1.5rem; }
}

/* -- Rezept-Liste -------------------------------------------- */

/* Gleichmaessiges Grid (kein span-2 auf Karte 1) */
.recipe-grid--uniform .recipe-card:first-child {
  grid-column: span 1;
}
.recipe-grid--uniform .recipe-card:first-child .card-image {
  height: 200px;
}

/* Filter-Bar */
.filter-bar {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1.1rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--light-border);
  border-radius: 10px;
  transition: var(--transition);
}

.filter-search {
  display: flex;
  flex: 1;
  min-width: 200px;
  gap: .5rem;
}

.filter-search input {
  flex: 1;
  padding: .55rem .85rem;
  border: 1.5px solid var(--light-border);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  background: var(--bg);
  color: var(--text-main);
  outline: none;
  transition: border-color .2s;
}
.filter-search input:focus { border-color: var(--terracotta); }

.filter-search button {
  padding: .55rem 1rem;
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.filter-search button:hover { background: #a85226; }

.filter-select {
  padding: .55rem .85rem;
  border: 1.5px solid var(--light-border);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  color: var(--text-main);
  background: var(--bg);
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
  min-width: 150px;
}
.filter-select:focus { border-color: var(--terracotta); }

.filter-divider {
  width: 1px;
  height: 28px;
  background: var(--light-border);
  flex-shrink: 0;
}

/* Aktive Filter-Tags */
/* Erweiterte Filter */
.filter-advanced {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
}
.filter-advanced__toggle {
    padding: .6rem 1rem;
    cursor: pointer;
    font-size: .85rem;
    color: var(--text-muted);
    font-weight: 500;
    list-style: none;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.filter-advanced__toggle::-webkit-details-marker { display: none; }
.filter-advanced[open] .filter-advanced__toggle { border-bottom: 1px solid var(--border); }
.filter-advanced__body {
    padding: .85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.filter-adv-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.filter-adv-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-subtle);
    min-width: 90px;
}
.filter-adv-input {
    flex: 1;
    min-width: 160px;
    padding: .4rem .7rem;
    font-size: .85rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-card);
    color: var(--text);
}
.filter-adv-select {
    padding: .4rem .7rem;
    font-size: .85rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
}
.filter-adv-clear {
    color: var(--text-subtle);
    text-decoration: none;
    font-size: .9rem;
    padding: .2rem .4rem;
}
.filter-active-dot { color: var(--terracotta); font-size: .7rem; }

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .65rem;
  background: #f5e8e0;
  color: var(--terracotta);
  border: 1px solid #e0c5b5;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
}
.active-filter:hover { background: var(--terracotta); color: white; }
.active-filter__x { font-size: .7rem; opacity: .7; }

/* Ergebnis-Info */
.results-info {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.results-info strong { color: var(--text-main); }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: .5rem;
}
.empty-state__text { font-size: .9rem; margin-bottom: 1.5rem; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 .75rem;
  border: 1.5px solid var(--light-border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  color: var(--text-main);
  background: var(--card-bg);
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
}
.page-btn:hover { border-color: var(--terracotta); color: var(--terracotta); }
.page-btn--active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: white;
  font-weight: 600;
}
.page-btn--disabled { opacity: .4; pointer-events: none; }
.page-dots { color: var(--text-subtle); padding: 0 .25rem; line-height: 38px; }

@media (max-width: 1024px) {
  .filter-bar { gap: .6rem; }
  .filter-divider { display: none; }
}

@media (max-width: 640px) {
  .filter-search { min-width: 100%; }
  .filter-select { flex: 1; min-width: 0; }
}

/* -- Einkaufsliste Aktionen ---------------------------------- */
.shopping-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .85rem;
}

.shopping-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .85rem;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .2s;
}

.shopping-btn--bring  { background: var(--gold); color: var(--warm-dark); }
.shopping-btn--bring:hover { background: #b8973e; }
.shopping-btn--print  { background: var(--bg); color: var(--text-main); border: 1.5px solid var(--light-border); }
.shopping-btn--print:hover  { border-color: var(--text-main); }
.shopping-btn--copy   { background: var(--bg); color: var(--text-main); border: 1.5px solid var(--light-border); }
.shopping-btn--copy.copied  { border-color: var(--sage); color: var(--sage); }

/* Druckansicht Einkaufsliste */
@media print {
  .planner-grid, .planner-nav, nav, footer,
  .shopping-btn--bring, .shopping-btn--print, .shopping-btn--copy,
  .similar-section { display: none !important; }

  .bring-summary {
    border: 1px solid #ccc !important;
    background: white !important;
    page-break-inside: avoid;
  }

  .bring-summary__items {
    display: block !important;
  }

  .bring-summary__item {
    display: block;
    padding: .4rem 0;
    border-bottom: 1px solid #eee;
    border-radius: 0 !important;
    background: none !important;
    font-size: 1rem;
  }

  .bring-summary__title::after {
    content: " - " attr(data-week);
  }
}

/* -- Planner Drag & Drop ------------------------------- */
.planner-recipe[draggable="true"] { cursor: grab; }
.planner-recipe.dragging { opacity: .4; cursor: grabbing; }
.planner-cell.drag-over {
  background: rgba(193,98,47,.08);
  outline: 2px dashed var(--terracotta);
  outline-offset: -2px;
}

/* -- Tap/Klick-Tooltips (data-tooltip) -----------------------
   Funktioniert auf Touch UND Desktop, im Gegensatz zum nativen
   title-Attribut, das auf Mobile nicht zuverlaessig anzeigt. */
[data-tooltip] {
  position: relative;
}
.tooltip-bubble {
  position: fixed;
  z-index: 9999;
  max-width: 260px;
  background: var(--ink, #1a1a1a);
  color: #fff;
  font-size: .8rem;
  line-height: 1.4;
  padding: .55rem .75rem;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.tooltip-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
}
