/**
 * designer.css – Chrome-Styles rund um den FPD-Canvas (CTA-Leiste, Footer-Preis,
 * Anfrage-Modal, Reset-/Verlassen-Dialoge, Vorlagen-Galerie + Lightbox).
 *
 * Bewusst self-contained (bs-*-Klassen, keine Tailwind-Arbitrary-Values), damit
 * die Designer-Seite unabhängig vom kompilierten app.css korrekt aussieht.
 * Das FPD-eigene Aussehen + alle bs-*-Toolbar-Injektionen kommen aus fpd-brand.css.
 */

:root {
  --bs-green: #3f8a2f;
  --bs-green-dark: #2a6f1a;
  --bs-green-light: #4fa03a;
  --bs-red: #c6000f;
  --bs-red-dark: #a40210;
}

/* ── Designer-Karte ──────────────────────────────────────────────────────── */
.bs-designer-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.bs-stage-wrap { position: relative; }

.bs-loading {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(255, 255, 255, .9);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem;
  border-radius: 16px;
}
.bs-spinner {
  width: 2rem; height: 2rem; border-radius: 9999px;
  border: 2px solid var(--bs-green); border-top-color: transparent;
  animation: bs-spin .8s linear infinite;
}
.bs-loading-text { color: #6b7280; font-size: .875rem; }
@keyframes bs-spin { to { transform: rotate(360deg); } }

/* ── CTA-Leiste ──────────────────────────────────────────────────────────── */
.bs-cta-bar {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #f4f6f4;
  display: flex; flex-direction: column; gap: 1rem;
  align-items: stretch;
}
@media (min-width: 640px) {
  .bs-cta-bar { flex-direction: row; align-items: center; justify-content: space-between; }
}
.bs-cta-left { display: flex; flex-direction: column; gap: .75rem; flex: 1; align-items: flex-start; }
@media (min-width: 640px) { .bs-cta-left { flex-direction: row; align-items: center; } }
.bs-cta-text { font-size: .875rem; color: #4b5563; margin: 0; }

/* Buttons */
.bs-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--bs-green); color: #fff;
  border: none; border-radius: 12px;
  padding: .75rem 1.25rem; font-size: .875rem; font-weight: 700; cursor: pointer;
  transition: background-color .15s; box-shadow: 0 8px 20px -8px rgba(63, 138, 47, .5);
}
.bs-btn-primary:hover { background: var(--bs-green-light); }
.bs-btn-primary:disabled { opacity: .5; cursor: default; }
.bs-anfrage-cta { flex-shrink: 0; }

.bs-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: #fff; color: #4b5563;
  border: 1px solid #d1d5db; border-radius: 10px;
  padding: .55rem .875rem; font-size: .75rem; font-weight: 600; cursor: pointer;
  transition: color .15s, border-color .15s; flex-shrink: 0;
}
.bs-btn-ghost:hover { color: var(--bs-red); border-color: var(--bs-red); }
.bs-btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bs-red); color: #fff; border: none; border-radius: 12px;
  padding: .625rem 1rem; font-size: .875rem; font-weight: 700; cursor: pointer; transition: background-color .15s;
}
.bs-btn-danger:hover { background: var(--bs-red-dark); }
.bs-flex1 { flex: 1; }

