/* Fargeland – kassen (/betaling/) 0.37
   Mål: kunden skal se betalingen med en gang. Én tydelig vei: kort oppsummering → Kustom → ferdig.
   - Mobil: liten oppsummering som kan åpnes, Kustom rett under, kommentar og nyhetsbrev nederst.
   - PC: Kustom til venstre (stor), oppsummeringen fast til høyre.
   Vi styler bare rammene rundt Kustom (#kco-wrapper, #kco-order-review, #kco-iframe), aldri innholdet i iframen. */
:root{
  --flpc-ink:#33243f; --flpc-muted:#6c5e72; --flpc-purple:#7047d7; --flpc-purple2:#9a58df;
  --flpc-mint:#168264; --flpc-mint-bg:#eaf8f3; --flpc-paper:#fffaf4; --flpc-line:rgba(66,43,76,.11);
  --flpc-shadow:0 18px 44px rgba(62,39,73,.09);
}

body.woocommerce-checkout:not(.woocommerce-order-received){background:var(--flpc-paper);color:var(--flpc-ink);overflow-x:clip}
body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce:not(.mfn-header-login){
  box-sizing:border-box;width:min(1140px,94vw);max-width:1140px;margin:0 auto;padding:22px 0 64px;
  color:var(--flpc-ink);font-family:'Nunito',system-ui,-apple-system,'Segoe UI',sans-serif;
}
body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce:not(.mfn-header-login) *{box-sizing:border-box}
/* Temaets innpakning rundt kassen: aldri bredere enn skjermen. BeTheme har sidepolstring på .section_wrapper;
   bredde 100 % uten border-box dyttet kassen ut til høyre på mobil (0.37). */
