/* ==========================================================================
   Support.css — Support downloads page (items + language dropdown)
   --------------------------------------------------------------------------
      Contents: Support page shell • Background/creatures • Content container • Support item card • Responsive
   Notes: Uses :has(...) to swap flag icons based on selected <option>. Ensure target browsers support :has().
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page language selector (flag inside <select>)
   -------------------------------------------------------------------------- */

.support-select {
  width: clamp(180px, 18vw, 260px);
  max-width: 100%;
  position: relative;

  --flag-size: 36px;
  --flag-left: 6px;
  --flag-gap: 8px;
}

.support-select[data-lang="en"]::before {
  background-image: url("/assets/img/icons/flags/english-flag.jpg");
}

.support-select[data-lang="de"]::before {
  background-image: url("/assets/img/icons/flags/germany-flag.jpg");
}

.support-select::before {
  content: "";
  position: absolute;
  left: var(--flag-left);
  top: 50%;
  transform: translateY(-50%);

  width: var(--flag-size);
  height: var(--flag-size);
  border-radius: 50%;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  pointer-events: none;
}

/* Keep your existing :has(...) behavior */
.support-select:has(.zl-dd)::before {
  content: none;
  display: none;
}

.support-select:has(select option[value="de"]:checked)::before {
  background-image: url("/assets/img/icons/flags/germany-flag.jpg");
}

.support-select select {
  width: 100%;
  background: #FFF1E1;
  border: 1px solid #E5E5E6;
  border-radius: 999px;

  /* IMPORTANT: don’t use shorthand padding that overwrites padding-left */
  padding-left: calc(var(--flag-left) + var(--flag-size) + var(--flag-gap));
  padding-right: 44px;
  padding-top: 13px;
  padding-bottom: 13px;

  cursor: pointer;
  font-size: 16px;
  font-family: "Inter", sans-serif;

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background-image: url("/assets/img/icons/Down-Arrow.png");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px 10px;
}

.support-select select:focus-visible {
  outline: 2px solid rgba(255, 45, 85, 0.35);
  outline-offset: 2px;
}


/* --------------------------------------------------------------------------
   Page shell + background
   -------------------------------------------------------------------------- */

.support-parent-div {
  width: 100%;
  position: relative;

  overflow-x: hidden;
  overflow-y: visible;

  background-color: #FFF1E1;

  display: flex;
  flex-direction: column;

  --creatures-reserved-space: clamp(90px, 8vw, 140px);

  min-height: 0;

  --creature-right-pad: 26px;
  --creature-bottom: 0px;
}

.support-parent-div::after{
  content: "";
  display: block;
  flex: 1 1 auto;

  background: #fff;

  position: relative;
  z-index: 1;

  pointer-events: none;
}

.support-parent-div.faq-parent-div::after {
  content: none;
  display: none;
}

.support-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  object-position: 65% 40%;

  z-index: 0;
  pointer-events: none;
  user-select: none;
}


/* --------------------------------------------------------------------------
   Content container
   -------------------------------------------------------------------------- */

.support-content-div {
  position: relative;
  z-index: 3;
  width: min(1100px, 92vw);
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  padding-top: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(30px, 5vw, 70px);
}

.support-content-div h1 {
  font-size: clamp(28px, 3vw, 36px);
  color: #FF2D55;
  margin: 0;
  font-family: "Fredoka", sans-serif;
  font-weight: bold;
  line-height: 1.15;
}

.support-content-div>p {
  font-size: clamp(15px, 1.4vw, 18px);
  color: #000000;
  margin-top: 10px;
  margin-bottom: clamp(14px, 2vw, 24px);
  font-family: "Inter", sans-serif;
  font-weight: 400;
  line-height: 1.35;
  max-width: 100%;
}


/* Items list */

.support-items-container {
  width: 100%;
  overflow: visible;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.2vw, 18px);
}

.support-empty {
  background: #fff;
  border-radius: 25px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.12);
  padding: 28px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  max-width: 980px;
  margin: 0 auto;
}

.support-empty h3 {
  margin: 0 0 8px 0;
  font-family: "Fredoka", sans-serif;
  font-weight: bold;
  color: #ff2d55;
}

.support-empty p {
  margin: 0 0 18px 0;
  font-family: "Inter", sans-serif;
  color: #404040;
  line-height: 1.4;
}

.support-empty-action {
  background-color: #ffcc00;
  color: #000;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Fredoka", sans-serif;
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}



/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 1400px) {
  .support-content-div {
    width: min(1200px, 86vw);
  }
}


/* Decorative creatures (absolute) */

.support-creatures {
  position: relative;
  z-index: 2;
  pointer-events: none;
  user-select: none;

  margin-top: clamp(16px, 3vh, 40px);

  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;

  padding-right: var(--creature-right-pad);
  padding-bottom: var(--creature-bottom);

  box-sizing: border-box;
}

/* Ground line attached to the monsters */
.support-creatures::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 2px;
  background: rgba(255, 255, 255, 0.85);

  z-index: 0;
  pointer-events: none;
}

