/* Biometric Studio v11.10.10 — final rail consistency, clear Stage 5 actions, embedded preview title spacing */

/* Stage 3: the collapsed and expanded rails contain exactly the same usable tools. */
.editor-toolbar-v10 .advanced-editor-tool,
.editor-toolbar-v10 button.advanced-editor-tool,
.editor-toolbar-v10 button.advanced-editor-tool:not(.hidden){display:none!important}
.editor-toolbar-v10 .toolbar-spacer{display:none!important}
.editor-toolbar-v10 button.hidden{display:none!important}

@media (max-width:760px){
  .editor-toolbar-v10{overflow:hidden!important}
  .editor-toolbar-v10.show-tool-labels{
    width:min(220px,68vw)!important;
    height:auto!important;
    max-height:min(68dvh,430px)!important;
    overflow:hidden!important;
    align-content:start!important;
  }
  .editor-toolbar-v10.show-tool-labels button:not(.hidden):not(.advanced-editor-tool){
    display:grid!important;
    grid-template-columns:38px minmax(0,1fr)!important;
    align-items:center!important;
    justify-items:start!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    padding:0 8px 0 0!important;
    font-size:0!important;
  }
  /* Do not use pseudo labels here. Real DOM labels are more reliable and stay visible after translations/cache changes. */
  .editor-toolbar-v10.show-tool-labels button:not(.hidden):not(.advanced-editor-tool)::before,
  .editor-toolbar-v10.show-tool-labels button:not(.hidden):not(.advanced-editor-tool)::after{
    display:none!important;
    content:none!important;
  }
  .editor-toolbar-v10.show-tool-labels button:not(.hidden):not(.advanced-editor-tool)>.tool-icon{
    display:grid!important;
    grid-column:1!important;
    place-items:center!important;
    width:38px!important;
    height:36px!important;
    margin:0!important;
    color:#f5f7fb!important;
    font:800 17px/1 system-ui!important;
  }
  .editor-toolbar-v10.show-tool-labels button:not(.hidden):not(.advanced-editor-tool)>.tool-label{
    display:block!important;
    grid-column:2!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    color:#f5f7fb!important;
    font:800 9.5px/1.1 system-ui!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
    text-align:left!important;
  }
  .editor-toolbar-v10.show-tool-labels #toggleToolLabels>.tool-label{color:#d9d2ff!important}
}

/* Stage 5: stronger, readable right-side primary action rail. */
.final-photo-actions button svg{
  width:17px;height:17px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;overflow:visible
}
@media (max-width:760px){
  .screen[data-screen="5"] .export-photo{
    width:min(94vw,360px)!important;
    max-width:min(94vw,360px)!important;
    padding-right:98px!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }
  .screen[data-screen="5"] .export-photo>img{
    width:100%!important;
    margin:0!important;
    border-radius:18px!important;
    background:#fff!important;
  }
  .screen[data-screen="5"] .export-photo .watermark-layer{right:98px!important}
  .screen[data-screen="5"] .output-lock-badge{right:102px!important}
  .stage5-unlock-overlay{right:98px!important}
  .final-photo-actions{
    right:0!important;
    top:50%!important;
    bottom:auto!important;
    transform:translateY(-50%)!important;
    width:92px!important;
    gap:5px!important;
    padding:5px!important;
    border:1px solid rgba(148,163,184,.20)!important;
    border-radius:15px!important;
    background:rgba(7,12,21,.97)!important;
    box-shadow:0 12px 30px rgba(0,0,0,.36)!important;
  }
  .final-photo-actions button{
    width:82px!important;
    height:40px!important;
    min-height:40px!important;
    display:grid!important;
    grid-template-columns:20px minmax(0,1fr)!important;
    align-items:center!important;
    justify-items:start!important;
    gap:6px!important;
    padding:0 7px!important;
    border:1px solid rgba(148,163,184,.10)!important;
    border-radius:10px!important;
    background:#121d2d!important;
    color:#fff!important;
  }
  .final-photo-actions button span{
    display:block!important;
    min-width:0!important;
    color:#eef3fb!important;
    font:850 9px/1.05 system-ui!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  .final-photo-actions button:disabled{opacity:.34!important;filter:saturate(.45)!important}
}
@media (min-width:761px){
  .final-photo-actions{width:98px!important}
  .final-photo-actions button{width:88px!important;grid-template-columns:21px minmax(0,1fr)!important;gap:7px!important}
  .final-photo-actions button span{font-size:9.5px!important}
}

/* Stage 6 embedded mode: reserve space for the parent "Back to photo" overlay. */
@media (max-width:900px){
  body.embedded.print-app .preview-toolbar,
  body.print-app.embedded .preview-toolbar{
    padding:5px 7px 5px 102px!important;
  }
  body.embedded.print-app .preview-toolbar>div:first-child,
  body.print-app.embedded .preview-toolbar>div:first-child{min-width:0!important}
  body.embedded.print-app .preview-toolbar>div:first-child strong,
  body.print-app.embedded .preview-toolbar>div:first-child strong{
    display:block!important;
    white-space:nowrap!important;
    font-size:12px!important;
  }
}
