/* Trivero prototype — shared components (shell, tabs, modal, toast, admin widgets) */

/* tab panels */
.tabpane { display: none; }
.tabpane.on { display: block; }

/* modal hidden state */
.modal-back[hidden] { display: none; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; z-index: 200;
  transform: translateX(-50%) translateY(16px);
  background: var(--secondary); color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 500; box-shadow: var(--shadow-md); opacity: 0;
  transition: opacity .22s ease, transform .22s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* switch */
.switch { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong); cursor: pointer; flex: 0 0 auto; transition: background .15s; }
.switch.on { background: var(--primary); border-color: var(--primary); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch.on::after { transform: translateX(18px); }

/* config rows (admin) */
.cfg-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cfg-row:last-child { border-bottom: 0; }
.cfg-row .handle { color: var(--text-faint); cursor: grab; }
.cfg-row .input { height: 34px; }
.cfg-row .ic-holder { width: 30px; height: 30px; border-radius: 7px; background: var(--surface-2); color: var(--text-2); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }

/* mini preview (admin) */
.preview-mini { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.preview-mini .pm-brand { display: flex; align-items: center; gap: 8px; padding: 6px 8px 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.preview-mini .pm-item { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 7px; font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.preview-mini .pm-item.on { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.preview-mini .pm-item .ic { width: 15px; height: 15px; }

/* upload */
.upload { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 20px; text-align: center; color: var(--text-muted); }
.upload b { color: var(--primary-hover); }

/* swatches */
.swatch-btn { width: 34px; height: 34px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.swatch-btn.on { border-color: var(--text); }

/* empty state */
.empty { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.empty h4 { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.empty p { margin: 0 0 14px; font-size: 13px; }

/* verification pill */
.v-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.v-pill.ok { background: var(--success-soft); color: var(--success-ink); }
.v-pill.bad { background: var(--error-soft); color: var(--error-ink); }
.v-pill.warn { background: var(--warning-soft); color: var(--warning-ink); }

/* helpers */
.hidden { display: none !important; }
.ml-auto { margin-left: auto; }
.text-right { text-align: right; }

.portal-tabs button { border: 0; background: transparent; font: inherit; cursor: pointer; padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13.5px; color: var(--text-muted); }
.portal-tabs button.on { background: var(--primary-soft); color: var(--primary-ink); }