.support-creature {
  display: block;
  width: auto;
  height: clamp(78px, 7.5vw, 120px);
  object-fit: contain;
  position: relative;
  z-index: 1;
}


@media (min-width: 2000px) {
  .support-parent-div {
    /* Same idea, slightly higher floor for very large screens */
    min-height: 0;

    --creature-right-pad: 60px;
    --creature-bottom: 0px;
  }
}

@media (max-width: 1700px) {
  .support-background {
    object-position: 72% 40%;
  }

  .support-parent-div {
    --creature-right-pad: 34px;
    --creature-bottom: 0px;
  }
}

@media (max-width: 1100px) {
  .support-parent-div {
    --creatures-reserved-space: clamp(140px, 20vw, 220px);
    min-height: 0;

    --creature-right-pad: clamp(12px, 4vw, 28px);
    --creature-bottom: 0px;
  }
}

@media (max-width: 820px) {
  .support-parent-div {
    --creatures-reserved-space: clamp(170px, 26vw, 280px);
    --creature-right-pad: clamp(10px, 4vw, 22px);
  }
}

@media (max-width: 640px) {
  .support-select {
    width: 100%;
  }
}

@media (max-width: 425px) {
  .support-parent-div {
    --creatures-reserved-space: clamp(190px, 34vw, 320px);
    --creature-right-pad: 14px;
  }

  .support-creature {
    height: clamp(64px, 18vw, 100px);
  }
}


/* --------------------------------------------------------------------------
   Support item card
   -------------------------------------------------------------------------- */

.support-item-parent-div {
  margin: 0;
  padding: 0;
  border: 0;

  display: flex;
  flex-direction: row;
  width: 100%;

  border-radius: 25px;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.15);
  overflow: visible;
  background: #ffffff;
  position: relative;
  z-index: 1;

  box-sizing: border-box;
}

.support-item-parent-div:has(.zl-dd:focus-within) {
  z-index: 50;
}

/* Make sure the menu itself is above */
.support-item-parent-div .zl-dd-menu {
  z-index: 100;
}

.item-image {
  background-color: #EB6A71;
  display: flex;
  justify-content: center;
  align-items: center;

  border-top-left-radius: 25px;
  border-bottom-left-radius: 25px;

  width: clamp(90px, 12vw, 150px);
  padding: clamp(16px, 2vw, 25px);
  flex: 0 0 auto;

  box-sizing: border-box;
}

.item-image img {
  width: clamp(44px, 4.2vw, 66px);
  height: auto;
  object-fit: contain;
  display: block;
}

.text-section {
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: clamp(16px, 2vw, 24px);
  gap: 8px;

  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
}

.text-section h2 {
  font-size: clamp(18px, 2.2vw, 26px);
  color: #404040;
  margin: 0;
  font-family: "Fredoka", sans-serif;
  font-weight: bold;
  line-height: 1.15;

  overflow-wrap: anywhere;
  word-break: break-word;
}

.text-section p {
  font-size: clamp(13px, 1.2vw, 16px);
  color: #404040;
  margin: 0;
  font-family: "Inter", sans-serif;
  line-height: 1.35;

  overflow-wrap: anywhere;
  word-break: break-word;
}

.right-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;

  border-top-right-radius: 25px;
  border-bottom-right-radius: 25px;

  gap: 12px;
  padding: clamp(16px, 2vw, 24px);

  flex: 0 0 clamp(240px, 26vw, 340px);
  background: #ffffff;

  box-sizing: border-box;
}

.language-dropdown {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;

  width: 100%;
  justify-content: flex-end;
}

.language-dropdown p {
  font-size: clamp(13px, 1.1vw, 16px);
  color: #404040;
  font-family: "Inter", sans-serif;
  font-weight: bold;
  margin: 0;
  white-space: nowrap;
}


/* NOTE: The selector below redefines .support-select sizing for the per-item dropdown.
   Consider scoping it (e.g., .support-item-parent-div .support-select) once markup is stable. */


.support-select {
  width: clamp(160px, 16vw, 220px);
  max-width: 100%;
}

.download-button {
  background-color: #FFCC00;
  color: #000;
  border: none;
  padding: 15px 30px;
  font-size: 16px;
  border-radius: 50px;
  cursor: pointer;
  font-family: "Fredoka", sans-serif;
  font-weight: bold;
  width: 100%;
}

.download-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .right-section {
    flex-basis: clamp(220px, 32vw, 320px);
  }
}

@media (max-width: 640px) {
  .support-item-parent-div {
    flex-direction: column;
  }

  .item-image {
    width: 100%;
    justify-content: flex-start;
    border-radius: 25px 25px 0 0;
  }

  .right-section {
    width: 100%;
    align-items: stretch;
    border-radius: 0 0 25px 25px;
  }

  .language-dropdown {
    justify-content: space-between;
  }

  .support-select {
    width: 100%;
  }
}