/* Cart quote button and popover, DESK-G 22/10/2026. A quiet second-level link, not a rival of the order button. */
.petit-quote { margin-block: 4px 12px; text-align: center; }
.petit-quote .petit-quote-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 12px;
  border: 0; background: transparent; color: #535748; font: inherit; font-size: 15px; font-weight: 400;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.petit-quote .petit-quote-link:focus-visible,
.petit-quote-pop button:focus-visible,
.petit-quote-pop input:focus-visible,
.petit-quote-pop a:focus-visible { outline: 3px solid #535748; outline-offset: 3px; }
/* No display rule on the popover itself: the browser hides it until it is opened. */
.petit-quote-pop {
  box-sizing: border-box; width: min(440px, calc(100% - 40px)); max-height: calc(100% - 64px); overflow: auto;
  padding: 20px; border: 1px solid #dedfd9; border-radius: 16px; background: #fff; color: #1f201c;
  font: 400 15px/1.6 'Assistant', 'Assistant Fallback', 'Segoe UI', Arial, sans-serif; direction: rtl; text-align: right;
  box-shadow: 0 12px 40px rgba(31, 32, 28, .18);
}
.petit-quote-pop::backdrop { background: rgba(31, 32, 28, .35); }
.petit-quote-pop h3 { margin: 0 0 12px; font-size: 20px; }
.petit-quote-pop h4 { margin: 16px 0 8px; font-size: 16px; }
.petit-quote-pop button { box-sizing: border-box; min-height: 44px; padding: 6px 20px; border-radius: 999px; font: 600 15px 'Assistant', 'Assistant Fallback', 'Segoe UI', Arial, sans-serif; cursor: pointer; }
.petit-quote-pop .petit-quote-action { display: block; width: 100%; border: 1px solid #535748; background: transparent; color: #535748; }
.petit-quote-pop .petit-quote-send { margin-top: 8px; background: #535748; color: #fff; }
.petit-quote-pop button:disabled { opacity: .6; cursor: default; }
.petit-quote-pop .petit-quote-close { display: block; margin: 12px 0 0 auto; border: 1px solid #dedfd9; background: transparent; color: #1f201c; }
.petit-quote-field { margin-bottom: 8px; }
.petit-quote-field label { display: block; margin-bottom: 2px; font-size: 14px; }
.petit-quote-field input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #767676; border-radius: 4px; font: inherit; direction: ltr; text-align: left; }
.petit-quote-hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.petit-quote-pop [data-petit-quote-status] { margin: 12px 0 0; font-size: 14px; }
.petit-quote-pop [data-petit-quote-status][data-tone="error"] { color: var(--wc-red, #cc1818); }
.petit-quote-pop [data-petit-quote-status] a { display: inline-block; margin-inline-start: 8px; color: #535748; }

/* CARTQUOTE: the card stays outside Woo's replaceable totals; mobile precedes them in DOM order. */
.woocommerce-cart .woocommerce .cart-collaterals:has(> .petit-cart-quote-card) { display:flex; gap:24px; flex-wrap:nowrap; align-items:flex-start; }
.woocommerce-cart .woocommerce .cart-collaterals:has(> .petit-cart-quote-card)::before,
.woocommerce-cart .woocommerce .cart-collaterals:has(> .petit-cart-quote-card)::after { display:none; }
.woocommerce-cart .woocommerce .cart-collaterals:has(> .petit-cart-quote-card) > .cart_totals { flex:0 0 640px; width:640px; margin-inline-start:0; }
.petit-cart-quote-card { box-sizing:border-box; flex:1 1 0; min-width:0; margin-top:56px; padding:18px; border:1px solid #EADFB8; border-radius:14px; background:#F8F1DC; direction:rtl; text-align:right; }
.petit-cart-quote-card h3 { margin:0 0 8px; color:#1F201C; font:600 21px/1.3 'Assistant', 'Assistant Fallback',sans-serif; }
.petit-cart-quote-card .petit-cart-quote-description { margin:0 0 14px; color:#3d3e38; font:400 15px/1.5 'Assistant', 'Assistant Fallback',sans-serif; }
.petit-cart-quote-chips { display:flex; gap:8px; margin-bottom:14px; }
.petit-cart-quote-chips span { display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border:1px solid #EADFB8; border-radius:999px; background:white; color:#3d3e38; font:400 13px/1.5 'Assistant', 'Assistant Fallback',sans-serif; white-space:nowrap; }
.petit-cart-quote-chips svg { width:18px; height:18px; flex:none; }
.petit-cart-quote-card button { box-sizing:border-box; cursor:pointer; font:600 16px/1.4 'Assistant', 'Assistant Fallback',sans-serif; color:#4F5743; }
.petit-cart-quote-card .petit-cart-quote-desktop { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:48px; padding:8px; border:1.5px solid #4F5743; border-radius:3px; background:white; white-space:nowrap; }
.petit-cart-quote-desktop svg { width:22px; height:22px; flex:none; }
.petit-cart-quote-mobile { display:none; }
.petit-cart-quote-card button:focus-visible,
.petit-quote-pop-cart select:focus-visible { outline:3px solid #535748; outline-offset:3px; }
.petit-quote-cart-fields { min-width:0; margin:0 0 16px; padding:0; border:0; }
.petit-quote-cart-fields legend { margin-bottom:8px; font-weight:600; }
.petit-quote-cart-fields input[type="text"] { direction:rtl; text-align:right; }
.petit-quote-cart-fields input[type="checkbox"] { width:22px; min-height:22px; margin:0; }
.petit-quote-cart-fields .petit-quote-field:has(input[type="checkbox"]) { display:flex; align-items:center; gap:10px; min-height:44px; }
.petit-quote-cart-fields select { box-sizing:border-box; width:100%; min-height:44px; padding:8px 10px; border:1px solid #767676; border-radius:4px; background:white; color:inherit; font:inherit; }
.petit-quote-pop-cart[data-popover-fallback]:not([hidden]) { display:block; position:fixed; inset:32px 0 auto; margin-inline:auto; z-index:100000; }
/* Desktop cart only: preserve DOM/RTL order and keep the email section full width. */
@media (min-width:640px) {
  .petit-quote-pop-cart { width:560px; max-width:calc(100vw - 32px); padding:12px; }
  .petit-quote-pop-cart h3 { margin-bottom:8px; line-height:26px; }
  .petit-quote-pop-cart h4 { margin:4px 0; line-height:22px; }
  .petit-quote-pop-cart .petit-quote-cart-fields { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); column-gap:16px; margin-bottom:4px; }
  .petit-quote-pop-cart .petit-quote-cart-fields legend,
  .petit-quote-pop-cart .petit-quote-cart-fields .petit-quote-field:has(input[type="checkbox"]) { grid-column:1 / -1; }
  .petit-quote-pop-cart .petit-quote-field { min-width:0; margin-bottom:4px; }
  .petit-quote-pop-cart .petit-quote-field label { line-height:18px; }
  .petit-quote-pop-cart .petit-quote-field input:not([type="checkbox"]),
  .petit-quote-pop-cart .petit-quote-cart-fields select { min-height:32px; padding:4px 8px; line-height:22px; }
  .petit-quote-pop-cart .petit-quote-cart-fields .petit-quote-field:has(input[type="checkbox"]) { min-height:24px; }
  .petit-quote-pop-cart button { min-height:32px; padding:4px 16px; }
  .petit-quote-pop-cart .petit-quote-send,
  .petit-quote-pop-cart .petit-quote-close { margin-top:4px; }
}
/* Beside totals from 1000px: 640 + 24 + 40 page padding + 15 scrollbar + 280 card = 999px. */
@media (width < 1000px) {
  .woocommerce-cart .woocommerce .cart-collaterals:has(> .petit-cart-quote-card) { flex-direction:column; gap:0; }
  .woocommerce-cart .woocommerce .cart-collaterals:has(> .petit-cart-quote-card) > .cart_totals { flex:none; width:100%; margin-inline-start:auto; }
  .petit-cart-quote-card { flex:none; width:100%; margin:14px 0; padding:12px 16px; border-radius:12px; }
  .petit-cart-quote-card h3 { margin:0 0 4px; font-size:18px; }
  .petit-cart-quote-card .petit-cart-quote-description,
  .petit-cart-quote-chips,
  .petit-cart-quote-card .petit-cart-quote-desktop { display:none; }
  .petit-cart-quote-mobile { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
  .petit-cart-quote-mobile button { min-height:44px; padding:0; border:0; background:transparent; text-decoration:underline; text-underline-offset:4px; }
  .petit-cart-quote-mobile span { color:#5F605A; font:400 13px/1.5 'Assistant', 'Assistant Fallback',sans-serif; }
}