body.woocommerce-checkout:not(.woocommerce-order-received) :is(#Content,#Content .content_wrapper,#Content .section_wrapper,#Content .the_content_wrapper,#Content .column,#Content .mcb-wrap,#Content .mcb-wrap-inner,#Content .mcb-column-inner),
body.woocommerce-checkout:not(.woocommerce-order-received) #Content :has(> .woocommerce, #kco-wrapper){box-sizing:border-box!important;max-width:100%!important;min-width:0!important}
@media (min-width:901px){
  body.woocommerce-checkout:not(.woocommerce-order-received) :is(#Content .section_wrapper,#Content .the_content_wrapper){width:100%!important;max-width:none!important}
}
body.woocommerce-checkout:not(.woocommerce-order-received) #Content .the_content_wrapper{margin-left:0!important;margin-right:0!important}

/* ---------- toppen: én linje, ikke en stor plakat ---------- */
.flpc-intro{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 18px;margin:0 0 14px;padding:0!important;text-align:left!important}
.flpc-intro h1{margin:0!important;font-family:'Baloo 2','Nunito',sans-serif!important;font-size:clamp(1.6rem,3vw,2.2rem)!important;line-height:1!important;letter-spacing:-.02em;color:var(--flpc-ink)!important}
.flpc-trust{display:flex!important;flex-wrap:wrap;gap:6px;width:100%;margin:0!important;padding:0!important;list-style:none!important;justify-content:flex-start!important}
.flpc-trust li:before{display:none!important;content:none!important}
.flpc-trust li{margin:0!important;list-style:none!important;display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:999px;background:#fff;border:1px solid var(--flpc-line);font-size:.78rem;font-weight:800;color:var(--flpc-muted)}
.flpc-trust li:first-child{background:var(--flpc-mint-bg);border-color:#cdeee2;color:var(--flpc-mint)}
.flpc-trust svg{width:14px;height:14px}

/* ---------- meldinger og rabattkode: små og rolige ---------- */
body.woocommerce-checkout .woocommerce:not(.mfn-header-login) :is(.woocommerce-info,.woocommerce-message,.woocommerce-error){
  margin:0 0 10px!important;padding:10px 14px 10px 40px!important;border:1px solid rgba(112,71,215,.14)!important;border-radius:14px!important;
  background:#f7f3ff!important;color:var(--flpc-ink)!important;box-shadow:none!important;font-size:.86rem!important;font-weight:700!important;
}
body.woocommerce-checkout .woocommerce:not(.mfn-header-login) :is(.woocommerce-info,.woocommerce-message):before{color:var(--flpc-purple)!important;top:10px!important}
body.woocommerce-checkout .woocommerce:not(.mfn-header-login) .woocommerce-error{background:#fff0f2!important;border-color:#f7ccd3!important}
/* «Har du en rabattkode?» blir en liten lenke, ikke en stor boks som får folk til å lete etter koder. */
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info{
  display:inline-block!important;margin:0 0 10px!important;padding:0!important;border:0!important;background:none!important;font-size:.82rem!important;font-weight:700!important;color:var(--flpc-muted)!important;
}
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info:before{display:none!important}
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a{color:var(--flpc-purple)!important;text-decoration:underline}
body.woocommerce-checkout form.checkout_coupon{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 14px!important;padding:12px!important;border:1px solid var(--flpc-line)!important;border-radius:16px!important;background:#fff}
body.woocommerce-checkout form.checkout_coupon p{margin:0!important;float:none!important;width:auto!important}
body.woocommerce-checkout form.checkout_coupon p:first-child{display:none}
body.woocommerce-checkout form.checkout_coupon .form-row-first{flex:1 1 180px}
body.woocommerce-checkout form.checkout_coupon .clear{display:none}
/* ---------- oppsettet rundt Kustom ---------- */
body.woocommerce-checkout #kco-wrapper{
  display:grid!important;grid-template-columns:minmax(0,1.4fr) minmax(300px,.7fr)!important;grid-template-rows:auto 1fr!important;
  gap:16px 22px!important;align-items:start!important;width:100%!important;max-width:1140px!important;margin:0 auto!important;padding:0!important;
  font-family:'Nunito',system-ui,sans-serif!important;
}
body.woocommerce-checkout #kco-wrapper:after{display:none!important}
body.woocommerce-checkout #kco-wrapper > *{float:none!important;clear:none!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important}
body.woocommerce-checkout #kco-wrapper > #kco-iframe{grid-column:1;grid-row:1 / span 3;padding:8px!important;border-radius:22px;background:#fff;border:1px solid var(--flpc-line);box-shadow:var(--flpc-shadow);overflow:visible}
body.woocommerce-checkout #kco-iframe iframe{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;border:0}
body.woocommerce-checkout #kustom-checkout-container,body.woocommerce-checkout #kustom-checkout-container *{font-family:initial}
body.woocommerce-checkout #kco-wrapper > #kco-order-review{grid-column:2;grid-row:1;position:sticky;top:110px;padding:18px 20px!important;border-radius:22px;background:#fff;border:1px solid var(--flpc-line);box-shadow:var(--flpc-shadow);overflow:hidden}
body.woocommerce-checkout #kco-wrapper > .flpc-extras{grid-column:2;grid-row:2;padding:4px 6px}

/* Oppsummeringen: tittel og pil til venstre, summen helt til høyre, på linje med prisene under. */
.flpc-sum-head{display:flex;align-items:center;gap:12px;width:100%;margin:0 0 6px;padding:0;border:0;background:none;color:var(--flpc-ink);font:inherit;text-align:left;cursor:default}
/* Temaet gir alle knapper oransje/brun bakgrunn ved trykk og fokus. Oppsummeringen er en knapp, men skal ikke se slik ut. */
body.woocommerce-checkout #kco-order-review button.flpc-sum-head,
body.woocommerce-checkout #kco-order-review button.flpc-sum-head:is(:hover,:focus,:active,:focus-visible){
  min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;background-image:none!important;
  box-shadow:none!important;color:var(--flpc-ink)!important;text-shadow:none!important;transform:none!important;opacity:1!important;filter:none!important;
  font-family:'Nunito',sans-serif!important;font-size:inherit!important;letter-spacing:0!important;text-transform:none!important;line-height:inherit!important;
  -webkit-tap-highlight-color:transparent;-webkit-appearance:none;appearance:none;outline:0
}
body.woocommerce-checkout #kco-order-review button.flpc-sum-head:focus-visible{outline:2px solid var(--flpc-purple)!important;outline-offset:4px;border-radius:12px!important}
body.woocommerce-checkout #kco-order-review button.flpc-sum-head :is(b,small,em,span){color:inherit}
body.woocommerce-checkout #kco-order-review button.flpc-sum-head small{color:var(--flpc-muted)!important}
.flpc-sum-head > span{flex:0 1 auto;min-width:0;order:1}
.flpc-sum-head > i{order:2}
.flpc-sum-head b{display:block;font-family:'Baloo 2','Nunito',sans-serif;font-size:1.2rem;line-height:1.1}
.flpc-sum-head small{display:block;margin-top:2px;color:var(--flpc-muted);font-size:.78rem;font-weight:700}
.flpc-sum-head em{order:3;flex:0 0 auto;margin-left:auto;font-style:normal;font-weight:900;font-size:1.05rem;white-space:nowrap;text-align:right}
.flpc-sum-head i,.flpc-tap{display:none}

/* Varelinjene som rader, ikke tabellceller: navn og valg til venstre, pris til høyre på samme linje.
   Temaet kan ikke lenger presse navnet inn i en smal kolonne. */
body.woocommerce-checkout #kco-order-review table.woocommerce-checkout-review-order-table{display:block!important;width:100%!important;margin:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
body.woocommerce-checkout #kco-order-review table.woocommerce-checkout-review-order-table thead{display:none!important}
body.woocommerce-checkout #kco-order-review table.woocommerce-checkout-review-order-table :is(tbody,tfoot){display:block!important;width:100%!important}
body.woocommerce-checkout #kco-order-review table.woocommerce-checkout-review-order-table tr{display:flex!important;align-items:baseline!important;justify-content:space-between!important;gap:14px!important;width:100%!important;padding:11px 0!important;border:0!important;border-bottom:1px solid #f0eaf2!important;background:transparent!important}
body.woocommerce-checkout #kco-order-review table.woocommerce-checkout-review-order-table tr:last-child{border-bottom:0!important}
body.woocommerce-checkout #kco-order-review table.woocommerce-checkout-review-order-table :is(th,td){display:block!important;width:auto!important;min-width:0!important;padding:0!important;border:0!important;background:transparent!important;color:var(--flpc-ink)!important;font-size:.9rem!important;line-height:1.35!important;text-align:left!important}
body.woocommerce-checkout #kco-order-review table.woocommerce-checkout-review-order-table :is(th,td):before{display:none!important;content:none!important}
body.woocommerce-checkout #kco-order-review table.woocommerce-checkout-review-order-table :is(th,td):first-child{flex:1 1 auto!important}
body.woocommerce-checkout #kco-order-review table.woocommerce-checkout-review-order-table :is(th,td):last-child:not(:first-child){flex:0 0 auto!important;margin-left:auto!important;text-align:right!important;white-space:nowrap!important}
body.woocommerce-checkout #kco-order-review tr.cart_item td.product-name{font-weight:800!important;word-break:normal!important;overflow-wrap:break-word!important;hyphens:manual!important}
body.woocommerce-checkout #kco-order-review tr.cart_item td.product-total{font-weight:900!important}
body.woocommerce-checkout #kco-order-review .product-quantity{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:999px;background:#f3edff;color:var(--flpc-purple);font-size:.72rem;font-weight:900;white-space:nowrap;vertical-align:1px}
/* Valg under varen («Utsending: Fra 1. november …») som vanlige tekstlinjer. */
body.woocommerce-checkout #kco-order-review dl.variation{display:block!important;margin:5px 0 0!important;padding:0!important;font-size:.78rem!important;font-weight:600!important;line-height:1.4!important;color:var(--flpc-muted)!important}
body.woocommerce-checkout #kco-order-review dl.variation :is(dt,dd){display:inline!important;float:none!important;width:auto!important;margin:0!important;padding:0!important;writing-mode:horizontal-tb!important;word-break:normal!important;overflow-wrap:break-word!important;white-space:normal!important}
body.woocommerce-checkout #kco-order-review dl.variation dt{font-weight:800!important;margin-right:4px!important}
body.woocommerce-checkout #kco-order-review dl.variation dd:after{content:'';display:block}
body.woocommerce-checkout #kco-order-review dl.variation dd p{display:inline!important;margin:0!important}
body.woocommerce-checkout #kco-order-review .flpc-product-name{display:flex;flex-direction:column}
body.woocommerce-checkout #kco-order-review .flpc-product-name small{color:var(--flpc-muted);font-size:.74rem;font-weight:700}
body.woocommerce-checkout #kco-order-review tfoot th{color:var(--flpc-muted)!important;font-weight:700!important}
body.woocommerce-checkout #kco-order-review tfoot td{font-weight:800!important}
body.woocommerce-checkout #kco-order-review tr.order-total :is(th,td){font-size:1rem!important;color:var(--flpc-ink)!important;font-weight:900!important}
body.woocommerce-checkout #kco-order-review tr.order-total small{display:block;font-weight:700;color:var(--flpc-muted);font-size:.72rem}
body.woocommerce-checkout #kco-order-review tr.woocommerce-shipping-totals{flex-wrap:wrap!important}
body.woocommerce-checkout #kco-order-review ul#shipping_method{margin:0!important;padding:0!important;list-style:none!important;text-align:right}

/* ---------- under betalingen: kommentar, nyhetsbrev, annen betaling ---------- */
.flpc-extras{display:flex;flex-direction:column;gap:10px;font-size:.88rem}
.flpc-extras h3{display:none!important}
.flpc-extras .form-row{margin:0!important;padding:0!important}
.flpc-extras label{font-weight:700!important;color:var(--flpc-muted)!important;font-size:.84rem!important;line-height:1.45!important}
.flpc-extras textarea{width:100%;min-height:80px;padding:10px 12px;border:1.5px solid #e5dce8;border-radius:14px;background:#fff;font:600 16px 'Nunito',sans-serif;color:var(--flpc-ink)}
.flpc-extras input[type=checkbox]{width:18px;height:18px;margin:0 8px 0 0!important;accent-color:var(--flpc-purple);vertical-align:-3px}
.flpc-note-toggle,.flpc-other{display:inline;align-self:flex-start;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;color:var(--flpc-purple)!important;font:700 .84rem 'Nunito',sans-serif!important;text-decoration:underline!important;cursor:pointer;min-height:0!important;transform:none!important}
.flpc-other-wrap{margin:4px 0 0!important;color:var(--flpc-muted);font-size:.82rem}
.flpc-hidden{display:none!important}

/* Knapper utenfor Kustom (for eksempel i rabattkoden). */
body.woocommerce-checkout .woocommerce:not(.mfn-header-login) :is(button.button,input.button):not(.flpc-other):not(.flpc-note-toggle){
  min-height:44px;padding:10px 18px!important;border:0!important;border-radius:999px!important;background:var(--flpc-purple)!important;color:#fff!important;font:900 .86rem 'Nunito',sans-serif!important;box-shadow:none!important
}

/* ---------- mobil ---------- */
@media (max-width:900px){
  body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce:not(.mfn-header-login){width:100%;max-width:100%;padding:14px 0 48px}
  /* Smalere sidemarg enn temaet (33 px), så Kustom får plass. */
  body.woocommerce-checkout:not(.woocommerce-order-received) #Content :is(.section_wrapper,.container){width:100%!important;padding-left:12px!important;padding-right:12px!important}
  body.woocommerce-checkout:not(.woocommerce-order-received) #Content :is(.the_content_wrapper,.column,.mcb-wrap,.mcb-column){width:100%!important;float:none!important;margin-left:0!important;margin-right:0!important}
  body.woocommerce-checkout #kco-wrapper,body.woocommerce-checkout #kco-wrapper > *,body.woocommerce-checkout #kco-iframe iframe{max-width:100%!important;min-width:0!important}
  .flpc-intro{margin-bottom:10px}
  .flpc-trust li:nth-child(n+3){display:none}
  body.woocommerce-checkout #kco-wrapper{display:flex!important;flex-direction:column!important;gap:12px!important}
  body.woocommerce-checkout #kco-wrapper > #kco-order-review{order:1;position:static;padding:14px 16px!important;border-radius:18px;background:#fff!important;box-shadow:0 1px 2px rgba(62,39,73,.05)!important}
  body.woocommerce-checkout #kco-wrapper > #kco-iframe{order:2;padding:0!important;border:0;background:transparent;box-shadow:none;border-radius:0}
  body.woocommerce-checkout #kco-wrapper > .flpc-extras{order:3;padding:2px 4px}
  /* Oppsummeringen er lukket til kunden vil se den. */
  .flpc-sum-head{margin:0;cursor:pointer}
  .flpc-tap{display:inline}
  .flpc-sum-head i{display:inline-block;width:28px;height:28px;flex:0 0 auto;border-radius:50%;background:#f3edff;position:relative}
  .flpc-sum-head i:before{content:'';position:absolute;left:10px;top:8px;width:6px;height:6px;border-right:2px solid var(--flpc-purple);border-bottom:2px solid var(--flpc-purple);transform:rotate(45deg);transition:transform .15s}
  #kco-order-review.is-open .flpc-sum-head i:before{transform:rotate(-135deg);top:11px}
  #kco-order-review.flpc-collapsible:not(.is-open) > :not(.flpc-sum-head){display:none!important}
  #kco-order-review.is-open .flpc-sum-head{margin-bottom:6px}
}

/* ---------- BeTheme: kontovinduet skal aldri ligge over kassen ---------- */
body.woocommerce-checkout:not(.woocommerce-order-received) :is(.mfn-header-login,.mfn-header-modal-nav,.column_header_icon .mfn-header-login,.mfn-header-login.woocommerce){
  display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;width:0!important;max-width:0!important;transform:translateX(110%)!important
}
body.woocommerce-checkout:not(.woocommerce-order-received) #fmn3.flpfb-pinned-header{right:0!important;left:0!important}

/* Kun Kustom: skjul byttelenken også før JavaScript og ved checkout-oppdatering. */
body.woocommerce-checkout .klarna-checkout-select-other-wrapper,body.woocommerce-checkout #klarna-checkout-select-other,body.woocommerce-checkout .flpc-other-wrap{display:none!important}
