/* =====================================================
   AniGa – modal.css
   Modal, Detail-Ansicht, Streaming, Zahlenfelder
   Teil von style.css — Reihenfolge der <link>-Tags in index.html
   entspricht der Kaskade und darf nicht vertauscht werden.
   ===================================================== */
/* ===== MODAL ===== */
.modal-overlay
{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72); backdrop-filter: blur(5px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn
{
  from
  {
    opacity: 0;
  }
  to
  {
    opacity: 1;
  }
}
.modal
{
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 92vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: popIn .22s ease;
}
@keyframes popIn
{
  from
  {
    transform: scale(.94) translateY(12px); opacity: 0;
  }
  to
  {
    transform: scale(1) translateY(0); opacity: 1;
  }
}
.modal-head
{
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; background: var(--bg2);
}
.modal-head h2
{
  font-size: 1.05rem; font-weight: 700;
}
.btn-modal-close
{
  background: none; border: none; color: var(--text2);
  padding: 5px; border-radius: 6px;
  display: flex; align-items: center; transition: all .2s;
}
.btn-modal-close:hover
{
  color: var(--text); background: var(--bg-hover);
}
.btn-modal-close svg
{
  width: 20px; height: 20px;
}
.modal-body
{
  padding: 22px; overflow-y: auto; overflow-x: hidden; flex: 1;
}
.modal-foot
{
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  flex-shrink: 0; background: var(--bg2);
}

/* ===== MEDIA DETAIL MODAL ===== */
.media-detail-hero
{
  margin: -22px -22px 20px;
  position: relative;
}
.media-detail-bg
{
  width: 100%; height: 170px; object-fit: cover;
  opacity: .35; display: block;
}
.media-detail-info
{
  position: absolute; bottom: 10px; left: 14px; right: 14px;
  display: flex; gap: 12px; align-items: flex-end;
}
.media-detail-cover
{
  width: 76px; height: 108px; border-radius: 8px; overflow: hidden;
  border: 2px solid var(--border); box-shadow: var(--shadow); flex-shrink: 0;
}
.media-detail-cover img
{
  width: 100%; height: 100%; object-fit: cover;
}
.media-detail-titles
{
  flex: 1; min-width: 0;
}
.media-detail-title
{
  font-size: 1.05rem; font-weight: 700; line-height: 1.2; margin-bottom: 3px;
}
.media-detail-title-alt
{
  font-size: .78rem; color: var(--text2);
}
.media-detail-body
{
}
.media-meta
{
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.meta-chip
{
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 9px;
  font-size: .75rem; display: flex; align-items: center; gap: 5px;
}
.meta-chip svg
{
  width: 12px; height: 12px; color: var(--accent);
}
.synopsis-text
{
  color: var(--text2); font-size: .85rem; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.synopsis-text.expanded
{
  -webkit-line-clamp: unset;
}
.btn-synopsis
{
  background: none; border: none; color: var(--accent); font-size: .8rem; font-weight: 500; margin-top: 4px; cursor: pointer; padding: 0;
}
.divider
{
  height: 1px; background: var(--border); margin: 16px 0;
}

/* ===== STREAMING ===== */
.streaming-loading
{
  font-size: .8rem; color: var(--text2); display: flex; align-items: center; gap: 5px;
}
.streaming-loading svg
{
  width: 12px; height: 12px; opacity: .6;
}
.streaming-label
{
  font-size: .75rem; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; display: flex; align-items: center; gap: 5px;
}
.streaming-label svg
{
  width: 12px; height: 12px;
}
.streaming-chips
{
  display: flex; flex-wrap: wrap; gap: 7px;
}
.streaming-chip
{
  display: inline-flex; align-items: center;
  padding: 5px 13px; border-radius: 20px; font-size: .8rem; font-weight: 600;
  border: 1.5px solid; text-decoration: none;
  background: transparent; transition: opacity .15s, background .15s;
}
.streaming-chip:hover
{
  opacity: .8;
}

/* ===== NUMBER INPUT ===== */
.num-input-wrap
{
  display: flex; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r-sm); overflow: hidden;
}
.num-btn
{
  width: 34px; height: 38px;
  background: var(--bg-hover); border: none; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s; font-size: 1.1rem; flex-shrink: 0;
}
.num-btn:hover
{
  background: var(--accent); color: #fff;
}
.num-input
{
  flex: 1; background: none; border: none;
  text-align: center; color: var(--text);
  font-size: .9rem; padding: 8px 4px; outline: none; min-width: 50px;
}
