/* File: assets/css/agency-artists.css
 *
 * Common styling for archive + single templates.
 * Keep neutral; integrate with theme by using reasonable defaults and avoiding global selectors.
 */

:root {
  --agency-filter-control-min-height: 36px;
  --agency-gap: 18px;
  --agency-radius: 16px;
  --agency-border: rgba(0,0,0,0.12);
  --agency-muted: rgba(0,0,0,0.65);

  /* Filter sizing (tune these first if the filter bar feels too large/small) */
  --agency-filter-label-size: 10px;
  --agency-filter-label-color: rgba(0,0,0,0.55);
  --agency-filter-control-font-size: 13px;
  --agency-filter-control-pad-y: 4px;
  --agency-filter-control-pad-x: 8px;
  --agency-filter-control-radius: 8px;

  /* Filter action buttons (submit/reset) */
  --agency-filter-action-btn-font-size: 12px;
  --agency-filter-action-btn-pad-y: 9px;
  --agency-filter-action-btn-pad-x: 12px;
  --agency-filter-action-btn-radius: 10px;

  /* "Mehr Filter" summary toggle */
  --agency-filter-more-font-size: 14px;
  --agency-filter-more-pad-y: 6px;
  --agency-filter-more-pad-x: 12px;
  --agency-filter-more-radius: 999px;

  /* Card teaser highlight */
  --agency-card-quote-bg: rgba(0,0,0,0.035);
  --agency-card-quote-border: rgba(0,0,0,0.06);
  --agency-card-quote-mark: rgba(0,0,0,0.25);

  /* Card badges / pills + fixed card heights */
  --agency-badge-height: 28px;
  --agency-card-meta-height: calc(var(--agency-badge-height) + var(--agency-badge-height) + 8px); /* 2 rows + 8px gap */
  --agency-card-hint-height: calc(4.05em + 20px); /* 3 lines (1.35em) + padding */

  /* Multi-select dropdown panel */
  --agency-ms-panel-max-height: 280px;
}

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

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

.agency-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--agency-border);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font: inherit;
  line-height: 1;
}

.agency-btn:hover { filter: brightness(0.98); }
.agency-btn:focus { outline: 2px solid rgba(0,0,0,0.2); outline-offset: 2px; }
.agency-btn--primary {
  background: rgba(0,0,0,0.9);
  border-color: rgba(0,0,0,0.9);
  color: #fff;
}

.agency-badge {
  display: inline-flex;
  align-items: center;
  height: var(--agency-badge-height, 28px);
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--agency-border);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

.agency-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--agency-border);
  font-size: 13px;
  line-height: 1;
}

.agency-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Archive */
.agency-archive {
  /* Align archive layout with block theme global sizes (TT5/child theme) */
  max-width: var(--wp--style--global--content-size, 1180px);
  margin: 0 auto;
  padding-top: var(--wp--preset--spacing--50, 28px);
  padding-bottom: var(--wp--preset--spacing--70, 56px);
  padding-left: var(--wp--style--root--padding-left, 16px);
  padding-right: var(--wp--style--root--padding-right, 16px);
}

.agency-archive__header {
  margin-bottom: 18px;
}
.agency-archive__title {
  margin: 0 0 6px;
}

.agency-archive__title {
  font-size: 1.875rem;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .agency-archive__title {
    font-size: 2.0625rem;
  }
}

@media (min-width: 1024px) {
  .agency-archive__title {
    font-size: clamp(2.0625rem, 1.98rem + 0.4vw, 2.25rem);
  }
}
.agency-archive__desc {
  color: var(--agency-muted);
}

.agency-filters {
  border: 1px solid var(--agency-border);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 18px;
}

.agency-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.agency-field {
  flex: 1 1 180px;
  min-width: 160px;
}

.agency-field--name {
  flex: 2 1 260px;
  min-width: 220px;
}

.agency-field--age {
  flex: 1 1 240px;
  min-width: 210px;
}

.agency-field > label {
  display: block;
  font-size: var(--agency-filter-label-size);
  margin-bottom: 3px;
  color: var(--agency-filter-label-color);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.agency-field input:not([type="checkbox"]):not([type="radio"]),
.agency-field select {
  width: 100%;
  padding: var(--agency-filter-control-pad-y) var(--agency-filter-control-pad-x);
  border-radius: var(--agency-filter-control-radius);
  border: 1px solid var(--agency-border);
  background: transparent;
  font: inherit;
  font-size: var(--agency-filter-control-font-size);
  line-height: 1.2;

  min-height: var(--agency-filter-control-min-height);
  box-sizing: border-box;
}

/* Native <select>: vereinheitlichte Caret-Optik & identischer Abstand wie Multi-Select-Toggle */
.agency-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;

  /* Platz für Caret einplanen (gleiche Logik wie bei .agency-ms__toggle) */
  padding-right: calc(var(--agency-filter-control-pad-x) + 22px);
}


