/* ============ মূল স্টাইলশীট (style.css) ============ */
@import "./toolbar.css";
@import "./canvas.css";
@import "./panels.css";

:root {
  --bg: #0b0e12;
  --bar: #14181e;
  --sh: #191e25;
  --soft: #222831;
  --ln: #2a313b;
  --tx: #eef0f3;
  --mu: #8b94a1;
  --ac: #c8102e;
  --ui: 'Hind Siliguri', 'Noto Serif Bengali', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--bg);
  color: var(--tx);
  font: 14px/1.5 var(--ui);
  padding-top: env(safe-area-inset-top, 0);
}

.ic {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.ic.s {
  width: 16px;
  height: 16px;
}

/* ফর্ম ও সাধারণ কন্ট্রোল */
label {
  display: block;
  font-size: 12.5px;
  color: var(--mu);
  margin: 9px 0 4px;
}

label em {
  font-style: normal;
  opacity: .75;
}

label.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--ln);
  border-radius: 10px;
  background: var(--soft);
  color: var(--tx);
  font-size: 13.5px;
  cursor: pointer;
}

label.btn.p {
  background: var(--ac);
  border-color: var(--ac);
  color: #fff;
  font-weight: 600;
}

label.line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--tx);
  font-size: 13.5px;
}

output {
  float: right;
  color: var(--tx);
  font-weight: 600;
}

input, textarea, select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--ln);
  border-radius: 9px;
  background: var(--soft);
  color: var(--tx);
  font: inherit;
  font-size: 14px;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--ac);
  outline-offset: -1px;
}

textarea {
  resize: none;
  line-height: 1.45;
}

input[type=range] {
  padding: 0;
  height: 24px;
  border: 0;
  background: none;
  accent-color: var(--ac);
}

input[type=color] {
  padding: 2px;
  height: 38px;
}

input.clr {
  width: 54px;
  flex: none;
}

input.clr.w {
  width: 100%;
}

input.hex {
  font-family: monospace;
}

code {
  background: var(--soft);
  padding: 0 5px;
  border-radius: 5px;
  font-size: 11.5px;
  color: var(--tx);
}

.inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wrapb {
  flex-wrap: wrap;
}

.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.g3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fn {
  font-size: 12px;
  color: var(--mu);
}

button {
  font: inherit;
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--ln);
  background: var(--soft);
  color: var(--tx);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

button:disabled {
  opacity: .5;
}

button.p {
  background: var(--ac);
  border-color: var(--ac);
  color: #fff;
  font-weight: 600;
}

button.wide {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  margin-top: 10px;
}

button.sm {
  padding: 5px 10px;
  font-size: 12.5px;
}

.wide2 {
  width: 100%;
  margin-top: 6px;
}

.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chips > button {
  flex: none;
  flex-direction: column;
  gap: 0;
  padding: 6px 11px;
  font-size: 13px;
  line-height: 1.3;
}

.chips > button small {
  font-size: 10.5px;
  color: var(--mu);
}

.chips > button.on {
  background: var(--tx);
  color: var(--bar);
  border-color: var(--tx);
}

.chips > button.on small {
  color: inherit;
  opacity: .7;
}

.chips .dot {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid var(--sh);
}

.chips .dot.on {
  box-shadow: 0 0 0 2px var(--tx);
  background-clip: padding-box;
}

/* সুইচ (Toggle switch) */
.sw {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  margin: 0;
  flex: none;
}

.sw input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.sw i {
  position: absolute;
  inset: 0;
  background: var(--ln);
  border-radius: 20px;
  transition: .2s;
}

.sw i::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}

.sw input:checked + i {
  background: var(--ac);
}

.sw input:checked + i::after {
  transform: translateX(18px);
}

/* টোস্ট মেসেজ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom, 0));
  transform: translate(-50%, 20px);
  max-width: 88vw;
  text-align: center;
  background: #eef0f3;
  color: #111;
  padding: 9px 16px;
  border-radius: 24px;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* মিডিয়া কুয়েরি */
@media (max-width: 430px) {
  .ttl b {
    display: none;
  }
  .dl {
    padding: 0 11px;
  }
}

@media (min-width: 760px) {
  .sheet {
    border-radius: 0;
    padding-left: max(14px, calc((100% - 720px) / 2));
    padding-right: max(14px, calc((100% - 720px) / 2));
  }
}
