/* Shared Magical Meta house-ad carousel (Dash gutters + home after-choice). */

.mm-house-slot {
  box-sizing: border-box;
  width: 100%;
}

.mm-house-slot[hidden] {
  display: none !important;
}

html.mm-ad-free .mm-house-slot,
html.mm-ad-free .mm-home-v2-ad {
  display: none !important;
}

.mm-house-img-link {
  display: block;
  line-height: 0;
}

.mm-house-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

.mm-house {
  box-sizing: border-box;
  width: 100%;
}

.mm-house--sky {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  min-height: 600px;
  padding: 1.1rem 0.75rem;
  background: linear-gradient(180deg, #221318 0%, #140c0e 55%, #0f0b0c 100%);
  color: #e8e8e8;
  text-align: center;
}

.mm-house--inline {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mm-house--band {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.85rem 1rem 0.75rem;
  border: 1px solid rgba(255, 66, 77, 0.35);
  border-radius: 10px;
  background: linear-gradient(135deg, #1a1214 0%, #121212 55%, #0f0f0f 100%);
  color: #e8e8e8;
}

.mm-house-logo {
  display: block;
  width: 108px;
  height: auto;
  margin: 0.1rem 0 0.15rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.mm-house--band .mm-house-logo {
  width: 96px;
  margin: 0 auto 0.15rem;
}

.mm-house-track {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
}

.mm-house-slide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.mm-house-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.mm-house-slide:not(.is-active) {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 0;
}

/* Controls order must be: [ < ]  ● ● ● ●  [ > ] (arrows flanking dots). */
.mm-house-controls {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-top: 0.2rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Legacy wrapper (prev+next grouped): flatten children into the flex row. */
.mm-house-nav {
  display: contents;
}

.mm-house-nav-btn {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  min-width: 1.45rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #f0f0f0;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

/* Explicit order so even legacy grouped markup reads [ < ] dots [ > ]. */
.mm-house-controls > .mm-house-nav-btn[data-mm-house-nav="prev"],
.mm-house-controls > .mm-house-nav > .mm-house-nav-btn[data-mm-house-nav="prev"] {
  order: 1;
}

.mm-house-controls > .mm-house-dots {
  order: 2;
}

.mm-house-controls > .mm-house-nav-btn[data-mm-house-nav="next"],
.mm-house-controls > .mm-house-nav > .mm-house-nav-btn[data-mm-house-nav="next"] {
  order: 3;
}

.mm-house-nav-btn:hover,
.mm-house-nav-btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  outline: none;
}

.mm-house-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
}

.mm-house-dot {
  appearance: none;
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.mm-house-dot:hover,
.mm-house-dot:focus-visible {
  background: rgba(255, 255, 255, 0.45);
  outline: none;
}

.mm-house-dot.is-active {
  background: #ff424d;
}

.mm-house--inline .mm-house-dot.is-active {
  background: #ff6b73;
}

.mm-sky {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  box-sizing: border-box;
  width: 100%;
  padding: 0.15rem 0 0.35rem;
  color: #e8e8e8;
  text-align: center;
  background: transparent;
}

.mm-sky-badge,
.mm-band-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #ff424d;
  box-shadow: 0 0 0 3px rgba(255, 66, 77, 0.18);
}

.mm-sky--discord .mm-sky-badge,
.mm-band--discord .mm-band-badge {
  background: #5865f2;
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.22);
}

.mm-sky--affiliate .mm-sky-badge,
.mm-band--affiliate .mm-band-badge {
  background: #3d7a4a;
  box-shadow: 0 0 0 3px rgba(61, 122, 74, 0.22);
}

.mm-sky .mm-fb-mark,
.mm-sky-badge .mm-fb-mark,
.mm-band-badge .mm-fb-mark {
  display: block;
  width: 13px;
  height: 13px;
  fill: #fff;
}

.mm-sky-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  color: #f5f5f5;
}

.mm-sky-copy {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #b8b0b2;
  max-width: 11.5em;
}

.mm-sky-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.35rem;
  padding: 0.48rem 0.7rem;
  width: 100%;
  max-width: 132px;
  box-sizing: border-box;
  border-radius: 6px;
  background: #ff424d;
  color: #fff !important;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  text-align: center;
}

.mm-sky--discord .mm-sky-cta {
  background: #5865f2;
}

.mm-sky--discord .mm-sky-cta:hover {
  background: #6d78f5;
}

.mm-sky--affiliate .mm-sky-cta {
  background: #3d7a4a;
}

.mm-sky--affiliate .mm-sky-cta:hover {
  background: #4b915a;
}

.mm-sky-cta:hover {
  background: #ff6b73;
  color: #fff !important;
}

.mm-sky-alt {
  display: block;
  margin-top: 0.15rem;
  color: #9a9a9a;
  font-size: 0.66rem;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mm-sky-alt:hover {
  color: #f0f0f0;
}

.mm-fb {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem 0.55rem 0.85rem;
  background: #1a1a1a;
  border: 1px solid rgba(255, 66, 77, 0.42);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.mm-fb-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff424d;
  border-radius: 999px;
  padding: 0.24rem 0.5rem;
  line-height: 1;
}

.mm-fb-mark {
  display: block;
  width: 11px;
  height: 11px;
  fill: #fff;
}

.mm-fb-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: #c0c0c0;
}

.mm-fb-cta {
  display: inline;
  margin-left: 0.1rem;
  color: #ff424d;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.mm-fb-cta:hover {
  color: #ff6b73;
}

.mm-fb-alt {
  display: inline;
  margin-left: 0.55rem;
  color: #9a9a9a;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.mm-fb-alt:hover {
  color: #f0f0f0;
}

.mm-fb--discord {
  border-color: rgba(88, 101, 242, 0.45);
}

.mm-fb--discord .mm-fb-badge {
  background: #5865f2;
}

.mm-fb--discord .mm-fb-cta {
  color: #8b95ff;
}

.mm-fb--discord .mm-fb-cta:hover {
  color: #b0b7ff;
}

.mm-fb--affiliate {
  border-color: rgba(61, 122, 74, 0.45);
}

.mm-fb--affiliate .mm-fb-badge {
  background: #3d7a4a;
}

.mm-fb--affiliate .mm-fb-cta {
  color: #6fc87f;
}

.mm-fb--affiliate .mm-fb-cta:hover {
  color: #95db9f;
}

/* Home after-choice band: same pitches, horizontal strip. */
.mm-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem 1rem;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  padding: 0.35rem 0.15rem;
}

