/* ==========================================================================
   Keuzeblokken en invoervelden — neutrale selectiekleur
   --------------------------------------------------------------------------
   De selectiekleur was afgeleid van de merkkleur:

       background: color-mix(in srgb, var(--fs-primary) 7%, #ffffff);

   Bij een rood merk levert dat een vaal roze vlak op, bij een oranje merk een
   vuile perziktint. Zo'n tint zegt niets over "gekozen" en botst met vrijwel
   elke huisstijl — juist omdat hij ván die huisstijl is afgeleid.

   Selectie is functie, geen merk. Daarom hier één neutrale set die op elk
   thema klopt: een rustige grijze rand als er niets gekozen is, en een
   duidelijk donkere rand met een lichte vulling zodra er wel iets gekozen is.

   Dit bestand laadt als laatste, zodat het de bestaande merkgebonden regels
   in foodsync-configurator.css overschrijft.
   ========================================================================== */

body{
  /* Licht thema */
  --fs-select-line: rgba(15,23,42,.16);
  --fs-select-line-hover: rgba(15,23,42,.34);
  --fs-select-line-active: rgba(15,23,42,.78);
  --fs-select-fill-hover: rgba(15,23,42,.03);
  --fs-select-fill-active: rgba(15,23,42,.06);
}

/* De keuzeblokken staan in een wit paneel, ook bij een donker thema. De
   waarden hierboven kloppen daar dus ook; alleen als een popup zelf donker
   wordt gemaakt heeft een aparte set zin. */

/* ---------- Keuzeblokken in de productsamensteller ---------- */

body .fs-config-option{
  border:1px solid var(--fs-select-line) !important;
  background:#ffffff !important;
  box-shadow:none !important;
}

body .fs-config-option:hover{
  border-color:var(--fs-select-line-hover) !important;
  background:var(--fs-select-fill-hover) !important;
  box-shadow:none !important;
  transform:none !important;
}

/* Gekozen: donkere rand plus een lichte vulling. Geen merktint, en geen
   tweede lijntje om de tekst — dat las als een vakje in een vakje. */
body .fs-config-option.is-selected,
body .fs-config-option.is-selected:hover,
body .fs-config-option.is-quantity.is-selected{
  border-color:var(--fs-select-line-active) !important;
  background:var(--fs-select-fill-active) !important;
  box-shadow:none !important;
}

/* Het klikbare tekstgedeelte mag zelf nooit een rand of vlak tekenen. */
body .fs-config-option .fs-config-option-hit,
body .fs-config-option.is-selected .fs-config-option-hit{
  border:0 !important;
  outline:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

/* Toetsenbordgebruikers houden wél een zichtbare focus. */
body .fs-config-option .fs-config-option-hit:focus-visible{
  outline:2px solid var(--fs-select-line-active) !important;
  outline-offset:3px !important;
}

/* ---------- Invoervelden in de leeftijdscontrole ---------- */

/* Hier gaf de focusring dezelfde roze gloed. Neutraal grijs past bij elk
   merk en leest rustiger bij een formulier dat je snel invult. */
body #fs-age-modal .fs-age-input:focus,
body #fs-age-modal .fs-age-input:focus-visible{
  border-color:var(--fs-select-line-active) !important;
  box-shadow:0 0 0 3px rgba(15,23,42,.10) !important;
  outline:none !important;
}

/* ==========================================================================
   "Product toevoegen" — compacter en rustiger
   --------------------------------------------------------------------------
   Het scherm was 940px breed met een vierkante foto van 360px, voor een
   product van € 2,35 en één knop. Dat leest als een productpagina terwijl het
   een bevestiging is: hoeveel wil je er, en toevoegen maar.

   De stepper is bovendien omgezet van zwart gevuld naar omlijnd. Gevuld
   concurreerde hij met de bestelknop én met de prijs, terwijl er maar één
   ding mag opvallen: Voeg toe.
   ========================================================================== */

body.fs-shop #fs-product-info-modal .fs-product-modal-panel{
  width:min(720px, calc(100vw - 40px)) !important;
  max-width:720px !important;
}

body.fs-shop #fs-product-info-modal .fs-product-modal-head{
  padding:20px 24px 10px !important;
}

body.fs-shop #fs-product-info-modal .fs-product-modal-body{
  padding:6px 24px 24px !important;
}

/* Smallere fotokolom en minder ruimte ertussen. */
body.fs-shop #fs-product-info-modal .fs-product-order-content{
  grid-template-columns:minmax(200px, 260px) minmax(0, 1fr) !important;
  gap:24px !important;
}

/* ---------- Aantalknoppen ---------- */

/* Omlijnd in plaats van gevuld: een secundaire handeling hoort er ook
   secundair uit te zien. */
body.fs-shop #fs-product-info-modal .fs-product-order-qty-btn{
  width:36px !important;
  height:36px !important;
  min-width:36px !important;
  min-height:36px !important;
  border:1.5px solid var(--fs-select-line-active, rgba(15,23,42,.78)) !important;
  border-radius:0 !important;
  background:#ffffff !important;
  color:var(--fs-select-line-active, #111827) !important;
  font-size:18px !important;
  font-weight:800 !important;
}

body.fs-shop #fs-product-info-modal .fs-product-order-qty-btn[data-fs-simple-qty-plus]{
  background:#ffffff !important;
  color:var(--fs-select-line-active, #111827) !important;
}

