/* =========================================================================
   Der Charakter-Simulator, Teil 2: Ausrüstung und Kostüm, Reiter mit Suche,
   Unterreiter mit Favoriten, die Trefferliste und das Figuren-Fenster.

   Werte aus launcher/src/styles/anprobe.css, datenbank.css (Suchfeld) und
   bereiche.css (Fenster), nur gelesen. Siehe Kopf von simulator.css.
   ========================================================================= */

/* ------------------------------------------- Ausrüstung und Kostüm */

.ap-plaetze {
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: gap 380ms ease;
}

.ap-plaetze.is-zu {
  gap: 0;
}

/* Zu FÄHRT der Teil zusammen, er verschwindet nicht schlagartig. */
.ap-klappbereich {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 500ms ease;
}

.ap-plaetze.is-zu .ap-klappbereich {
  grid-template-rows: 0fr;
  transition-duration: 380ms;
}

.ap-klappinhalt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow: hidden;
  opacity: 1;
  transition: opacity 300ms ease 200ms;
}

.ap-plaetze.is-zu .ap-klappinhalt {
  opacity: 0;
  transition-duration: 240ms;
  transition-delay: 0ms;
}

.ap-platzzeile {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.ap-reihenkopf {
  font-size: calc(0.625rem * var(--asg-schrift-skala));
  font-weight: 600;
  color: #a8945f;
}

.ap-platz {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  min-height: 30px;
  padding: 3px 8px;
  background: rgb(255 255 255 / 3%);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 7px;
}

.ap-platzname {
  color: rgb(210 190 150 / 62%);
  font-size: calc(0.625rem * var(--asg-schrift-skala));
}

.ap-teilbild {
  flex: none;
  width: 24px;
  height: 24px;
}

.ap-teilname {
  flex: 1;
  overflow: hidden;
  color: rgb(238 228 208 / 90%);
  font-size: calc(0.6875rem * var(--asg-schrift-skala));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ap-ablegen {
  flex: 0 0 auto;
  padding: 0 6px;
  cursor: pointer;
  background: transparent;
  border: 0;
  color: rgb(210 190 150 / 60%);
  font: inherit;
  font-size: calc(0.875rem * var(--asg-schrift-skala));
  line-height: 1;
}

.ap-ablegen:hover {
  color: rgb(238 228 208 / 95%);
}

/* ------------------------------------------------- Reiter und Suche */

.ap-kats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 8px;
  transition: margin-top 380ms ease;
}

.ap-plaetze.is-zu + .ap-kats {
  margin-top: 0;
}

.ap-kats.is-aus .ap-kat {
  opacity: 0.5;
}

.ap-kat {
  padding: 4px 10px;
  border: 1px solid rgb(232 195 122 / 28%);
  border-radius: 6px 6px 0 0;
  font-family: inherit;
  font-size: calc(0.65rem * var(--asg-schrift-skala));
  color: #cfc2a4;
  background: rgb(12 10 8 / 75%);
  cursor: pointer;
}

.ap-kat:hover,
.ap-kat.is-an {
  color: var(--asg-gold);
  border-color: rgb(232 195 122 / 60%);
}

.ap-kat.is-an {
  background: rgb(232 195 122 / 8%);
}

.ap-suchzeile {
  position: relative;
  display: flex;
  flex: 0 1 33%;
  align-items: center;
  min-width: 120px;
  margin-left: auto;
}

.ap-suchfeld {
  width: 100%;
  padding: 7px 26px 7px 9px;
  background: rgb(0 0 0 / 28%);
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 7px;
  color: rgb(238 228 208 / 92%);
  font: inherit;
  font-size: calc(0.75rem * var(--asg-schrift-skala));
}

.ap-suchfeld:focus {
  border-color: rgb(214 176 106 / 55%);
  outline: none;
}

.ap-suchfeld::-webkit-search-cancel-button {
  display: none;
}

.ap-leeren {
  position: absolute;
  right: 5px;
  padding: 0 4px;
  cursor: pointer;
  background: transparent;
  border: 0;
  color: rgb(210 190 150 / 60%);
  font: inherit;
  font-size: calc(0.875rem * var(--asg-schrift-skala));
  line-height: 1;
}

.ap-leeren:hover {
  color: rgb(238 228 208 / 95%);
}

/* ------------------------------------- Unterreiter und Favoriten-Knopf */

.ap-unterreihe {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 26px;
  margin-top: 2px;
}

.ap-unterkats {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  min-height: 26px;
  animation: ap-einschieben 180ms ease-out;
}

@keyframes ap-einschieben {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.ap-unterkat {
  padding: 2px 8px;
  cursor: pointer;
  background: rgb(12 10 8 / 55%);
  border: 1px solid rgb(232 195 122 / 16%);
  border-radius: 5px;
  color: rgb(207 194 164 / 85%);
  font-family: inherit;
  font-size: calc(0.6rem * var(--asg-schrift-skala));
}

.ap-unterkat:hover {
  color: var(--asg-gold);
  border-color: rgb(232 195 122 / 45%);
}

.ap-unterkat.is-an {
  color: var(--asg-gold);
  background: rgb(232 195 122 / 10%);
  border-color: rgb(232 195 122 / 50%);
}

.ap-fav {
  display: inline-flex;
  flex: none;
  gap: 4px;
  align-items: center;
  min-height: 26px;
  padding: 2px 12px;
  white-space: nowrap;
}

/* ----------------------------------------------------- Trefferliste */

.ap-treffer {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  margin: 6px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgb(232 195 122 / 45%) transparent;
}

.ap-treffer > li {
  flex: none;
}

.ap-zeile-fest {
  height: 32px;
  overflow: hidden;
}

.ap-zeile-stern {
  position: relative;
  display: flex;
  align-items: center;
}

.ap-trefferknopf {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 3px 8px;
  text-align: left;
  cursor: pointer;
  background: rgb(255 255 255 / 3%);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 7px;
  color: rgb(238 228 208 / 88%);
  font: inherit;
}

.ap-zeile-stern > .ap-trefferknopf {
  flex: 1;
  min-width: 0;
  padding-right: 26px;
}

.ap-trefferknopf:hover {
  background: rgb(214 176 106 / 12%);
  border-color: rgb(214 176 106 / 35%);
}

.ap-trefferknopf.is-an {
  background: rgb(214 176 106 / 16%);
  border-color: rgb(214 176 106 / 45%);
  color: var(--asg-gold);
}

.ap-stern {
  position: absolute;
  top: 50%;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 26px;
  padding: 0;
  transform: translateY(-50%);
  cursor: pointer;
  background: transparent;
  border: 0;
  color: rgb(210 190 150 / 45%);
  font: inherit;
  font-size: calc(0.8125rem * var(--asg-schrift-skala));
  line-height: 1;
}

.ap-stern:hover,
.ap-stern.is-an {
  color: var(--asg-gold);
}

/* --- Der Kasten beim Überfahren (Beutetipp, groß, fest rechts) -------------
   Optik von `.mo__itemtipp` (features/monster/monster-item-tip.css); dazu, was nur die große Fassung des
   Launchers hat: Kurztext und Händler (`monster.css`, 0.79.10).
   Code: assets/js/features/simulator/item-tip.js */

.ap-itemtipp {
  z-index: 40;
}

.ap-itemtipp .mo__itemtext {
  display: -webkit-box;
  height: 30px;
  overflow: hidden;
  color: rgb(255 255 255 / 74%);
  font-size: 0.6rem;
  line-height: 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ap-itemhaendler {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 8px;
  background: rgb(255 255 255 / 4%);
  border-top: 1px solid rgb(255 255 255 / 12%);
}
