
/* Mobile-first UI + sticky mobile toolbar + brand colors */
.wtc-ui{
  --primary:#b3212a; --bg:#fff; --muted:#f6f7fb; --line:#eceef3;
  --text:#101828; --sub:#667085; --ghost:#ffffff;
  font-family:'Cairo',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text); background:var(--bg);
  border:1px solid var(--line); border-radius:16px; box-shadow:0 10px 30px rgba(0,0,0,.06);
}
/* Header */
.wtc-header{position:sticky; top:0; z-index:10; display:flex; align-items:center; gap:12px; padding:12px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.9); backdrop-filter: blur(6px);}
.wtc-title{margin:0; font-size:20px; font-weight:900; color:#0f172a; text-align:center; flex:1;}
/* Toolbar (mobile-first) */
.wtc-actions{display:flex; gap:8px}
.wtc-btn{appearance:none;border:0;background:var(--primary);color:#fff;border-radius:10px;padding:10px 12px;font-weight:800;cursor:pointer;transition:transform .05s ease,background-color .2s ease,color .2s ease,box-shadow .2s ease}
.wtc-btn:hover{background:#991b1f;color:#fff;box-shadow:0 6px 16px rgba(179,33,42,.18)}
.wtc-btn:active{transform:translateY(1px)}
.wtc-btn.ghost{background:#fff;color:var(--primary);border:1px solid var(--primary)}
.wtc-btn.ghost:hover{background:var(--primary);color:#fff}
.wtc-btn.accent{background:var(--primary);color:#fff}
.wtc-btn.accent:hover{background:#991b1f;color:#fff}
.wtc-btn.block{width:100%}

/* Layout */
.wtc-wrap{display:grid;grid-template-columns:1fr;gap:12px;padding:12px}
@media(min-width:992px){.wtc-wrap{grid-template-columns:360px 1fr;gap:16px;padding:16px}}

/* Sidebar */
.wtc-sidebar{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px}

/* Tabs */
.wtc-tabs{display:flex;gap:8px;margin-bottom:10px}
.wtc-tab{flex:1;padding:10px 12px;border:1px solid var(--line);background:#fff;border-radius:10px;cursor:pointer;font-weight:800;color:#111;transition:background-color .2s ease, border-color .2s ease, color .2s ease}
.wtc-tab:hover{border-color:var(--primary);background:#fff0f1;color:#8a1a20}
.wtc-tab.is-active{background:var(--muted);border-color:var(--primary);color:#111}
.wtc-panel{display:none}.wtc-panel.is-active{display:block}

/* Fields */
.wtc-field{margin-bottom:12px}
.wtc-field.half{width:100%}
@media(min-width:576px){.wtc-field.half{width:49%;display:inline-block}}
.wtc-field.third{width:100%}
@media(min-width:576px){.wtc-field.third{width:32%;display:inline-block}}
.wtc-field label{display:block;margin-bottom:6px;font-weight:800}
.wtc-field .input-group{position:relative}
.wtc-field .input-group .unit{position:absolute;inset-inline-end:10px;inset-block:0;display:flex;align-items:center;color:var(--sub)}
.wtc-field input[type=number], .wtc-field select, .wtc-btn{min-height:46px;font-size:16px}

/* Segments */
.wtc-seg{display:flex;gap:6px;flex-wrap:wrap}
.wtc-seg.small .wtc-seg-item{padding:6px 10px;font-size:12px}
.wtc-seg input{display:none}
.wtc-seg-item{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 12px;cursor:pointer;font-weight:800;display:flex;align-items:center;gap:8px;color:#111;transition:border-color .2s ease, background-color .2s ease, color .2s ease}
.wtc-seg-item:hover{border-color:var(--primary);background:#fff0f1;color:#8a1a20}
.wtc-seg input:checked + .wtc-seg-item{border-color:var(--primary);background:#ffe6e8;color:#8a1a20}
.badge{width:14px;height:14px;border-radius:999px;display:inline-block;border:2px solid #fff;box-shadow:0 0 0 1px var(--line) inset}

/* Dims */
.wtc-dims .dims{background:var(--muted);border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:10px}

/* Presets */
.wtc-presets{display:flex;gap:8px;flex-wrap:wrap}
.chip{padding:10px 12px;border-radius:999px;border:1px solid var(--line);background:#fff;cursor:pointer;font-weight:800}
.chip:hover{border-color:var(--primary);background:#fff0f1;color:#8a1a20}

/* Extras */
.wtc-extras{display:grid;grid-template-columns:1fr;gap:10px}
@media(min-width:576px){.wtc-extras{grid-template-columns:1fr 1fr}}
.wtc-extras .extra{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px}
.wtc-extras .extra .price{margin-inline-start:auto;color:var(--sub)}

/* Summary */
.wtc-summary{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px}
.summary-list{list-style:none;padding:0;margin:0 0 8px 0}
.summary-list li{display:flex;justify-content:space-between;border-bottom:1px dashed var(--line);padding:6px 0;gap:12px}
.summary-actions{display:grid;gap:8px;margin-top:8px}

/* Stage + SVG */
.wtc-stage{display:flex;flex-direction:column;gap:12px}
.canvas{background:repeating-conic-gradient(#f9fafb 0% 25%, #fff 0% 50%) 50%/20px 20px;border:1px solid var(--line);border-radius:12px;padding:10px;display:flex;align-items:center;justify-content:center;min-height:280px}
@media(min-width:992px){.canvas{min-height:340px}}
#wtc-svg{width:100%;height:auto;display:block;max-height:340px}
@media(max-width:575.98px){#wtc-svg{max-height:300px}}

/* Stats */
.stat-cards{display:grid;grid-template-columns:1fr;gap:10px}
@media(min-width:576px){.stat-cards{grid-template-columns:repeat(3,1fr)}}
.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px}
.card-title{color:var(--sub);font-weight:800;margin-bottom:6px}
.card-value{font-size:26px;font-weight:900}

/* Toast */
.wtc-toast{position:fixed;inset-inline-start:50%;transform:translateX(-50%);bottom:24px;background:#111;color:#fff;padding:10px 14px;border-radius:10px;opacity:0;pointer-events:none;transition:opacity .25s ease}
.wtc-toast.show{opacity:1}

/* Mobile sticky summary actions */
@media(max-width:575.98px){
  .summary-actions{position:sticky;bottom:0;background:#fff;padding-bottom:8px}
}
/* Focus */
.wtc-tab:focus-visible, .wtc-btn:focus-visible, .wtc-seg-item:focus-visible {outline:2px solid var(--primary); outline-offset:2px}