/* ── Set-Info + Preis ────────────────────────────────────────────────────── */
.bs-set-info { flex-shrink: 0; text-align: right; }
.bs-set-head { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.bs-tier-badge {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 8px; border-radius: 9999px; background: #e5e7eb; color: #374151;
}
.bs-tier-badge.bs-tier-premium { background: var(--bs-green); color: #fff; }
.bs-set-name { font-family: 'Kanit', sans-serif; font-weight: 600; color: #111827; font-size: .875rem; }

.bs-price-row { margin-top: .375rem; display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.bs-age-toggle {
  display: inline-flex; align-items: center; overflow: hidden;
  border: 1px solid #e5e7eb; border-radius: 10px; font-size: 11px; font-weight: 600;
}
.bs-age-btn { padding: .25rem .5rem; background: #fff; color: #4b5563; border: none; cursor: pointer; transition: background-color .15s, color .15s; }
.bs-age-btn:hover { background: #f9fafb; }
.bs-age-btn.bs-age-active { background: var(--bs-green); color: #fff; }

.bs-price-wrap { position: relative; }
.bs-price-btn {
  display: inline-flex; align-items: baseline; gap: .25rem; cursor: help;
  background: none; border: none; padding: 0;
}
.bs-price-total { font-family: 'Kanit', sans-serif; font-weight: 700; color: #111827; font-size: 1.125rem; line-height: 1; }
.bs-breakdown {
  display: none; position: absolute; right: 0; bottom: 100%; margin-bottom: .5rem; width: 13rem;
  border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .3);
  padding: .75rem; text-align: left; z-index: 50;
}
.bs-bd-title { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #9ca3af; font-weight: 600; margin: 0 0 .375rem; }
.bs-bd-line { display: flex; justify-content: space-between; gap: 1rem; font-size: .75rem; color: #4b5563; padding: 1px 0; }
.bs-bd-line span:last-child, .bs-bd-sum span:last-child { font-variant-numeric: tabular-nums; }
.bs-bd-sum { display: flex; justify-content: space-between; gap: 1rem; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid #f3f4f6; font-size: .875rem; font-weight: 700; color: #111827; }
.bs-price-loading { font-size: .75rem; color: #9ca3af; margin-top: .125rem; }

/* ── Info-Karten (Preise / Musterpaket) ──────────────────────────────────── */
.bs-info-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .bs-info-grid { grid-template-columns: 1fr 1fr; } }
.bs-info-card {
  display: flex; align-items: center; gap: 1rem; text-decoration: none;
  border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05); transition: border-color .15s, box-shadow .15s;
}
.bs-info-card:hover { border-color: var(--bs-green); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .2); }
.bs-info-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 2.75rem; height: 2.75rem; border-radius: 12px; background: rgba(63, 138, 47, .1); color: var(--bs-green);
}
.bs-info-body { flex: 1; min-width: 0; }
.bs-info-title { display: block; font-family: 'Kanit', sans-serif; font-weight: 700; color: #111827; }
.bs-info-sub { display: block; font-size: .875rem; color: #6b7280; }
.bs-info-arrow { color: var(--bs-green); transition: transform .15s; }
.bs-info-card:hover .bs-info-arrow { transform: translateX(4px); }

/* ── Vorlagen-Galerie ────────────────────────────────────────────────────── */
.bs-gallery-head { margin-bottom: 1.5rem; }
.bs-gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (min-width: 640px) { .bs-gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .bs-gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.bs-gallery-item {
  display: flex; flex-direction: column; text-align: left; cursor: pointer; padding: 0;
  border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; overflow: hidden;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .15); transition: box-shadow .2s, transform .2s;
}
.bs-gallery-item:hover { box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .25); transform: translateY(-4px); }
.bs-gallery-item:focus { outline: 2px solid var(--bs-green); outline-offset: 2px; }
.bs-gallery-thumb { position: relative; aspect-ratio: 1 / 1; background: #f4f6f4; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bs-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; transition: transform .2s; }
.bs-gallery-item:hover .bs-gallery-thumb img { transform: scale(1.05); }
.bs-gallery-empty { color: #9ca3af; font-size: .75rem; }
.bs-gallery-hover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0); transition: background-color .2s; }
.bs-gallery-item:hover .bs-gallery-hover { background: rgba(0, 0, 0, .1); }
.bs-gallery-hover-badge { opacity: 0; transition: opacity .2s; background: rgba(255, 255, 255, .9); color: #1f2937; font-size: .75rem; font-weight: 600; border-radius: 9999px; padding: .375rem .75rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.bs-gallery-item:hover .bs-gallery-hover-badge { opacity: 1; }

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.bs-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .95); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.bs-lb-close { position: absolute; top: 1rem; right: 1rem; color: rgba(255, 255, 255, .7); background: none; border: none; cursor: pointer; padding: .5rem; border-radius: 9999px; z-index: 10; }
.bs-lb-close:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.bs-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, .7); background: none; border: none; cursor: pointer; padding: .75rem; border-radius: 9999px; z-index: 10; }
.bs-lb-nav:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.bs-lb-prev { left: 1rem; }
.bs-lb-next { right: 1rem; }
.bs-lb-stage { position: relative; max-width: 56rem; width: 100%; max-height: 85vh; }
.bs-lb-box { background: #fff; border-radius: 16px; padding: 1rem; }
@media (min-width: 640px) { .bs-lb-box { padding: 1.5rem; } }
.bs-lb-box img { object-fit: contain; max-height: 70vh; width: 100%; margin: 0 auto; display: block; }
.bs-lb-counter { text-align: center; color: rgba(255, 255, 255, .4); font-size: .875rem; margin-top: 1rem; }

/* ── Modale (Anfrage / Reset / Verlassen) ────────────────────────────────── */
.bs-modal { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .4); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.bs-modal-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 1.5rem; width: 100%; max-width: 32rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .35); max-height: 90vh; overflow-y: auto; }
.bs-modal-sm { max-width: 24rem; }
.bs-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.bs-modal-title { font-size: 1.125rem; font-weight: 700; color: #111827; margin: 0 0 .25rem; }
.bs-modal-sub { font-size: .875rem; color: #6b7280; margin: 0; }
.bs-modal-x { background: none; border: none; font-size: 1.1rem; color: #9ca3af; cursor: pointer; line-height: 1; padding: .25rem; }
.bs-modal-x:hover { color: #374151; }

.bs-fields { display: flex; flex-direction: column; gap: .75rem; }
.bs-input {
  width: 100%; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: .625rem 1rem; color: #111827; font-size: .875rem; outline: none; transition: border-color .15s; box-sizing: border-box;
}
.bs-input::placeholder { color: #9ca3af; }
.bs-input:focus { border-color: var(--bs-green); }
.bs-textarea { resize: none; }
.bs-err { color: #dc2626; font-size: .75rem; margin: 0; }

.bs-company { margin-top: 1rem; border-top: 1px solid #e5e7eb; padding-top: 1rem; }
.bs-company-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; text-align: left; font-size: .875rem; font-weight: 500; color: #374151; background: none; border: none; cursor: pointer; padding: 0; }
.bs-company-toggle:hover { color: var(--bs-green); }
.bs-optional { margin-left: .5rem; font-size: .75rem; font-weight: 400; color: #9ca3af; }
.bs-company-hint { font-size: .75rem; color: #6b7280; margin: .25rem 0 0; }
.bs-company-fields { display: flex; flex-direction: column; gap: .75rem; margin-top: .75rem; }
.bs-grid-plz { display: grid; grid-template-columns: 1fr 2fr; gap: .75rem; }
.bs-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.bs-modal-actions { display: flex; gap: .75rem; margin-top: 1.25rem; }
.bs-modal-actions .bs-btn-ghost, .bs-modal-actions .bs-btn-primary, .bs-modal-actions .bs-btn-danger { padding: .625rem 1rem; border-radius: 12px; }
.bs-modal-actions .bs-btn-ghost { border-color: #e5e7eb; }
.bs-modal-actions .bs-btn-ghost:hover { color: #111827; border-color: #d1d5db; }

.bs-success { text-align: center; padding: 1.5rem 0; }
.bs-success-icon { width: 3.5rem; height: 3.5rem; border-radius: 9999px; background: rgba(63, 138, 47, .1); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.bs-success-title { color: #111827; font-weight: 700; font-size: 1.125rem; margin: 0 0 .5rem; }
.bs-success-text { color: #6b7280; font-size: .875rem; margin: 0 0 1.5rem; }
