/* Plugin chrome around the preserved .dsl-finder design system. */

.dsl-pf-trigger {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(57, 255, 20, 0.55);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(57, 255, 20, 0.18), rgba(57, 255, 20, 0.05)),
    #0b1f3a;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.25),
    0 0 18px rgba(57, 255, 20, 0.18);
  color: #39ff14;
  cursor: pointer;
  font-family: Sora, Inter, Arial, sans-serif;
  font-size: 15px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 1rem 1.6rem;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dsl-pf-trigger:hover,
.dsl-pf-trigger:focus-visible {
  transform: translateY(-2px);
  border-color: #39ff14;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.3),
    0 0 28px rgba(57, 255, 20, 0.28);
  outline: none;
}

.dsl-pf-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  overflow: auto;
  background: #030d1b;
}

.dsl-pf-overlay[hidden] {
  display: none !important;
}

.dsl-pf-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(57, 255, 20, 0.35);
  border-radius: 999px;
  background: rgba(11, 31, 58, 0.72);
  color: #39ff14;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.dsl-pf-close:focus-visible {
  outline: 3px solid #39ff14;
  outline-offset: 2px;
}

/* Fullscreen host keeps the live finder look. */
.dsl-pf-overlay .dsl-finder {
  min-height: 100vh;
}

/*
 * Surface step: FIVE equal cards in TWO rows (3 + 2), matching live design.
 * Flex keeps every card the same width; second row centers naturally.
 */
.dsl-finder__choices[data-columns="5"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 26px;
}

.dsl-finder__choices[data-columns="5"] > .dsl-finder-choice {
  /* same width as a 3-col card: (100% - 2 gaps) / 3 */
  flex: 0 1 calc((100% - 52px) / 3);
  width: calc((100% - 52px) / 3);
  max-width: calc((100% - 52px) / 3);
}

.dsl-finder__choices[data-columns="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dsl-finder__nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.dsl-finder__back {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(159, 176, 195, 0.45);
  border-radius: 999px;
  background: transparent;
  color: #e8edf2;
  cursor: pointer;
  font-family: Inter, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.7rem 1.1rem;
  text-transform: uppercase;
}

.dsl-finder__back:hover,
.dsl-finder__back:focus-visible {
  border-color: #39ff14;
  color: #39ff14;
  outline: none;
}

.dsl-finder__back[hidden] {
  display: none !important;
}

/* Results: selection recap only (no fake catalog paddles). */
.dsl-finder-results {
  display: grid;
  gap: 22px;
  margin-top: 8px;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.dsl-finder-recap {
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid rgba(181, 255, 202, 0.72);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035) 32%, rgba(8, 28, 51, 0.3)),
    rgba(18, 52, 93, 0.38);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.dsl-finder-recap__row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 12px 20px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid rgba(159, 176, 195, 0.18);
}

.dsl-finder-recap__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dsl-finder-recap__label {
  color: #9fb0c3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dsl-finder-recap__value {
  color: #39ff14;
  font-family: Sora, Inter, Arial, sans-serif;
  font-size: clamp(22px, 2.6vw, 32px);
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.dsl-finder-recap__note {
  margin: 0;
  color: #e8edf2;
  font-size: 16px;
  line-height: 1.55;
  text-align: center;
}

.dsl-finder-results__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}

.dsl-finder-results__restart {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(159, 176, 195, 0.45);
  border-radius: 999px;
  background: transparent;
  color: #e8edf2;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.15rem;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .dsl-finder__choices[data-columns="5"] {
    gap: 16px;
  }

  .dsl-finder__choices[data-columns="5"] > .dsl-finder-choice {
    flex-basis: calc((100% - 16px) / 2);
    width: calc((100% - 16px) / 2);
    max-width: calc((100% - 16px) / 2);
  }

  .dsl-finder-result {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .dsl-pf-close {
    top: 12px;
    right: 12px;
  }

  .dsl-finder__choices[data-columns="5"] > .dsl-finder-choice {
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dsl-pf-trigger,
  .dsl-finder__back {
    transition: none;
  }
}
