/* Dignum AI try-on viewer (assets/tryon-viewer.js). A square box in the middle of the screen with the
   try-on result, zoom (top right), Share, Download. Colours and fonts follow the try-on page
   (ink #1a1209, ivory #FBF7EF, coral #C65A45, Jost + Cormorant Garamond). */
html.dgn-tv-lock,html.dgn-tv-lock body{overflow:hidden!important}
.dgn-tv{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(26,18,9,.62);font-family:Jost,system-ui,sans-serif;-webkit-tap-highlight-color:transparent}
.dgn-tv[hidden]{display:none!important}
.dgn-tv-card{width:min(560px,100%,max(300px,calc(100vh - 210px)));max-height:calc(100vh - 24px);display:flex;flex-direction:column;background:#FBF7EF;color:#1a1209;border-radius:24px;box-shadow:0 24px 70px rgba(0,0,0,.35);overflow:hidden}
.dgn-tv-top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 14px 10px 18px}
.dgn-tv-title{display:flex;flex-direction:column;gap:2px;min-width:0}
.dgn-tv-title span{font-size:10.5px;letter-spacing:1.8px;text-transform:uppercase;color:#C65A45;font-weight:500}
.dgn-tv .dgn-tv-name{font-family:'Cormorant Garamond',serif;font-size:18px;font-weight:500;line-height:1.2;color:#1a1209!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dgn-tv-tools{display:flex;align-items:center;gap:6px;flex-shrink:0}
.dgn-tv .dgn-tv-ic{width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;padding:0;margin:0;border:1px solid rgba(26,18,9,.15)!important;background:#fff!important;color:#1a1209!important;cursor:pointer;box-shadow:none!important}
.dgn-tv .dgn-tv-ic:hover{border-color:#C65A45!important;color:#C65A45!important}
.dgn-tv .dgn-tv-ic:disabled{opacity:.35;cursor:default}
.dgn-tv .dgn-tv-x{margin-left:4px}
.dgn-tv svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dgn-tv-pct{min-width:38px;text-align:center;font-size:11px;color:#6f6353}
/* Square picture area; the whole result fits inside it and can be zoomed */
.dgn-tv-stage{position:relative;aspect-ratio:1/1;width:100%;min-height:0;flex:0 1 auto;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none;cursor:zoom-in;background:#F3EDE3}
.dgn-tv-stage.zoomed{cursor:grab}
.dgn-tv-img{max-width:100%;max-height:100%;object-fit:contain;transform-origin:center center;user-select:none;-webkit-user-select:none;will-change:transform}
.dgn-tv-bar{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;padding:14px 14px 4px}
.dgn-tv .dgn-tv-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:11px 18px;margin:0;border-radius:30px;border:1px solid rgba(26,18,9,.2)!important;background:#fff!important;color:#1a1209!important;font-family:Jost,system-ui,sans-serif;font-size:11px;letter-spacing:1.8px;text-transform:uppercase;font-weight:500;text-decoration:none!important;cursor:pointer;line-height:1.2;box-shadow:none!important}
.dgn-tv .dgn-tv-btn:hover{border-color:#C65A45!important;color:#C65A45!important}
.dgn-tv .dgn-tv-main{background:#C65A45!important;border-color:#C65A45!important;color:#fff!important}
.dgn-tv .dgn-tv-main:hover{background:#a94a37!important;color:#fff!important}
.dgn-tv .dgn-tv-view{background:#1a1209!important;border-color:#1a1209!important;color:#FBF7EF!important}
.dgn-tv .dgn-tv-view:hover{background:#8B1A1A!important;border-color:#8B1A1A!important;color:#fff!important}
.dgn-tv .dgn-tv-btn[hidden]{display:none!important}
.dgn-tv-note{margin:0;padding:6px 16px 14px;text-align:center;font-size:10.5px;line-height:1.5;color:#6f6353}

/* Small result in the panel / product widget: tap it, or the corner button, to open the box again */
#tpResImg,#dignum-tryon-result-img{cursor:zoom-in}
.dgn-tv-host{position:relative}
.dgn-tv-host .dgn-tv-open{position:absolute;top:8px;right:8px;z-index:2;width:34px;height:34px;padding:0;margin:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;border:none!important;background:rgba(26,18,9,.6)!important;color:#FBF7EF!important;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.2)!important}
.dgn-tv-host .dgn-tv-open:hover{background:#C65A45!important}
.dgn-tv-host .dgn-tv-open svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dgn-tv-host img[hidden]~.dgn-tv-open,.dgn-tv-host img[style*="display: none"]~.dgn-tv-open,.dgn-tv-host img[style*="display:none"]~.dgn-tv-open{display:none!important}

@media (max-width:600px){
  .dgn-tv{padding:12px}
  .dgn-tv-card{border-radius:20px}
  .dgn-tv-top{padding:12px 10px 8px 14px}
  .dgn-tv-pct{display:none}
  .dgn-tv-bar{padding:12px 12px 2px}
  .dgn-tv .dgn-tv-btn{flex:1 1 40%;padding:11px 12px}
  .dgn-tv .dgn-tv-view{flex-basis:100%}
}