.agency-field input:not([type="checkbox"]):not([type="radio"]) {
  height: var(--agency-filter-control-min-height);
}

/* ---------------------------------------------------------------------------
 * Filter controls – sizing override (high specificity)
 *
 * Some themes/plugins may apply generic form-control sizing rules that override
 * our base selectors. These scoped rules ensure consistent control height
 * specifically inside the artist archive filter form.
 * ------------------------------------------------------------------------ */
.agency-filters__form .agency-field input:not([type="checkbox"]):not([type="radio"]),
.agency-filters__form .agency-field select,
.agency-filters__form .agency-ms__toggle {
  min-height: var(--agency-filter-control-min-height);
}

.agency-filters__form .agency-field input:not([type="checkbox"]):not([type="radio"]),
.agency-filters__form .agency-inline > input {
  height: var(--agency-filter-control-min-height);
}







/* Checkbox Multi-select (Kategorie / Skills) */
.agency-ms {
  position: relative;
}

.agency-ms__toggle {
  width: 100%;
  padding: var(--agency-filter-control-pad-y) var(--agency-filter-control-pad-x);
  border-radius: var(--agency-filter-control-radius);
  border: 1px solid var(--agency-border);
  background: transparent;
  font: inherit;
  font-size: var(--agency-filter-control-font-size);
  font-weight: 400;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;

  min-height: var(--agency-filter-control-min-height);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: calc(var(--agency-filter-control-pad-x) + 22px);
  appearance: none;
}

.agency-ms__toggle::after {
  content: "";
  display: none;
}


.agency-ms__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  border: 1px solid var(--agency-border);
  border-radius: 12px;
  background: rgba(255,255,255,0.98);
  max-height: var(--agency-ms-panel-max-height);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  padding: 6px;

  font-size: var(--agency-filter-control-font-size);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.agency-ms__option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;

  font-size: var(--agency-filter-control-font-size);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.agency-ms__option:hover {
  background: rgba(0,0,0,0.04);
}

.agency-ms__option input[type="checkbox"] {
  margin: 0;
  flex: 0 0 auto;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.agency-ms__label {
  display: inline-block;
  white-space: normal;
}
.agency-inline {
  display: flex;
  align-items: center;

  /*
   * Wichtig: Auf einigen Layouts wirkte der Separator (–) optisch so,
   * als läge er "im" Min-Feld. Ursache ist i.d.R. ein ungünstiges Grid-Layout
   * mit sehr kleinen Track-Maxima und einem breiten Container.
   *
   * Flexbox sorgt dafür, dass beide Inputs gleichmäßig Platz bekommen
   * und der Separator stabil dazwischen sitzt.
   */
  gap: 6px;
}

.agency-inline > input {
  flex: 1 1 0;
  min-width: 0; /* verhindert Überlauf in engen Viewports */
}

.agency-inline__sep {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-inline: 2px;
  color: var(--agency-muted);
}




/* Normalize number inputs (Chrome) so Min/Max heights match other controls. */
.agency-field input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
  -webkit-appearance: none;
}
.agency-field input[type="number"]::-webkit-outer-spin-button,
.agency-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.agency-help { margin: 6px 0 0; font-size: 10px; color: var(--agency-muted); }

/* Filter action bar (submit/reset + counter) */
.agency-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

/* Action buttons (submit/reset) – sized for comfortable tap targets */
.agency-filters__actions .agency-btn {
  padding: var(--agency-filter-action-btn-pad-y) var(--agency-filter-action-btn-pad-x);
  border-radius: var(--agency-filter-action-btn-radius);
  font-size: var(--agency-filter-action-btn-font-size);
}

.agency-filters__count {
  margin-left: auto;
  color: var(--agency-muted);
  font-size: 12px;
}

.agency-filters__more {
  margin-top: 8px;
}

.agency-filters__more summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: var(--agency-filter-more-pad-y) var(--agency-filter-more-pad-x);
  border-radius: var(--agency-filter-more-radius);
  border: 1px solid var(--agency-border);
  background: rgba(0,0,0,0.02);
  font-size: var(--agency-filter-more-font-size);
  color: rgba(0,0,0,0.78);
  user-select: none;
}

