/* Free download panel — single track post detail (mifa.dinbo.de) */

.mifa-dl {
  --mdl-gold: #ffb347;
  --mdl-gold-2: #ff9914;
  --mdl-text: #eef2f8;
  --mdl-muted: rgba(232, 238, 248, 0.62);
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 179, 71, 0.22);
  background:
    radial-gradient(700px 180px at 90% 0%, rgba(255, 153, 20, 0.16), transparent 55%),
    radial-gradient(500px 160px at 0% 100%, rgba(53, 172, 252, 0.08), transparent 50%),
    linear-gradient(165deg, #151b26 0%, #0d121a 55%, #0a0e14 100%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.mifa-dl::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mdl-gold), transparent);
  opacity: 0.8;
  pointer-events: none;
}

.mifa-dl__inner {
  position: relative;
  z-index: 1;
  padding: 1.35rem 1.35rem 1.2rem;
}

.mifa-dl__head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}

.mifa-dl__head-ico {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--mdl-gold), var(--mdl-gold-2));
  color: #1a1208;
  box-shadow: 0 8px 22px rgba(255, 153, 20, 0.35);
}

.mifa-dl__head-ico svg {
  width: 22px;
  height: 22px;
  display: block;
}

.mifa-dl__head-text {
  min-width: 0;
  flex: 1 1 auto;
}

.mifa-dl__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.mifa-dl__sub {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--mdl-muted);
  line-height: 1.5;
}

.mifa-dl__list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* ~10 track rows visible, rest scrolls; zip stays below outside this box */
.mifa-dl__list--tracks {
  max-height: 46.5rem; /* ~10 rows */
  overflow-y: auto;
  overflow-x: hidden;
  padding-left: 0.2rem;
  padding-right: 0.15rem;
  margin-bottom: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 179, 71, 0.55) rgba(255, 255, 255, 0.06);
}

.mifa-dl__list--tracks::-webkit-scrollbar {
  width: 6px;
}
.mifa-dl__list--tracks::-webkit-scrollbar-thumb {
  background: rgba(255, 179, 71, 0.5);
  border-radius: 999px;
}
.mifa-dl__list--tracks::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.mifa-dl__list--zips {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(255, 179, 71, 0.22);
}

.mifa-dl__track-num {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #1a1208;
  background: linear-gradient(145deg, #ffd28a, #ff9914);
  box-shadow: 0 4px 12px rgba(255, 153, 20, 0.28);
  font-variant-numeric: tabular-nums;
}

/* Full-width «add whole album» under panel */
.mifa-dl-album-pl,
a.mifa-dl-album-pl,
button.mifa-dl-album-pl {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin: 0 0 1rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 179, 71, 0.45) !important;
  background: linear-gradient(145deg, #ffe0a3 0%, #ffb347 50%, #ff9914 100%) !important;
  color: #1a1208 !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(255, 153, 20, 0.28);
  cursor: pointer;
}

.mifa-dl-album-pl:hover,
a.mifa-dl-album-pl:hover,
button.mifa-dl-album-pl:hover {
  filter: brightness(1.05);
  color: #1a1208 !important;
  text-decoration: none !important;
}

.mifa-dl__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(8px);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.mifa-dl__row:hover {
  border-color: rgba(255, 179, 71, 0.35);
  background: rgba(255, 153, 20, 0.07);
  transform: translateY(-1px);
}

.mifa-dl__row--zip {
  border-color: rgba(255, 90, 90, 0.22);
}

.mifa-dl__file-ico {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 153, 20, 0.12);
  color: var(--mdl-gold);
  border: 1px solid rgba(255, 179, 71, 0.2);
}

.mifa-dl__row--zip .mifa-dl__file-ico {
  background: rgba(255, 80, 80, 0.12);
  color: #ff7a7a;
  border-color: rgba(255, 100, 100, 0.25);
}

.mifa-dl__file-ico svg {
  width: 18px;
  height: 18px;
  display: block;
}

a.mifa-dl__meta {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 100%;
  text-align: right;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
}

a.mifa-dl__meta:hover .mifa-dl__name {
  color: #ffd28a;
}

.mifa-dl__name {
  display: block;
  color: var(--mdl-text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.55;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: color 0.15s ease;
}

.mifa-dl__hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--mdl-muted);
}

