/**
 * Ecab13 Print - layout of the editor on a computer: tabs in a vertical rail on the left, bar under the editor
 *
 * @author    Ecab13
 * @copyright Since 2026 Ecab13
 * @license   Commercial license - see the LICENSE.md file shipped with this module
 */
/* The tabs of the editor in a vertical rail on the left (icon and label) and a wider working column. A pure override
   of editor.css and editor-page.css: the script does not change (the scroll arrows of the tabs are no longer needed and
   are hidden). On a phone (768 px and less) the horizontal bar of tabs stays. */
@media (min-width: 769px) {
  .e13e-editor-wrap { grid-template-columns: 600px 1fr; }

  .e13e-panel-left {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .e13e-panel-left > .e13e-tab-scroller { grid-column: 1; grid-row: 1 / -1; }
  .e13e-panel-left > .e13e-tab-panels { grid-column: 2; grid-row: 1; }
  .e13e-panel-left > .e13e-left-footer { grid-column: 2; grid-row: 2; }
  .e13e-panel-left > .e13e-preview-banner { grid-column: 2; }

  /* The rail */
  .e13e-panel-left .e13e-tab-scroller {
    flex-direction: column; min-height: 0;
    border-bottom: 0; border-right: 1px solid var(--e13e-border);
    box-shadow: none; background: var(--e13e-surface2, #f7f8fb);
  }
  .e13e-tab-arrow { display: none !important; }
  .e13e-panel-left .e13e-tab-scroller .e13e-tab-nav {
    display: flex; flex-direction: column; flex-wrap: nowrap; flex: 1 1 auto; min-height: 0;
    overflow-x: hidden; overflow-y: auto; scrollbar-width: none;
    padding: 10px 8px; gap: 6px; scroll-padding-inline: 0;
  }
  .e13e-panel-left .e13e-tab-scroller .e13e-tab-btn {
    flex: 0 0 auto; width: 100%; min-width: 0;
    flex-direction: column; justify-content: center; gap: 6px;
    padding: 11px 4px 9px; border-radius: 12px;
    font-size: .64rem; font-weight: 600; line-height: 1.1; white-space: normal; text-align: center;
    color: var(--e13e-muted);
  }
  .e13e-panel-left .e13e-tab-scroller .e13e-tab-btn i { font-size: 1.25rem; }
  .e13e-panel-left .e13e-tab-scroller .e13e-tab-btn span { display: block; line-height: 1.1; }
  .e13e-panel-left .e13e-tab-scroller .e13e-tab-btn:hover { background: var(--e13e-surface); }
  .e13e-panel-left .e13e-tab-scroller .e13e-tab-btn.active {
    background: var(--e13e-accent-bg); border-color: var(--e13e-accent-bd); color: var(--e13e-accent);
    box-shadow: var(--e13e-shadow-sm);
  }
  .e13e-panel-left .e13e-tab-scroller .e13e-tab-btn .e13e-tab-dot { top: 6px; right: 8px; }

  .e13e-tab-panel { padding: 12px 16px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .e13e-editor-wrap { grid-template-columns: 440px 1fr; }
  .e13e-panel-left { grid-template-columns: 76px minmax(0, 1fr); }
  .e13e-panel-left .e13e-tab-scroller .e13e-tab-btn { padding: 9px 2px 7px; font-size: .58rem; }
  .e13e-panel-left .e13e-tab-scroller .e13e-tab-btn i { font-size: 1.1rem; }
}
@media (min-width: 1025px) and (max-width: 1280px) {
  .e13e-editor-wrap { grid-template-columns: 520px 1fr; }
}

/* A side printed on an embroidered product (the back in DTG): its technique and a badge */
.e13e-face-tech { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; background: #e0f2fe; color: #0369a1; font-size: .62rem; font-weight: 700; line-height: 1.5; }
.e13e-face-new { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 8px; background: #dc2626; color: #fff; font-size: .6rem; font-weight: 700; line-height: 1.6; }

/* Bar under the editor, on a computer: the embroidery of the side, then the size, the angle and the quality of the
   element chosen, on one line; the total on the right. A fixed height: the product does not move when an element is
   chosen. */
.e13e-bottombar[hidden] { display: none; }
@media (max-width: 768px) {
  .e13e-bottombar { display: none; }
}
@media (min-width: 769px) {
  body.e13e-page-mode .e13e-editor-wrap { grid-template-rows: 52px minmax(0, 1fr) 72px; }
  .e13e-bottombar {
    grid-column: 1 / -1; grid-row: 3; min-height: 0;
    display: flex; align-items: stretch;
    border-top: 1px solid var(--e13e-border); background: var(--e13e-surface);
    box-shadow: 0 -2px 8px rgba(0,0,0,.04); z-index: 5;
  }
  .e13e-bar-slot { min-width: 0; padding: 6px 14px; display: flex; align-items: center; overflow: hidden; }
  .e13e-bar-technique { flex: 0 1 auto; border-right: 1px solid var(--e13e-border); }
  .e13e-bar-technique:not(:has(> :not([hidden]))) { display: none; }
  .e13e-bar-element { flex: 1 1 0; }
  .e13e-bar-hint { margin: 0; font-size: .74rem; color: var(--e13e-muted); }
  .e13e-bar-hint[hidden] { display: none; }

  /* The price, at the bottom right: it follows the sides, the options and the size */
  .e13e-bar-price { flex: 0 0 auto; flex-direction: column; align-items: flex-end; justify-content: center; min-width: 130px; border-left: 1px solid var(--e13e-border); }
  #e13e-bar-total { font-size: 1.15rem; font-weight: 800; line-height: 1.2; color: var(--e13e-text); white-space: nowrap; }
  #e13e-bar-price-detail { margin-top: 2px; font-size: .64rem; line-height: 1.2; color: var(--e13e-muted); white-space: nowrap; }
  #e13e-bar-price-detail:empty { display: none; }

  /* The element chosen: size, angle, quality, deletion */
  #e13e-element-editor-card { display: flex; align-items: center; gap: 16px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  #e13e-element-editor-card[hidden] { display: none; }
  #e13e-element-editor-card > .e13e-card-title { display: none; }
  #e13e-element-editor-card > .e13e-color-picker-row { flex: 0 0 auto; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0; }
  #e13e-element-editor-card > .e13e-color-picker-row label { margin: 0; font-size: .72rem; white-space: nowrap; }
  #e13e-element-editor-card .e13e-range { flex: 0 0 84px; width: 84px; margin: 0; }
  #e13e-element-editor-card .e13e-quality { flex: 0 1 auto; margin: 0; padding: 4px 9px; }
  #e13e-element-editor-card .e13e-quality[hidden] { display: none; }
  #e13e-element-editor-card .e13e-quality-row { flex-wrap: nowrap; font-size: .68rem; gap: 4px; white-space: nowrap; }
  #e13e-element-editor-card .e13e-print-line { margin: 1px 0 0; font-size: .66rem; white-space: nowrap; }
  #e13e-element-editor-card .e13e-quality .e13e-hint { display: none; }
  #e13e-element-delete { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; margin: 0; font-size: 0; }
  #e13e-element-delete i { font-size: 14px; margin: 0; }

  /* The embroidery of the side: place, choices, messages */
  #e13e-bar-technique .e13e-embroidery { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; border: 0; background: none; }
  #e13e-bar-technique .e13e-embroidery[hidden] { display: none; }
  #e13e-bar-technique .e13e-section-title { flex: 0 0 auto; display: flex; flex-direction: column; margin: 0; font-size: .64rem; line-height: 1.3; }
  #e13e-bar-technique .e13e-section-title .e13e-section-value { margin: 0; }
  #e13e-bar-technique .e13e-emb-choices { flex: 0 0 auto; display: flex; gap: 6px; margin: 0; }
  #e13e-bar-technique .e13e-emb-choice { display: grid; grid-template-columns: auto auto; justify-content: space-between; column-gap: 8px; width: 172px; padding: 4px 9px; margin: 0; text-align: left; }
  #e13e-bar-technique .e13e-emb-choice strong { font-size: .74rem; line-height: 1.25; white-space: nowrap; }
  #e13e-bar-technique .e13e-emb-choice .e13e-emb-price { font-size: .68rem; line-height: 1.3; white-space: nowrap; }
  #e13e-bar-technique .e13e-emb-choice small { grid-column: 1 / -1; margin: 0; font-size: .62rem; line-height: 1.2; }
  #e13e-bar-technique .e13e-emb-puff { flex: 0 0 auto; width: 150px; }
  #e13e-bar-technique .e13e-emb-notes { flex: 0 1 230px; min-width: 150px; }
  #e13e-bar-technique .e13e-emb-hint, #e13e-bar-technique .e13e-emb-warning { margin: 0 0 2px; font-size: .62rem; line-height: 1.2; }
  #e13e-bar-technique .e13e-emb-warning { padding: 2px 6px; }
  #e13e-bar-technique .e13e-emb-hint { padding: 0; }
}

/* Smaller screens */
@media (min-width: 769px) and (max-width: 1400px) {
  #e13e-bar-technique .e13e-emb-choice { width: 140px; }
  #e13e-bar-technique .e13e-emb-notes { flex-basis: 160px; }
  #e13e-element-editor-card { gap: 10px; }
  #e13e-element-editor-card .e13e-range { flex-basis: 60px; width: 60px; }
  .e13e-bar-price { min-width: 100px; }
  #e13e-element-editor-card .e13e-print-line { display: none; }
}
