/**
 * OTW offertepopup: offertelijst (YITH) en offerteformulier (Contact Form 7) in de huisstijl.
 * Hoort bij mu-plugins/otw-offerte-popup.php.
 *
 * De oude regels staan in trap-configurator (custom-quote.css) en in het child theme (style.css).
 * Die blijven staan; alles hieronder gaat eroverheen en geldt pas als popup.js de kaart
 * heeft opgebouwd (klasse .otw-q-ready). Zonder dit bestand ziet alles eruit als voorheen.
 */

@font-face {
  font-family: "Loos compressed";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../../uploads/2025/06/LoosCompressed-Bold.woff2") format("woff2");
}

/* ---------- Schil van de popup op de productpagina ---------- */

#yithQuotePopup_overlay { background: rgba(0, 0, 0, .8) !important; padding: 16px !important; }
#yithQuotePopup {
  max-width: 1040px !important; max-height: calc(100vh - 32px) !important; padding: 46px 40px 40px !important;
  border-radius: 0; box-shadow: none !important; color: #304520;
}
#yithQuotePopup #yithQuotePopupClose {
  position: absolute; top: 20px !important; right: 20px !important; width: 15px !important; height: 15px !important;
  border-radius: 0; line-height: 0; font-size: 0; cursor: pointer;
}
#yithQuotePopup #yithQuotePopupClose svg { display: block; width: 15px; height: 15px; }
#yithQuotePopup #yithQuotePopupClose svg path { fill: #1f2124 !important; }

