/* Date-only refinement of preview/cart.css. Load after the existing GS styles.
   No cart styling or changes to native product, quantity, variant or note controls. */
.gs-wholesale .gs-date-control{--gs-date-ink:#0b2e40;--gs-date-gold:#b49352;display:grid;grid-template-columns:minmax(0,1fr);gap:9px;min-width:0;margin:18px 0;padding:17px 18px;background:#f7f5ef;border:1px solid #e2dfd4;border-radius:10px;color:var(--gs-date-ink);font-size:13px;line-height:1.55;box-shadow:none}
.gs-wholesale .gs-date-control,.gs-wholesale .gs-date-control *,.gs-wholesale .gs-date-dock,.gs-wholesale .gs-date-dock *{box-sizing:border-box}
.gs-wholesale .gs-date-control [hidden],.gs-wholesale .gs-date-dock [hidden]{display:none!important}
.gs-wholesale .gs-date-control>label{display:block;margin:0;font-size:13px;font-weight:700;letter-spacing:.04em;color:var(--gs-date-ink)}
.gs-wholesale .gs-date-choices{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;background:#ebece6;border-radius:8px}
.gs-wholesale .gs-date-choice{min-height:38px;min-width:0;padding:7px 10px;border:1px solid transparent;border-radius:6px;background:transparent;color:#4a6068;font:inherit;font-weight:600;white-space:normal;cursor:pointer;box-shadow:none}
.gs-wholesale .gs-date-choice[aria-pressed=true]{background:#fff;border-color:#d1c7ae;color:#0b2e40;box-shadow:0 1px 3px #0b2e400a}
.gs-wholesale .gs-date-choice:hover:not(:disabled){background:#fff;color:#0b2e40}
.gs-wholesale .gs-date-control input[data-gs-delivery-date]{display:block;width:100%;min-width:0;min-height:42px;margin:0;padding:9px 12px;border:1px solid #bdc8c7;border-radius:7px;background:#fff;color:#0b2e40;font:inherit;font-size:15px;font-weight:600;line-height:1.4;color-scheme:light}
.gs-wholesale .gs-date-control input[data-gs-delivery-date]::-webkit-calendar-picker-indicator{padding:2px;cursor:pointer;opacity:.75}
.gs-wholesale .gs-date-current{margin:0;font-size:12px;font-weight:600;color:#806535;overflow-wrap:anywhere}
.gs-wholesale .gs-date-control .gs-date-note{width:auto;margin:0;color:#6a7678;font-size:11px;line-height:1.7;overflow-wrap:anywhere}
.gs-wholesale .gs-date-control>span:not(.gs-date-note),.gs-wholesale .gs-date-control .gs-date-shortcuts{display:flex;gap:5px;flex-wrap:wrap;min-width:0}
.gs-wholesale .gs-date-control .gs-date-shortcuts:empty{display:none}
.gs-wholesale .gs-date-control .gs-date-shortcuts button{min-height:30px;padding:4px 7px;border:1px solid #e0ddd1;border-radius:5px;background:#fff;color:#375460;font:inherit;font-size:11px;white-space:normal;cursor:pointer}
.gs-wholesale .gs-date-control .gs-cart-button.text{min-height:30px;padding:4px 7px;border:1px solid #e0ddd1;border-radius:5px;background:#fff;color:#375460;font:inherit;font-size:11px;white-space:normal}
.gs-wholesale .gs-date-control-product{max-width:470px;border-top:2px solid #b49352}
.gs-wholesale .gs-date-control-product .gs-date-choices{max-width:100%}
.gs-wholesale .gs-date-dock{position:fixed;z-index:1040;right:max(20px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));width:278px;max-width:calc(100vw - 32px);font:inherit;color:#0b2e40;isolation:isolate}
.gs-wholesale .gs-date-trigger{display:flex;align-items:center;gap:12px;width:100%;min-height:66px;margin:0;padding:10px 15px;border:1px solid #d7c9ab;border-radius:12px;background:#0b2e40;color:#fff;text-align:left;cursor:pointer;box-shadow:0 5px 20px #0b2e4024;font:inherit;line-height:1.3}
.gs-wholesale .gs-date-trigger:hover{background:#143e52;border-color:#c9aa70}
.gs-wholesale .gs-date-icon{display:grid;place-items:center;flex:0 0 33px;width:33px;height:36px;color:#dec58f}
.gs-wholesale .gs-date-icon svg{display:block;width:27px;height:27px}
.gs-wholesale .gs-date-trigger-copy{display:grid;grid-template-columns:auto minmax(0,1fr);gap:3px 9px;flex:1;min-width:0}
.gs-wholesale .gs-date-trigger-copy small{grid-column:1/-1;color:#d1dbdc;font-size:10px;letter-spacing:.08em}
.gs-wholesale .gs-date-trigger-copy strong{font-size:16px;font-weight:600;white-space:nowrap}
.gs-wholesale .gs-date-trigger-relative{align-self:center;color:#e5d5b4;font-size:10px;line-height:1.4;overflow-wrap:anywhere}
.gs-wholesale .gs-date-chevron{flex:0 0 auto;font-size:20px;line-height:1;transition:transform .16s ease;color:#d4c093}
.gs-wholesale .gs-date-dock.is-open .gs-date-chevron{transform:rotate(180deg)}
.gs-wholesale .gs-date-popover{margin:0 0 10px;border:1px solid #d7dacf;border-radius:12px;background:#fff;box-shadow:0 10px 40px #0b2e4026;overflow:auto;max-height:min(560px,calc(100dvh - 125px));overscroll-behavior:contain}
.gs-wholesale .gs-date-popover-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border-bottom:1px solid #eeece3;background:#fff;font-size:13px}
.gs-wholesale .gs-date-close{display:grid;place-items:center;flex:0 0 32px;width:32px;min-height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:#66777b;font:inherit;font-size:24px;line-height:1;cursor:pointer}
.gs-wholesale .gs-date-close:hover{background:#f0f1ec;color:#0b2e40}
.gs-wholesale .gs-date-control-catalog{margin:0;padding:14px;border:0;border-radius:0 0 12px 12px;background:#faf9f5;box-shadow:none}
.gs-wholesale .gs-date-control-catalog>label{display:none}
.gs-wholesale.gs-date-dock-active #wrap{padding-bottom:92px}
.gs-wholesale .gs-date-control :is(button,input):focus-visible,.gs-wholesale .gs-date-dock button:focus-visible{outline:3px solid #b49352;outline-offset:3px;box-shadow:0 0 0 1px #fff}
.gs-wholesale .gs-date-control button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:600px){
 .gs-wholesale .gs-date-dock{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:244px;max-width:calc(100vw - 24px)}
 .gs-wholesale .gs-date-trigger{min-height:62px;gap:8px;padding:9px 12px;border-radius:11px}
 .gs-wholesale .gs-date-trigger-copy{gap:3px 6px}.gs-wholesale .gs-date-trigger-copy strong{font-size:15px}
 .gs-wholesale .gs-date-popover{max-height:calc(100dvh - 115px)}
 .gs-wholesale .gs-date-control-product{margin:16px 0;padding:14px;max-width:none}
 .gs-wholesale .gs-date-control input[data-gs-delivery-date]{font-size:16px}
 .gs-wholesale .gs-date-choice{min-height:42px;padding-inline:6px;font-size:12px}
 .gs-wholesale.gs-date-dock-active #wrap{padding-bottom:86px}
}
@media(prefers-reduced-motion:reduce){.gs-wholesale .gs-date-chevron{transition:none}}

/* Product date selection opens inline; the closed face matches the catalogue dock. */
.gs-wholesale .gs-date-control-product.gs-date-folded{display:block;max-width:470px;min-width:0;margin:18px 0;padding:0;border:0;background:transparent;box-shadow:none}
.gs-wholesale .gs-date-control-product.gs-date-folded .gs-date-product-trigger{width:100%;min-height:72px}
.gs-wholesale .gs-date-control-product.gs-date-folded .gs-date-product-panel{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;margin-top:9px;padding:17px 18px;border:1px solid #e2dfd4;border-left:3px solid #b49352;border-radius:10px;background:#fff;box-shadow:0 5px 18px #0b2e400b}
.gs-wholesale .gs-date-control-product.gs-date-folded .gs-date-product-panel[hidden]{display:none!important}
.gs-wholesale .gs-date-control-product.gs-date-folded .gs-date-product-panel>label{display:none}
.gs-wholesale .gs-date-control-product.gs-date-folded.is-open .gs-date-chevron{transform:rotate(180deg)}
@media(max-width:600px){.gs-wholesale .gs-date-control-product.gs-date-folded{max-width:none;margin:16px 0}.gs-wholesale .gs-date-control-product.gs-date-folded .gs-date-product-panel{padding:14px}}

/* Override the more specific quantity-form card so the folded date control has no outer frame. */
.gs-wholesale.gs-date-orders form[data-gs-procurement-form] .gs-date-control-product.gs-date-folded,
.gs-wholesale.gs-date-preview form[data-gs-preview-form] .gs-date-control-product.gs-date-folded,
.gs-wholesale .gs-date-control-product.gs-date-folded{
  display:block;width:100%;max-width:100%;min-width:0;margin:0 0 16px;padding:0;
  border:0;border-radius:0;background:transparent;box-shadow:none;color:#0b2e40;
}
.gs-wholesale .gs-date-control-product.gs-date-folded .gs-date-product-trigger{
  width:min(100%,278px);min-height:66px;padding:10px 15px;border:1px solid #d7c9ab;
  border-radius:12px;box-shadow:0 5px 20px #0b2e4024;
}
.gs-wholesale .gs-date-control-product.gs-date-folded .gs-date-product-panel{
  display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;width:100%;
  max-height:0;margin:0;padding:0 18px;overflow:hidden;visibility:hidden;opacity:0;
  border:0 solid #e2dfd4;border-radius:12px;background:#fff;box-shadow:none;
  transition:max-height .26s ease,margin .26s ease,padding .26s ease,
    border-width .26s ease,opacity .18s ease,visibility 0s linear .26s;
}
.gs-wholesale .gs-date-control-product.gs-date-folded.is-open .gs-date-product-panel{
  max-height:800px;margin-top:10px;padding:17px 18px;visibility:visible;opacity:1;
  border-width:1px;box-shadow:0 5px 18px #0b2e400b;
  transition:max-height .26s ease,margin .26s ease,padding .26s ease,
    border-width .26s ease,opacity .18s ease,visibility 0s;
}
.gs-wholesale .gs-date-control-product.gs-date-folded .gs-date-shortcuts:has(button)::before{
  content:'已有的採購清單';display:block;flex:0 0 100%;margin:1px 0 3px;
  color:#536971;font-size:12px;font-weight:700;letter-spacing:.03em;
}
@media(max-width:600px){
  .gs-wholesale .gs-date-control-product.gs-date-folded .gs-date-product-trigger{width:min(100%,244px);min-height:62px;padding:9px 12px}
  .gs-wholesale .gs-date-control-product.gs-date-folded.is-open .gs-date-product-panel{padding:14px}
}
@media(prefers-reduced-motion:reduce){
  .gs-wholesale .gs-date-control-product.gs-date-folded .gs-date-product-panel{transition:none}
}

/* Product details' legacy range stylesheet adds a gold left border after the fold assets. */
.gs-wholesale #product_details .gs-date-control-product.gs-date-folded{
  border:0!important;
  padding:0!important;
  background:transparent!important;
}