.mifa-dl__badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0d1a10;
  background: linear-gradient(145deg, #86efac, #22c55e);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.mifa-dl__badge--zip {
  color: #fff;
  background: linear-gradient(145deg, #fb7185, #e11d48);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.28);
}

.mifa-dl__badge--hq {
  color: #1a1208;
  background: linear-gradient(145deg, #ffd28a, var(--mdl-gold-2));
  box-shadow: 0 4px 12px rgba(255, 153, 20, 0.3);
}

.mifa-dl__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1 1 100%;
  width: 100%;
  justify-content: flex-start;
}

.mifa-dl__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 38px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 0;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.mifa-dl__btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* Force dark ink on gold — theme `a { color: … }` was wiping the label */
a.mifa-dl__btn--dl,
a.mifa-dl__btn--dl:link,
a.mifa-dl__btn--dl:visited,
a.mifa-dl__btn--dl:hover,
a.mifa-dl__btn--dl:focus,
a.mifa-dl__btn--dl:active {
  color: #1a1208 !important;
  background: linear-gradient(145deg, #ffe0a3 0%, #ffb347 45%, #ff9914 100%) !important;
  box-shadow: 0 8px 20px rgba(255, 153, 20, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

a.mifa-dl__btn--dl span {
  color: #1a1208 !important;
  font-weight: 800;
  font-size: 0.84rem;
  line-height: 1;
  opacity: 1 !important;
  visibility: visible !important;
  display: inline !important;
}

a.mifa-dl__btn--dl svg {
  width: 15px;
  height: 15px;
  display: block;
  flex-shrink: 0;
}

a.mifa-dl__btn--dl svg path {
  fill: #1a1208 !important;
}

button.mifa-dl__btn--play {
  color: #eef2f8 !important;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

button.mifa-dl__btn--play:hover {
  border-color: rgba(255, 179, 71, 0.45);
  background: rgba(255, 153, 20, 0.14);
  color: #fff !important;
}

button.mifa-dl__btn--play.is-playing {
  color: #1a1208 !important;
  background: linear-gradient(145deg, #86efac, #22c55e);
  border-color: transparent;
}

button.mifa-dl__btn--play svg {
  width: 14px;
  height: 14px;
  display: block;
  flex-shrink: 0;
}

button.mifa-dl__btn--play .is-hidden {
  display: none !important;
}

button.mifa-dl__btn--play .mifa-dl__play-label {
  font-weight: 800;
  font-size: 0.84rem;
  line-height: 1;
}

/* Keep playlist JS class; restyle when inside download panel */
.mifa-dl .mifa-addpl-btn {
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e8eef8;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.mifa-dl .mifa-addpl-btn:hover {
  border-color: rgba(255, 179, 71, 0.4);
  background: rgba(255, 153, 20, 0.12);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 767.98px) {
  .mifa-dl__inner {
    padding: 1.1rem 0.95rem 1rem;
  }

  .mifa-dl__row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .mifa-dl__meta {
    flex: 1 1 calc(100% - 120px);
  }

  .mifa-dl__actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 0.15rem;
  }

  .mifa-dl__btn--dl,
  .mifa-dl__btn--play {
    flex: 1 1 auto;
  }
}

/* Song lyrics button + on-page modal */
.mifa-dl .mifa-lyrics-btn {
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 179, 71, 0.35);
  background: rgba(255, 153, 20, 0.14);
  color: #ffd699;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.mifa-dl .mifa-lyrics-btn:hover {
  border-color: rgba(255, 179, 71, 0.55);
  background: rgba(255, 153, 20, 0.22);
  color: #fff;
}

.mifa-lyrics-src {
  display: none !important;
}

.mifa-lyrics-modal[hidden] {
  display: none !important;
}
.mifa-lyrics-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.mifa-lyrics-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 14, 0.72);
  backdrop-filter: blur(4px);
}
.mifa-lyrics-modal__box {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(255, 179, 71, 0.28);
  background: linear-gradient(165deg, #171e2a 0%, #0e131b 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.mifa-lyrics-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 153, 20, 0.08);
}
.mifa-lyrics-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #fff4e0;
  line-height: 1.4;
}
.mifa-lyrics-modal__close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.mifa-lyrics-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
}
.mifa-lyrics-modal__body {
  padding: 1.15rem 1.2rem 1.35rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: #e8eef8;
  font-size: 0.98rem;
  line-height: 2;
  text-align: center;
  white-space: normal;
}
.mifa-lyrics-modal__body br {
  content: "";
}
body.mifa-lyrics-open {
  overflow: hidden;
}