/* Het zwevende winkelmandje hoort niet over het formulier heen te staan. */
body:has(#yithQuotePopup_overlay.show) .xoo-wsc-basket { display: none !important; }

/* ---------- Kop ---------- */

.ywraq-wrapper .otw-q__head { margin: 0 0 26px; padding: 0 30px 0 0; }
.ywraq-wrapper .otw-q__head h2,
#yithQuotePopup .ywraq-wrapper .otw-q__head h2 {
  margin: 0 0 8px; padding: 0; font-family: "Loos compressed", sans-serif !important; font-size: 36px; font-weight: 700;
  line-height: 1; letter-spacing: normal; text-transform: none; color: #304520;
}
.ywraq-wrapper .otw-q__head p { margin: 0; font-family: "Loos Normal", sans-serif; font-size: 18px; font-weight: 400; line-height: 1.5; color: #304520; }

/* ---------- Indeling: formulier links, "Jouw trap" rechts ---------- */

.ywraq-wrapper.otw-q-ready .yith-ywraq-before-table,
.ywraq-wrapper.otw-q-ready .ywraq-before-form,
.ywraq-wrapper.otw-q-ready #yith-ywraq-form,
.ywraq-wrapper.otw-q-ready .ywraq-form-title { display: none !important; }

.ywraq-wrapper.otw-q-ready .ywraq-form-table-wrapper {
  display: grid !important; grid-template-columns: minmax(0, 1fr) 350px; gap: 36px; align-items: start;
}
.ywraq-wrapper.otw-q-ready .ywraq-form-table-wrapper > .otw-q__form { grid-column: 1; grid-row: 1; width: auto !important; min-width: 0; margin: 0; padding: 0 !important; }
.ywraq-wrapper.otw-q-ready .ywraq-form-table-wrapper > .otw-s { grid-column: 2; grid-row: 1; }

/* ---------- Formulier ---------- */

.otw-q-ready :is(#ywraq-other-form, .otw-q__form) { font-family: "Loos Normal", sans-serif; color: #304520; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) form { display: block; margin: 0; padding: 0; background: none; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) p { margin: 0 0 14px; }

.otw-q-ready :is(#ywraq-other-form, .otw-q__form) label {
  display: block; width: 100%; margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: #304520;
}
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) label br { display: none; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) label .otw-opt { font-weight: 400; color: #5f6b55; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) label .required_mark { font-size: inherit; font-weight: 700; color: #738c5f; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) span.wpcf7-form-control-wrap { display: block; margin-top: 6px !important; }

.otw-q-ready :is(#ywraq-other-form, .otw-q__form) input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) textarea {
  display: block; width: 100%; min-height: 46px; height: auto !important; margin: 0 !important; padding: 10px 14px;
  background: #fff; border: 1px solid #d2d9cb; border-radius: 10px; box-shadow: none;
  font-family: inherit; font-size: 17px; font-weight: 400; line-height: 1.4; color: #304520;
  outline: 0; transition: border-color .15s, box-shadow .15s;
}
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) textarea { height: 92px !important; min-height: 92px; resize: none; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) input::placeholder,
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) textarea::placeholder { color: #8f9a85; opacity: 1; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) input:not([type="submit"]):not([type="checkbox"]):hover,
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) textarea:hover { border-color: #98ad84; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) input:not([type="submit"]):not([type="checkbox"]):focus,
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) textarea:focus { border-color: #738c5f; box-shadow: 0 0 0 3px rgba(115, 140, 95, .25); }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) .wpcf7-not-valid:not([type="checkbox"]) { border-color: #b3402a !important; }

/* Vinkje */
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) .wpcf7-checkbox { display: block; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) .wpcf7-checkbox .wpcf7-list-item { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) .wpcf7-list-item-label { font-size: 16px; font-weight: 400; line-height: 1.3; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) label:has(input[type="checkbox"]) span.wpcf7-form-control-wrap { margin-top: 0 !important; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: 0 0 22px; width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0;
  border: 1px solid #98ad84; border-radius: 6px; background: #fff center / 14px 14px no-repeat; box-shadow: none; outline: 0; cursor: pointer;
}
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) input[type="checkbox"]:checked {
  border-color: #738c5f; background-color: #738c5f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) input[type="checkbox"]:focus-visible { box-shadow: 0 0 0 3px rgba(115, 140, 95, .25); }

/* Knop */
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) input[type="submit"] {
  display: block; width: 100%; min-height: 52px; margin: 4px 0 0; padding: 2px 52px;
  border: 3px solid #738c5f; border-radius: 10px; box-shadow: none;
  background: #738c5f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") right 22px center / 18px 18px no-repeat !important;
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1; letter-spacing: normal; text-transform: uppercase; color: #fff;
  cursor: pointer; transition: background-color .2s, border-color .2s;
}
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) input[type="submit"]:hover,
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) input[type="submit"]:focus-visible { background-color: #304520 !important; border-color: #304520; color: #fff; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) input[type="submit"]:disabled { opacity: .6; cursor: default; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) p:has(> input[type="submit"]) { position: relative; margin-bottom: 0; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) .wpcf7-spinner { position: absolute; right: 52px; top: 50%; margin: -8px 0 0; }

/* Meldingen van het formulier */
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) span.wpcf7-not-valid-tip {
  display: block; margin: 5px 0 0; padding: 0; background: none; font-size: 14px; font-weight: 400; line-height: 1.3; color: #b3402a;
}
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) span.wpcf7-not-valid-tip::before { content: none; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) .wpcf7-response-output {
  margin: 14px 0 0; padding: 10px 14px; border: 1px solid #d2d9cb; border-radius: 10px; font-size: 15px; font-weight: 400; line-height: 1.4; color: #304520;
}
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) .wpcf7-response-output:empty { display: none !important; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) form.invalid .wpcf7-response-output,
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) form.failed .wpcf7-response-output { border-color: #b3402a; color: #b3402a; }

/* Velden naast elkaar (formulier van de automatisering: .otw-quote-form met .otw-row) */
.otw-q-ready .otw-quote-form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.otw-q-ready .otw-quote-form > * { grid-column: 1 / -1; }
.otw-q-ready .otw-quote-form p { margin: 0 !important; }
.otw-q-ready .otw-quote-form br,
.otw-q-ready .otw-quote-form p:empty { display: none; }
/* Bouwlocatie alleen tonen als de trap op een ander adres komt (werkt ook zonder script). */
.otw-q-ready .otw-quote-form:has(input[name^="otw-bouwlocatie-zelfde"]:checked) > .otw-bouwlocatie { display: none; }
.otw-q-ready .otw-quote-form > .otw-row { display: contents; }
.otw-q-ready .otw-quote-form > .otw-row > p { grid-column: span 6; }
.otw-q-ready .otw-quote-form > p:has([name="billing-address-1"]) { grid-column: span 6; }
.otw-q-ready .otw-quote-form > .otw-row > p:has([name="billing-postcode"]),
.otw-q-ready .otw-quote-form > .otw-row > p:has([name="billing-city"]) { grid-column: span 3; }
.otw-q-ready .otw-quote-form > .otw-bouwlocatie { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.otw-q-ready .otw-quote-form > .otw-bouwlocatie > * { grid-column: 1 / -1; }
.otw-q-ready .otw-quote-form > .otw-bouwlocatie > .otw-row { display: contents; }
.otw-q-ready .otw-quote-form > .otw-bouwlocatie > .otw-row > p { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; }
.otw-q-ready .otw-quote-form > .otw-bouwlocatie > .otw-row > p > br { display: none; }

/* Kort formulier zonder .otw-quote-form (voornaam, achternaam, e-mail, telefoon, bericht): velden twee aan twee */
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) form.wpcf7-form:not(:has(.otw-quote-form)) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) form.wpcf7-form:not(:has(.otw-quote-form)) > * { grid-column: 1 / -1; margin: 0 !important; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) form.wpcf7-form:not(:has(.otw-quote-form)) > p:has(input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"])) { grid-column: span 1; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) form.wpcf7-form:not(:has(.otw-quote-form)) > .hidden-fields-container,
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) form.wpcf7-form:not(:has(.otw-quote-form)) > p:empty { display: none; }
.otw-q-ready :is(#ywraq-other-form, .otw-q__form) form.wpcf7-form:not(:has(.otw-quote-form)) textarea { height: 150px !important; min-height: 150px; }

/* Vertrouwensregel onder de knop */
.otw-q-ready .otw-trust {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin: 12px 0 0 !important; padding: 0;
  font-family: "Loos Normal", sans-serif; font-size: 14px; font-weight: 400; line-height: 1.4; color: #5f6b55;
}
.otw-q-ready .otw-trust li { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.otw-q-ready .otw-trust svg { flex: 0 0 15px; width: 15px; height: 15px; }

/* ---------- Kaart "Jouw trap" (ook op de bedankpagina) ---------- */

.otw-s { background: #eef2ec; border-radius: 15px; padding: 24px 22px 22px; font-family: "Loos Normal", sans-serif; color: #304520; text-align: left; }
.otw-s__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.otw-s .otw-s__top h3 { margin: 0; padding: 0; font-family: "Loos Normal", sans-serif !important; font-size: 16px !important; font-weight: 700; line-height: 1.3; letter-spacing: normal; text-transform: uppercase; color: #304520; }
.otw-s .otw-s__top a { font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1.3; letter-spacing: normal; color: #738c5f; text-decoration: underline; text-transform: none; }
.otw-s .otw-s__top a:hover { color: #304520; }

.otw-s__item + .otw-s__item { margin-top: 18px; padding-top: 18px; border-top: 2px solid #d2d9cb; }
.otw-s__product { display: flex; align-items: center; gap: 14px; }
.otw-s__img { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.otw-s__img img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; }
.otw-s__name { font-size: 22px; font-weight: 700; line-height: 1.2; color: #304520; }
.otw-s__state { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; font-weight: 400; line-height: 1.3; color: #5f6b55; }
.otw-s__state svg { flex: 0 0 15px; width: 15px; height: 15px; }
.otw-s__state.is-open { color: #8a6a12; }

.otw-s__list { margin: 18px 0 0; padding: 0; }
.otw-s__list > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; margin: 0; padding: 9px 0; border-top: 1px dashed #98ad84; font-size: 15px; line-height: 1.4; }
.otw-s__list > div[hidden] { display: none; }
.otw-s__list dt { margin: 0; font-weight: 400; color: #5f6b55; }
.otw-s__list dd { margin: 0; font-weight: 700; color: #304520; overflow-wrap: anywhere; }
.otw-s__list dd span { display: block; font-weight: 400; }
.otw-s__list dd.is-long { font-weight: 400; }
.otw-s .otw-s__more {
  display: block; width: 100%; min-height: 0; margin: 0; padding: 9px 0; border: 0; border-top: 1px dashed #98ad84; border-radius: 0; background: none !important; box-shadow: none;
  font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.4; letter-spacing: normal; text-align: left; text-transform: none; text-decoration: underline; color: #738c5f !important; cursor: pointer;
}
.otw-s .otw-s__more:hover { color: #304520 !important; }
.otw-s a.otw-s__remove { display: inline-block; margin-top: 8px; font-family: inherit; font-size: 14px; font-weight: 400; line-height: 1.3; letter-spacing: normal; color: #5f6b55; text-decoration: underline; text-transform: none; }
.otw-s a.otw-s__remove:hover { color: #b3402a; }
.otw-s__total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: #738c5f; color: #fff; }
.otw-s__total span { font-size: 15px; font-weight: 400; }
.otw-s__total strong { font-size: 22px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.otw-s__note { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: #5f6b55; }

.otw-s .otw-s__bar { display: none; }

/* ---------- Tablet en mobiel ---------- */

@media (max-width: 900px) {
  #yithQuotePopup_overlay { padding: 0 !important; align-items: stretch !important; }
  #yithQuotePopup { max-width: 100% !important; max-height: 100vh !important; max-height: 100dvh !important; padding: 44px 20px 24px !important; }

  .ywraq-wrapper .otw-q__head { margin-bottom: 20px; }
  .ywraq-wrapper .otw-q__head h2 { font-size: 30px; }
  .ywraq-wrapper .otw-q__head p { font-size: 17px; }

  .ywraq-wrapper.otw-q-ready .ywraq-form-table-wrapper { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ywraq-wrapper.otw-q-ready .ywraq-form-table-wrapper > .otw-s { grid-column: 1; grid-row: 1; padding: 14px 16px; }
  .ywraq-wrapper.otw-q-ready .ywraq-form-table-wrapper > .otw-q__form { grid-column: 1; grid-row: 2; }

  .ywraq-wrapper .otw-s .otw-s__bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; width: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none !important; box-shadow: none;
    font-family: inherit; text-align: left; text-transform: none; letter-spacing: normal; white-space: normal; color: #304520 !important; cursor: pointer;
  }
  .ywraq-wrapper .otw-s__bar .otw-s__img { flex-basis: 52px; width: 52px; height: 52px; }
  .ywraq-wrapper .otw-s__bar > span:not(.otw-s__img) { flex: 1 1 130px; min-width: 0; }
  .ywraq-wrapper .otw-s__bar b { display: block; font-size: 17px; font-weight: 700; line-height: 1.2; }
  .ywraq-wrapper .otw-s__bar small { display: block; font-size: 14px; font-weight: 400; color: #5f6b55; }
  .ywraq-wrapper .otw-s__bar em { flex: 0 0 auto; margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: #738c5f; text-decoration: underline; white-space: nowrap; }
  .ywraq-wrapper .otw-s:not(.is-open) .otw-s__body { display: none; }
  .ywraq-wrapper .otw-s.is-open .otw-s__body { margin-top: 14px; }
  .ywraq-wrapper .otw-s.is-single .otw-s__body .otw-s__product { display: none; }
  .ywraq-wrapper .otw-s.is-single .otw-s__body .otw-s__top { margin-bottom: 0; }
  .ywraq-wrapper .otw-s.is-single .otw-s__body .otw-s__list { margin-top: 10px; }
}

@media (max-width: 560px) {
  .otw-q-ready :is(#ywraq-other-form, .otw-q__form) form.wpcf7-form:not(:has(.otw-quote-form)) { grid-template-columns: minmax(0, 1fr); }
  .otw-q-ready :is(#ywraq-other-form, .otw-q__form) form.wpcf7-form:not(:has(.otw-quote-form)) > p:has(input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"])) { grid-column: 1 / -1; }
  .otw-q-ready :is(#ywraq-other-form, .otw-q__form) form.wpcf7-form:not(:has(.otw-quote-form)) textarea { height: 110px !important; min-height: 110px; }
  .otw-q-ready .otw-quote-form > .otw-row > p,
  .otw-q-ready .otw-quote-form > p:has([name="billing-address-1"]) { grid-column: 1 / -1; }
  .otw-q-ready .otw-quote-form > .otw-row > p:has([name="billing-postcode"]) { grid-column: span 5; }
  .otw-q-ready .otw-quote-form > .otw-row > p:has([name="billing-city"]) { grid-column: span 7; }
}
