/* Compact entry points. The old bordered hint bars were too heavy for what they
   say, so this is one quiet line that names exactly what it explains. */
.fviMini{ margin:10px 0 0; }
.fviMiniLink{
  display:inline-flex; align-items:center; gap:7px; padding:0; cursor:pointer;
  appearance:none; border:0; background:none;
  color:var(--muted); font:600 .76rem var(--app-font, system-ui);
  text-decoration:underline; text-decoration-color:color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset:3px; transition:color .15s ease;
}
.fviMiniLink:hover{ color:var(--accent2, var(--accent)); text-decoration-color:currentColor; }
.fviMiniLink svg{ width:15px; height:15px; flex:0 0 auto; color:var(--accent2, var(--accent)); }

/* One-line stock-safety notice on the calculator. */
.fviNotice{ display:flex; align-items:flex-start; gap:8px; margin:0 0 12px; padding:8px 11px; border-radius:10px;
  border:1px solid color-mix(in srgb, var(--warn,#d97706) 34%, var(--line));
  background:color-mix(in srgb, var(--warn,#d97706) 8%, transparent); }
.fviNoticeIcon{ display:grid; place-items:center; width:16px; height:16px; flex:0 0 auto; margin-top:1px; color:var(--warn,#d97706); }
.fviNoticeIcon svg{ width:16px; height:16px; }
.fviNotice p{ margin:0; color:var(--muted); font-size:.76rem; line-height:1.5; }
.fviNotice b{ color:var(--text); }
.fviInline{ appearance:none; border:0; background:none; padding:0; cursor:pointer; color:var(--accent2,var(--accent)); font:inherit; font-weight:700; text-decoration:underline; text-underline-offset:2px; }

/* --- dialog --- */
.fviBackdrop{ position:fixed; inset:0; z-index:10070; display:grid; place-items:center; padding:20px; background:color-mix(in srgb, #05070d 62%, transparent); backdrop-filter:blur(4px); }
.fviDialog{
  position:relative; width:min(760px, 100%); max-height:calc(100vh - 40px); overflow:auto;
  padding:22px; border-radius:20px; color:var(--text);
  border:1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  background:var(--surface-main, var(--panel)); box-shadow:0 30px 80px rgba(0,0,0,.5);
}
.fviClose{ position:absolute; top:14px; right:14px; width:32px; height:32px; border:1px solid var(--line); border-radius:50%; background:var(--surface-input, var(--panel)); color:var(--text); font-size:1.2rem; cursor:pointer; }
.fviHead{ margin:0 44px 16px 0; }
.fviHead span{ color:var(--accent2, var(--accent)); font-size:.6rem; font-weight:900; letter-spacing:.14em; }
.fviHead h2{ margin:3px 0 2px; font-size:1.3rem; }
.fviHead p{ margin:0; color:var(--muted); font-size:.84rem; }
.fviCols{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.fviCol{ padding:16px; border-radius:14px; border:1px solid var(--line); background:var(--surface-sub, var(--panel2, var(--panel))); }
.fviCol.profile{ border-color:color-mix(in srgb, var(--accent) 42%, var(--line)); }
.fviCol.stock{ border-color:color-mix(in srgb, var(--good,#16a34a) 38%, var(--line)); }
.fviCol header{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.fviColIcon{ display:grid; place-items:center; width:34px; height:34px; flex:0 0 auto; border-radius:10px; background:color-mix(in srgb, var(--accent) 14%, transparent); color:var(--accent2, var(--accent)); }
.fviCol.stock .fviColIcon{ background:color-mix(in srgb, var(--good,#16a34a) 14%, transparent); color:var(--good,#16a34a); }
.fviColIcon svg{ width:20px; height:20px; }
.fviCol header span{ color:var(--muted); font-size:.56rem; font-weight:900; letter-spacing:.13em; }
.fviCol header h3{ margin:1px 0 0; font-size:1rem; }
.fviTagline{ margin:0 0 12px; color:var(--muted); font-size:.8rem; font-style:italic; }
.fviCol dl{ margin:0; display:flex; flex-direction:column; gap:9px; }
.fviCol dt{ color:var(--muted); font-size:.6rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.fviCol dd{ margin:2px 0 0; font-size:.83rem; line-height:1.4; }
.fviWhen{ margin:12px 0 0; padding-top:10px; border-top:1px solid var(--line); font-size:.8rem; color:var(--muted); }
.fviWhen b{ color:var(--text); }
.fviTip{ margin:14px 0 0; padding:12px 14px; border-radius:12px; font-size:.82rem; line-height:1.5; color:var(--muted); background:color-mix(in srgb, var(--accent) 9%, transparent); border:1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); }
.fviTip b{ color:var(--text); }
.fviActions{ display:flex; justify-content:flex-end; margin-top:16px; }
.fviActions .btn{ padding:10px 22px; border-radius:11px; border:1px solid var(--accent); background:var(--accent); color:var(--button-text,#fff); font-weight:650; cursor:pointer; }

/* --- "Also create a filament profile" toggle in the Add Inventory form --- */
.inventoryPresetField{ grid-column:1 / -1; min-width:0; max-width:100%; }
.inventoryPresetToggle{
  max-width:100%; box-sizing:border-box;
  display:flex; align-items:flex-start; gap:11px; padding:12px 14px; cursor:pointer;
  border:1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius:12px;
  background:color-mix(in srgb, var(--accent) 7%, transparent);
  transition:border-color .15s ease, background .15s ease;
}
.inventoryPresetToggle:hover{ border-color:var(--accent); background:color-mix(in srgb, var(--accent) 12%, transparent); }
.inventoryPresetToggle input{ margin-top:2px; width:17px; height:17px; flex:0 0 auto; accent-color:var(--accent); cursor:pointer; }
/* flex:1 1 auto + min-width:0 lets the copy shrink and wrap; without a basis the
   text set the width and pushed the whole Add Inventory form wider than the modal. */
.inventoryPresetToggle span{ display:flex; flex-direction:column; gap:3px; flex:1 1 auto; min-width:0; }
.inventoryPresetToggle strong{ font-size:.88rem; overflow-wrap:anywhere; }
.inventoryPresetToggle small{ color:var(--muted); font-size:.76rem; line-height:1.45; overflow-wrap:anywhere; }

@media (max-width:680px){ .fviCols{ grid-template-columns:1fr; } }

/* Calculator hint: stock is never deducted by estimating. */
.fviHintCalc{ margin:0 0 14px; border-color:color-mix(in srgb, var(--warn,#d97706) 40%, var(--line)); background:color-mix(in srgb, var(--warn,#d97706) 9%, var(--surface-raised, var(--panel))); }
.fviHintCalc .fviIcon{ color:var(--warn,#d97706); }
.fviHintCalc b{ color:var(--text); }
.fviTipWarn{ background:color-mix(in srgb, var(--warn,#d97706) 11%, transparent); border-color:color-mix(in srgb, var(--warn,#d97706) 32%, var(--line)); }
.fviTipWarn em{ font-style:normal; text-decoration:underline; text-underline-offset:2px; }

/* The inventory form sets white-space:nowrap on its labels, and white-space is
   inherited — so this copy could never wrap and pushed the whole form (and the
   Add Inventory modal) into horizontal overflow. Re-enable wrapping explicitly. */
.inventoryPresetToggle,
.inventoryPresetToggle span,
.inventoryPresetToggle strong,
.inventoryPresetToggle small{ white-space:normal!important; }
