/* 0.4.175: vertical film selector grows until it touches the visible viewport bottom. */
.workspace{position:relative}
.fd-texture-picker{position:absolute;z-index:10;left:12px;top:119px;width:clamp(196px,17vw,260px);max-height:var(--fd-texture-available-height,none);margin:0;padding:13px;background:#fff;border:1px solid #f2dfd3;border-radius:15px;box-shadow:0 7px 24px #0000000d;overflow:hidden;display:flex;flex-direction:column;gap:8px}
.fd-texture-picker[hidden]{display:none!important}
.fd-texture-heading{flex:0 0 auto;display:flex;flex-direction:column;gap:4px;margin:0 1px 4px;font-size:13px;font-weight:850;color:#26272a}
.fd-texture-heading span:last-child{font-size:10px;font-weight:500;color:#888;line-height:1.4}
.fd-texture-options{flex:0 1 auto;display:flex;flex-direction:column;gap:7px;overflow-y:auto;overflow-x:hidden;padding:2px 3px 7px 1px;scrollbar-width:thin;min-height:0}
.fd-texture-choice{flex:0 0 auto;min-height:77px;width:100%;min-width:0;display:grid;grid-template-columns:69px minmax(0,1fr);grid-template-rows:1fr auto;align-items:center;gap:2px 9px;border:1px solid #ede8e3;background:#fbfaf9;border-radius:11px;padding:7px;text-align:left;color:#28282b;transition:background .15s,border-color .15s}
.fd-texture-choice:hover{border-color:#ff9a65;background:#fffaf5}
.fd-texture-choice.is-selected{background:#fff5ee;border:2px solid #f26a20;padding:6px}
.fd-texture-choice:focus-visible{outline:2px solid #f26a20;outline-offset:2px}
.fd-texture-chip{display:block;grid-row:1 / 3;grid-column:1;align-self:stretch;min-height:56px;width:69px;border-radius:7px;border:1px solid #ffffffa0;box-shadow:0 1px 4px #0002}
.fd-texture-name{font-size:11px;font-weight:800;line-height:1.25;text-align:left;overflow-wrap:anywhere}
.fd-texture-price{font-size:11px;color:#e75b10;font-weight:850;grid-column:2}
.workspace.fd3d-active .fd-texture-picker{display:none!important}
/* Narrow desktops: keep the selector in the left gutter without shrinking the garment. */
@media(min-width:881px) and (max-width:1399px){
 .fd-texture-picker{top:112px;left:6px;width:clamp(140px,15.2vw,190px);padding:9px}
 .fd-texture-choice{grid-template-columns:48px minmax(0,1fr);min-height:65px;gap:4px;padding:5px}
 .fd-texture-choice.is-selected{padding:4px}
 .fd-texture-chip{width:48px;min-height:51px}
 .fd-texture-name,.fd-texture-price{font-size:10px}
}
/* Mobile: place a short scrollable vertical list before the mockup. */
@media(max-width:880px){
 .fd-texture-picker{position:relative;left:auto;top:auto;width:min(100%,460px);max-height:none;margin:3px auto;align-self:center}
 .fd-texture-options{overflow:visible;display:flex;flex-direction:column}
}
@media(max-width:480px){
 .fd-texture-picker{width:calc(100% - 14px);max-height:none;padding:9px}
 .fd-texture-heading{font-size:12px}
 .fd-texture-choice{min-height:66px}
}

/* 0.4.413 — mobile texture chooser as a scrollable, preview-first dialog.
   No normal-flow height: changing print finish never pushes the mockup down. */
.fd-texture-close{display:none}
@media(max-width:880px){
  .workspace .fd-texture-picker:not([hidden]){
    display:none!important;position:fixed!important;z-index:965!important;
    left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;
    transform:translate(-50%,-50%)!important;
    width:calc(100vw - 24px)!important;max-width:520px!important;
    max-height:min(78dvh,670px)!important;min-height:0!important;
    box-sizing:border-box!important;margin:0!important;padding:12px!important;
    border:1px solid #f1c7b4!important;border-radius:19px!important;
    background:#fff!important;box-shadow:0 22px 85px #0006!important;
    overflow:hidden!important;flex-direction:column;
  }
  body.fd-mobile-texture-open .workspace .fd-texture-picker:not([hidden]){display:flex!important}
  .workspace .fd-texture-heading{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;
    flex:0 0 auto;font-size:15px;margin:0;padding:1px 2px 10px;border-bottom:1px solid #eee;}
  .workspace .fd-texture-close{display:grid;place-items:center;flex:0 0 33px;width:33px;height:33px;border:0;
    border-radius:9px;background:#f4f4f5;color:#333;font-size:23px;cursor:pointer}
  .workspace .fd-texture-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;
    gap:9px;flex:1 1 auto;min-height:0;max-height:none!important;padding:5px 1px 3px;
    overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
  .workspace .fd-texture-choice{
    display:flex;flex-direction:column;align-items:stretch;gap:6px;
    min-height:0;width:100%;padding:7px!important;margin:0!important;
    background:#fff;border:1px solid #e6e6e6;border-radius:12px;
    text-align:left;box-sizing:border-box;position:relative;
  }
  .workspace .fd-texture-choice.is-selected{background:#fff4ed;border:2px solid #ff653b;padding:6px!important}
  .workspace .fd-texture-choice.is-selected::after{content:'✓';position:absolute;top:11px;right:12px;
    width:20px;height:20px;display:grid;place-items:center;border-radius:100%;background:#ff653b;color:white;font-size:12px;font-weight:900}
  .workspace .fd-texture-chip{width:100%!important;height:79px;min-height:79px!important;max-height:79px;flex:0 0 79px;
    border-radius:8px;background-size:cover!important;background-position:center!important;}
  .workspace .fd-texture-name{font-size:12px;font-weight:800;line-height:1.25;min-height:29px}
  .workspace .fd-texture-price{font-size:11px;line-height:1.1;min-height:14px;color:#e95719}
}
@media(max-width:360px){
  .workspace .fd-texture-picker:not([hidden]){padding:10px!important}
  .workspace .fd-texture-options{gap:7px}
  .workspace .fd-texture-chip{height:65px!important;min-height:65px!important;max-height:65px!important;flex-basis:65px}
  .workspace .fd-texture-name{font-size:11px}
}
/* Keep every surcharge INSIDE its card at common iPhone widths. */
@media(max-width:880px){
 .workspace .fd-texture-choice{min-height:154px!important;justify-content:flex-start!important}
 .workspace .fd-texture-name{flex:0 0 auto!important;min-height:29px!important}
 .workspace .fd-texture-price{display:block!important;flex:0 0 17px!important;
   min-height:17px!important;line-height:17px!important;grid-column:auto!important;
   white-space:nowrap;margin-top:auto}
}
@media(max-width:360px){.workspace .fd-texture-choice{min-height:140px!important}}
