/* -------------------------------------------------------------
   GENERAL LAYOUT
------------------------------------------------------------- */

/* Die linke Card soll nicht ewig lang werden:
   Header sichtbar lassen, Inhalt scrollbar */
.card.h-100 .card-body {
  overflow-y: auto;
  max-height: calc(100vh - 140px);
  padding-right: 6px; /* scrollbar overlap vermeiden */
}

/* Preview nicht zentrieren */
.preview-canvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin-top: 0; /* sicherstellen, dass es oben klebt */
}


/* Slightly elevated titlebar */
.shadow-sm-sm {
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* Navigation hover style */
.nav-link-custom {
  font-size: 0.9rem;
  font-weight: 500;
  color: #444 !important;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link-custom:hover {
  color: #000 !important;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

/* Logo subtle animation / looks dynamic */
.navbar-brand:hover {
  opacity: .9;
}

.nav-link-custom {
  font-weight: 600;  /* etwas fetter */
}

.card-header {
  background: #fafafa;
  font-size: 0.95rem;
}


/* -------------------------------------------------------------
   ACCORDION COMPACT VERSION
------------------------------------------------------------- */

.accordion-button-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.accordion-body {
  padding: 0.75rem !important;
}

.form-label-sm {
  font-size: 0.8rem;
  margin-bottom: 0.15rem;
}

.form-select-sm, 
.form-control-sm {
  font-size: 0.82rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* -------------------------------------------------------------
   SHAPE MODAL GRID
------------------------------------------------------------- */

#shapeGrid img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.1);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
}

#shapeGrid img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(0,0,0,0.15);
}

/* Cards im Modal kompakt */
#shapeGrid .col {
  padding: 4px;
}

/* Modal Header/Body optimieren */
#shapeModal .modal-body {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

/* -------------------------------------------------------------
   LEFT PANEL REFINEMENTS
------------------------------------------------------------- */

/* Kleinere Abstande zwischen Sections */
.card-body section {
  margin-bottom: 1rem;
}

/* Title spacing minimaler */
.card-body h6 {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Buttons kompakter */
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.82rem;
}

/* Status-Label */
#statusInfo {
  min-height: 18px;
  display: block;
}

/* Make textarea text smaller but readable */
#wordsInput {
  font-size: 0.85rem;
  line-height: 1.25rem;
  text-transform: uppercase;
}

/* Preview-Text */
#fontPreview {
  padding: 4px 6px;
  border-radius: 4px;
  background: #f8f9fa;
}

/* Larger generate button */
#btnGenerate {
  padding-top: 0.9rem !important;
  padding-bottom: 0.9rem !important;
  font-size: 1.5rem;
}

/* Larger generate button */
#btnExportPng, #btnPinterest, #btnCopyLink {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  font-size: 1.05rem;
}


/* Versuch, im Select selbst die Fonts zu zeigen (Browser-Unterstützung variiert) */
#fontSelect option[value="Anton"] {
  font-family: 'Anton', system-ui, sans-serif;
}
#fontSelect option[value="Bangers"] {
  font-family: 'Bangers', system-ui, sans-serif;
}
#fontSelect option[value="Oswald"] {
  font-family: 'Oswald', system-ui, sans-serif;
}
#fontSelect option[value="Montserrat"] {
  font-family: 'Montserrat', system-ui, sans-serif;
}
#fontSelect option[value="Playfair Display"] {
  font-family: 'Playfair Display', system-ui, serif;
}

#colorPreview {
  min-height: 1.4em;          /* ungefähr wie eine Textzeile */
}

.color-swatch {
  width: 18px;
  height: 24px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: inline-block;
  margin-right: 4px;
  margin-top: 2px;
}


/* -------------------------------------------------------------
   RESPONSIVE TWEAKS
------------------------------------------------------------- */

@media (max-width: 991px) {
  /* Auf Tablets/kleinen Screens: Card-Body nicht fix hoch */
  .card.h-100 .card-body {
    max-height: none;
    overflow-y: visible;
  }

  /* Modal grid großzügiger */
  #shapeGrid {
    row-gap: 12px;
  }
}

/* Mobile: preview should always use full width, height may scroll */
@media (max-width: 767.98px) {
  .preview-canvas {
    width: 100%;
    max-width: 100%;
    height: auto;      /* Höhe ergibt sich aus Breite (quadratisches Canvas) */
    max-height: none;  /* keine Begrenzung über die Höhe */
  }

  /* Canvas nicht in der Mitte “einspannen”, sondern normal einfügen */
  .card-body.d-flex .preview-canvas {
    align-self: stretch;
  }
}