/* Shared form controls and custom widgets (no native checkbox, select or file inputs). */
/* ---------- fields ---------- */
.f { display: grid; gap: 6px; font-weight: 700; font-size: .95rem; margin-bottom: 14px; }
.f small { font-weight: 400; color: var(--muted); }
.in, select.in, textarea.in { width: 100%; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; font: inherit; color: var(--ink); }
.in:focus { outline: 3px solid rgba(44, 110, 123, .35); border-color: var(--teal); }
textarea.in { min-height: 110px; resize: vertical; }

/* ---------- inputs ---------- */
.in, select.in, textarea.in { background: #fff; transition: box-shadow .15s ease, transform .15s ease; font-size: 1rem; }
.in::placeholder { color: #a39491; }
.in:focus { outline: none; border-color: var(--ink); box-shadow: 4px 4px 0 var(--orange); transform: translate(-1px, -1px); }

/* ---------- custom checkbox ---------- */
.ck { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 2px; cursor: pointer; font: 700 1rem var(--font-body); color: var(--ink); text-align: left; }
.ck-box { width: 26px; height: 26px; flex: none; display: grid; place-items: center; background: #fff; border: 2px solid var(--ink); border-radius: 6px; color: transparent; transition: background .12s ease, box-shadow .12s ease, color .12s ease; box-shadow: 2px 2px 0 var(--ink); }
.ck[aria-checked="true"] .ck-box { background: var(--orange); color: var(--ink); }
.ck:hover .ck-box { box-shadow: 3px 3px 0 var(--ink); }
.ck:active .ck-box { box-shadow: 0 0 0 var(--ink); transform: translate(2px, 2px); }

/* ---------- custom select / combobox ---------- */
.sel { position: relative; display: inline-block; min-width: 170px; }
.sel-block { display: block; width: 100%; }
.sel-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 9px 12px 9px 14px; font: 600 1rem var(--font-body); color: var(--ink); cursor: pointer; text-align: left; box-shadow: 3px 3px 0 var(--ink); transition: box-shadow .12s ease, transform .12s ease; }
.sel-trigger:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.sel-trigger[aria-expanded="true"] { box-shadow: 3px 3px 0 var(--orange); }
.sel-trigger svg { flex: none; transition: transform .15s ease; }
.sel-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.sel-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #fff; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 5px 5px 0 var(--ink); max-height: 260px; overflow-y: auto; min-width: max-content; }
.sel.up .sel-list { top: auto; bottom: calc(100% + 6px); }
.sel-list[hidden] { display: none; }
.sel-opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.sel-opt.active, .sel-opt:hover { background: var(--pink-soft); }
.sel-opt[aria-selected="true"] { background: var(--egg); }
.sel-opt[aria-selected="true"].active { background: var(--pink); }
.sel-opt svg { color: var(--orange-dark); }

/* ---------- stepper ---------- */
.step { display: inline-flex; align-items: stretch; border: 2px solid var(--ink); border-radius: 8px; background: #fff; overflow: hidden; width: 100%; box-shadow: 3px 3px 0 var(--ink); }
.step:focus-within { box-shadow: 3px 3px 0 var(--orange); }
.step-btn { width: 44px; background: var(--pink-soft); border: 0; font: 700 1.3rem var(--font-body); color: var(--ink); cursor: pointer; }
.step-btn:first-child { border-right: 2px solid var(--ink); }
.step-btn:last-child { border-left: 2px solid var(--ink); }
.step-btn:hover { background: var(--pink); }
.step-input { flex: 1; min-width: 0; text-align: center; border: 0; background: transparent; font: 700 1.05rem var(--font-body); color: var(--ink); padding: 9px 4px; }
.step-input:focus { outline: none; }

/* ---------- file drop zone ---------- */
.dz { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; border: 2px dashed var(--ink); border-radius: 10px; background: var(--pink-soft); color: var(--muted); font-weight: 600; transition: background .15s ease; }
.dz.over { background: var(--egg); border-style: solid; }

/* ---------- radio cards ---------- */
.rg { display: grid; gap: 12px; }
.rg-opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; text-align: left; width: 100%; background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 14px 16px; cursor: pointer; font: inherit; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: box-shadow .12s ease, transform .12s ease, background .12s ease; }
.rg-opt:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.rg-opt[aria-checked="true"] { background: var(--pink-soft); box-shadow: 3px 3px 0 var(--orange); }
.rg-dot { width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; display: grid; place-items: center; }
.rg-opt[aria-checked="true"] .rg-dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); border: 2px solid var(--ink); box-sizing: content-box; margin: -2px; }
.rg-text { display: grid; line-height: 1.25; }
.rg-text small { color: var(--muted); font-size: .9rem; }
.rg-price { font-family: var(--font-label); font-weight: 700; font-size: 1.25rem; letter-spacing: .04em; }
.f-err { color: #9b2a10; font-weight: 700; font-size: .9rem; min-height: 0; }
.f-err:empty { display: none; }
.in[aria-invalid="true"] { border-color: #9b2a10; box-shadow: 3px 3px 0 #9b2a10; }

/* ---------- shared bits used by the storefront account pages and the dashboard ---------- */
.sub { color: var(--muted); font-size: .88rem; font-weight: 500; }
.tag { display: inline-block; font-family: var(--font-label); text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; font-weight: 700; padding: 1px 8px; border-radius: 4px; background: var(--pink-soft); border: 1.5px solid var(--ink); }
.tag.ok { background: #d9f0de; color: #17502a; }
.tag.warn { background: #ffe9c7; color: #7a4a00; }
.tag.off { background: #e9e4de; color: #5b524d; }
.tag.bad { background: #fde1da; color: #8a2b12; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { background: #fff; border: 0; padding: 6px 16px; font: 700 1.05rem var(--font-label); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; color: var(--ink); }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.btn-danger { background: #b3321a; color: #fff; }
.btn-danger:hover { background: #9c2a15; }
.hint { font-weight: 500; color: var(--muted); }

/* ---------- dialogs (confirm modal, pickers, order and product editors) ---------- */
dialog { border: 2px solid var(--ink); border-radius: 12px; padding: 0; width: min(720px, calc(100% - 24px)); max-height: calc(100vh - 32px); background: var(--cream); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(43, 32, 32, .55); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; background: var(--pink); position: sticky; top: 0; z-index: 2; }
.dlg-head h2 { margin: 0; color: var(--orange); font-size: 1.6rem; }
.dlg-body { padding: 22px 24px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 22px; position: sticky; bottom: 0; background: var(--cream); }

/* ---------- confirm dialog ---------- */
.confirm-dlg { width: min(440px, calc(100% - 24px)); }
.confirm-dlg .dlg-body h2 { font-size: 1.7rem; color: var(--ink); margin-bottom: .3em; }
.confirm-dlg .dlg-body p { margin: 0; color: var(--ink); }
.confirm-dlg .dlg-foot { position: static; }
.picker-dlg { width: min(760px, calc(100% - 24px)); }
.picker-dlg .dlg-head h2 { font-size: 1.6rem; }

.sel-placeholder { color: #a39491; font-weight: 500; }