.mm-band-copy {
  min-width: 0;
}

.mm-band-title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f5f5f5;
  line-height: 1.25;
}

.mm-band-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #b8b0b2;
}

.mm-band-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.mm-band-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  background: #ff424d;
  color: #fff !important;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  box-sizing: border-box;
  max-width: 100%;
}

.mm-band-cta:hover {
  background: #ff6b73;
  color: #fff !important;
}

.mm-band--discord .mm-band-cta {
  background: #5865f2;
}

.mm-band--discord .mm-band-cta:hover {
  background: #6d78f5;
}

.mm-band--affiliate .mm-band-cta {
  background: #3d7a4a;
}

.mm-band--affiliate .mm-band-cta:hover {
  background: #4b915a;
}

.mm-band-alt {
  color: #9a9a9a;
  font-size: 0.7rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mm-band-alt:hover {
  color: #f0f0f0;
}

.mm-home-v2-ad {
  max-width: 1400px;
  margin: 1.25rem auto 2rem;
  padding: 0 1rem;
  text-align: left;
  border: 0;
  color: inherit;
  font-size: inherit;
  position: relative;
  box-sizing: border-box;
}

.mm-home-v2-ad.is-recovery,
.mm-home-v2-ad.mm-house-slot {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (max-width: 720px) {
  .mm-home-v2-ad,
  .mm-home-v2-ad.is-recovery,
  .mm-home-v2-ad.mm-house-slot {
    margin: 1rem auto 1.5rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .mm-house--band {
    padding: 0.9rem 0.85rem 0.8rem;
    gap: 0.55rem;
  }

  .mm-band {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem 0.75rem;
    padding: 0.15rem 0;
  }

  .mm-band-actions {
    grid-column: 1 / -1;
    align-items: stretch;
    gap: 0.4rem;
    padding: 0 0.1rem;
  }

  .mm-band-cta {
    width: auto;
    align-self: stretch;
    padding: 0.55rem 1rem;
    margin: 0;
  }

  .mm-band-alt {
    text-align: center;
  }

  .mm-house-controls {
    margin-top: 0.35rem;
    gap: 0.65rem;
  }

  .mm-fb {
    align-items: flex-start;
  }

  .mm-fb-cta,
  .mm-fb-alt {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-house-slide {
    transition: none !important;
  }
}
