.saldy-choice-panel {
  position: fixed;
  z-index: 900;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid var(--line);
  padding: 1rem max(1.25rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
  background: var(--white);
  box-shadow: 0 -0.75rem 2rem rgb(23 23 23 / 0.08);
}

.saldy-choice-panel[hidden],
.saldy-choice-panel [hidden] {
  display: none;
}

.saldy-choice-summary,
.saldy-choice-details {
  width: min(100%, 78rem);
  margin-inline: auto;
}

.saldy-choice-summary {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
}

.saldy-choice-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.saldy-choice-panel a {
  color: var(--blue);
  font-weight: 750;
}

.saldy-choice-panel a {
  white-space: nowrap;
  text-underline-offset: 0.16em;
}

.saldy-choice-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.saldy-choice-button {
  min-height: 2.8rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: var(--white);
  color: var(--blue-dark);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.saldy-choice-button[data-saldy-choice-accept],
.saldy-choice-button[data-saldy-choice-save] {
  background: var(--blue-dark);
  color: var(--white);
}

.saldy-choice-button:hover {
  border-color: var(--blue-dark);
  background: var(--blue-soft);
}

.saldy-choice-button[data-saldy-choice-accept]:hover,
.saldy-choice-button[data-saldy-choice-save]:hover {
  background: var(--blue);
}

.saldy-choice-button:focus-visible {
  outline: 3px solid rgb(6 70 199 / 0.24);
  outline-offset: 2px;
}

.saldy-choice-details {
  display: grid;
  grid-template-columns: minmax(11rem, 0.65fr) minmax(18rem, 1fr) auto;
  align-items: center;
  gap: 1rem 1.5rem;
}

.saldy-choice-details-heading h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.saldy-choice-details-heading a {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.76rem;
}

.saldy-choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  border: 0;
  padding: 0;
}

.saldy-choice-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
}

/* Samma kryssruta som i appen (components/ui/checkbox.tsx): en rundad fyrkant
   som fylls i Saldys blå med en vit bock, i stället för webbläsarens egen. */
.saldy-choice-option input {
  appearance: none;
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid rgb(100 116 139 / 0.8);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  transition: background-color 150ms, border-color 150ms;
}

.saldy-choice-option input:checked {
  border-color: var(--navy, #0b3a66);
  background: var(--navy, #0b3a66)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.saldy-choice-option input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(11 58 102 / 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .saldy-choice-option input {
    transition: none;
  }
}

.saldy-choice-option strong {
  font-size: 0.8rem;
}

@media (max-width: 64rem) {
  .saldy-choice-summary,
  .saldy-choice-details {
    grid-template-columns: 1fr;
  }

  .saldy-choice-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 48rem) {
  .saldy-choice-panel {
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    left: max(0.75rem, env(safe-area-inset-left));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: 0 1rem 2.5rem rgb(23 23 23 / 0.18);
  }

  .saldy-choice-summary,
  .saldy-choice-details {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .saldy-choice-actions,
  .saldy-choice-options {
    display: grid;
    grid-template-columns: 1fr;
  }

  .saldy-choice-button {
    width: 100%;
  }

  .saldy-choice-details .saldy-choice-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