/* Hide native marker and add a consistent caret */
.agency-filters__more summary {
  list-style: none;
}
.agency-filters__more summary::-webkit-details-marker { display: none; }
.agency-filters__more summary::marker { content: ""; }
.agency-filters__more summary::after {
  content: "";
  width: 16px;
  height: 16px;
  opacity: 0.8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  transition: transform 120ms ease;
}
.agency-filters__more[open] summary::after {
  transform: rotate(180deg);
}
.agency-filters__more[open] summary {
  margin-bottom: 10px;
}

.agency-results { margin-top: 18px; }

.agency-grid {
  display: grid;
  gap: var(--agency-gap);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1040px) {
  .agency-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .agency-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .agency-grid { grid-template-columns: 1fr; }
}

.agency-card {
  border-radius: var(--agency-radius);
  overflow: hidden;
  border: 1px solid var(--agency-border);
  background: rgba(255,255,255,0.5);
}

.agency-card__link { display: block; color: inherit; text-decoration: none; }

.agency-card__media { aspect-ratio: 4 / 5; background: rgba(0,0,0,0.05); }
.agency-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.agency-card__img--placeholder { width: 100%; height: 100%; }

.agency-card__body { padding: 12px 12px 14px; }
.agency-card__title { margin: 0 0 10px; font-size: 18px; line-height: 1.2; }

.agency-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: var(--agency-card-meta-height);
  max-height: var(--agency-card-meta-height);
  overflow: hidden;
  align-content: flex-start;
}

.agency-card__hint {
  margin: 10px 0 0;
  min-height: var(--agency-card-hint-height);
  max-height: var(--agency-card-hint-height);
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--agency-card-quote-border);
  background: var(--agency-card-quote-bg);
  font-size: 14px;
  line-height: 1.35;
  font-style: italic;
  position: relative;

  /* Vertical centering for 1–3 lines */
  display: flex;
  align-items: center;
}

.agency-card__hint-text {
  /* keep text left-aligned, but clamp to keep cards uniform */
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



.agency-card__hint::before,
.agency-card__hint::after {
  position: absolute;
  font-size: 22px;
  line-height: 1;
  color: var(--agency-card-quote-mark);
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
 * Card hint / teaser (Zitat) – Variante: "Linie + Quote"
 *
 * Anforderungen:
 * - Rahmen/Box um Zitat/Teaser entfernen
 * - Aktuelle Quote-Marks entfernen
 * - Stattdessen: oben & unten je eine dezente Linie,
 *   mittig unterbrochen durch deutsches Anführungs-/Schlusszeichen.
 * ------------------------------------------------------------------------ */
.agency-card__hint {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 8px 0;
  margin: 10px 0 0;
}

/* Keine dekorativen Pseudo-Quotes aus älteren Varianten. */
.agency-card__hint::before,
.agency-card__hint::after {
  content: "";
  display: none;
}

/* Zitat-Text: dezent, elegant – kursiv + sehr subtiler "pressed"/engraved Touch. */
.agency-card__hint-text {
  margin: 8px 0;
  font-style: italic;
  text-shadow:
    0  1px 0 rgba(255, 255, 255, 0.60),
    0 -1px 0 rgba(0,   0,   0,   0.12);
}

/* Quote-Rules (oben/unten) */
.agency-card__quote-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--agency-muted);
}

.agency-card__quote-rule-line {
  flex: 1 1 auto;
  height: 1px;
  background: rgba(0, 0, 0, 0.10);
}

.agency-card__quote-rule-mark {
  flex: 0 0 auto;
  font-size: 2em; /* gut sichtbar, aber farblich dezent */
  line-height: 1;
  opacity: 0.85;
}

/* Kleine optische Ausrichtung: deutsches Öffnungszeichen sitzt typografisch "unten". */
.agency-card__quote-rule--top .agency-card__quote-rule-mark {
  transform: translateY(0.08em);
}

/* Schlusszeichen sitzt typografisch oben. */
.agency-card__quote-rule--bottom .agency-card__quote-rule-mark {
  transform: translateY(-0.06em);
}

/* Wenn leer (Platzhalter für gleich hohe Cards): keine Linien/Marks anzeigen. */
.agency-card__hint--empty .agency-card__quote-rule {
  display: none;
}


.agency-loadmore { display: flex; justify-content: center; margin-top: 18px; }


.agency-card__hint--empty {
  visibility: hidden;
}

/* "Mehr Filter" / "Weniger Filter" – je nach Zustand */
.agency-filters__more-label--less { display: none; }
.agency-filters__more[open] .agency-filters__more-label--more { display: none; }
.agency-filters__more[open] .agency-filters__more-label--less { display: inline; }