/* Hover vult wel in: dan is duidelijk dat je erop staat. */
body.fs-shop #fs-product-info-modal .fs-product-order-qty-btn:hover,
body.fs-shop #fs-product-info-modal .fs-product-order-qty-btn:focus-visible{
  background:var(--fs-select-line-active, #111827) !important;
  border-color:var(--fs-select-line-active, #111827) !important;
  color:#ffffff !important;
}

/* Uitgeschakeld (aantal staat op 1): niet meer zwart, wel zichtbaar. */
body.fs-shop #fs-product-info-modal .fs-product-order-qty-btn:disabled,
body.fs-shop #fs-product-info-modal .fs-product-order-qty-btn[aria-disabled="true"]{
  border-color:rgba(15,23,42,.18) !important;
  color:rgba(15,23,42,.34) !important;
  background:#ffffff !important;
  cursor:default !important;
}

@media (max-width: 640px){
  body.fs-shop #fs-product-info-modal .fs-product-order-content{
    grid-template-columns:minmax(0, 1fr) !important;
    gap:18px !important;
  }
}

/* ---------- Foto en titel ---------- */

/* Bewust alleen deze twee. Een eerdere poging zette hier een complete
   grid-herindeling overheen en toen liep de foto over de titel heen; de opmaak
   van dit scherm ligt verspreid over drie stylesheets met eigen
   !important-blokken. Zie DRAAIBOEK.md voor het echte opruimwerk.

   De foto krijgt een harde breedte in plaats van een grid-fractie. Daarmee kan
   hij niet meer buiten zijn kolom uitlopen, wat de oorzaak was van de
   overlap. */

body.fs-shop #fs-product-info-modal .fs-product-modal-media{
  width:190px !important;
  max-width:190px !important;
  height:190px !important;
  max-height:190px !important;
  aspect-ratio:1 / 1 !important;
  flex:0 0 190px !important;
  overflow:hidden !important;
  border-radius:0 !important;
}

body.fs-shop #fs-product-info-modal .fs-product-modal-img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
}

body.fs-shop #fs-product-info-modal .fs-product-order-content{
  grid-template-columns:190px minmax(0, 1fr) !important;
  gap:22px !important;
}

/* De titel schreeuwde harder dan de prijs en de bestelknop samen. */
body.fs-shop #fs-product-info-modal .fs-product-modal-name{
  font-size:22px !important;
  line-height:1.2 !important;
  margin:0 0 6px !important;
}

@media (max-width: 640px){
  body.fs-shop #fs-product-info-modal .fs-product-order-content{
    grid-template-columns:150px minmax(0, 1fr) !important;
    gap:16px !important;
  }

  body.fs-shop #fs-product-info-modal .fs-product-modal-media{
    width:150px !important;
    max-width:150px !important;
    height:150px !important;
    max-height:150px !important;
    flex:0 0 150px !important;
  }

  body.fs-shop #fs-product-info-modal .fs-product-modal-name{
    font-size:19px !important;
  }
}

/* ---------- Bestelknop ---------- */

/* De knop stond op space-between, waardoor het label naar links werd geduwd en
   de prijs naar rechts. Bij een brede knop rekt dat uit tot twee losse dingen
   met een gat ertussen, terwijl het één boodschap is: voeg toe voor dit bedrag.
   Nu naast elkaar gecentreerd, en de knop niet breder dan hij hoeft. */

body.fs-shop #fs-product-info-modal .fs-product-order-add{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:14px !important;
  width:auto !important;
  min-height:44px !important;
  padding:0 22px !important;
  border-radius:10px !important;
  font-size:15px !important;
  font-weight:800 !important;
}

/* Het bedrag mag rustiger dan het label: de handeling is de boodschap, de
   prijs de bevestiging. */
body.fs-shop #fs-product-info-modal .fs-product-order-add > span:last-child{
  font-weight:700 !important;
  opacity:.92 !important;
}

@media (max-width: 480px){
  body.fs-shop #fs-product-info-modal .fs-product-order-add{
    flex:1 1 auto !important;
    padding:0 16px !important;
  }
}

/* ---------- Aantalknoppen in de gratis-producten popup ---------- */

/* Zelfde behandeling als in het productscherm: wit met een donkere rand.
   Hier stonden ze nog zwart gevuld, en dan trekt een plusje meer aandacht dan
   de bevestigknop. De uitgeschakelde min stond bovendien op alleen opacity,
   waardoor hij als een grijs blok bleef opvallen. */

body.fs-shop .fs-reward-qty-btn{
  width:32px !important;
  height:32px !important;
  min-width:32px !important;
  min-height:32px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  border:1.5px solid var(--fs-select-line-active, rgba(15,23,42,.78)) !important;
  border-radius:0 !important;
  background:#ffffff !important;
  color:var(--fs-select-line-active, #111827) !important;
  font-size:16px !important;
  font-weight:800 !important;
  line-height:1 !important;
  opacity:1 !important;
}

body.fs-shop .fs-reward-qty-btn:hover:not(:disabled),
body.fs-shop .fs-reward-qty-btn:focus-visible:not(:disabled){
  background:var(--fs-select-line-active, #111827) !important;
  border-color:var(--fs-select-line-active, #111827) !important;
  color:#ffffff !important;
}

body.fs-shop .fs-reward-qty-btn:disabled{
  border-color:rgba(15,23,42,.18) !important;
  color:rgba(15,23,42,.34) !important;
  background:#ffffff !important;
  opacity:1 !important;
  cursor:default !important;
}
