/* ============================================================
   Bangla Tech Tools — নতুন ৫ টুলের শেয়ার্ড কম্পোনেন্ট
   (bangla-typing | signature-maker | youtube-thumbnail-maker |
    passport-photo-maker | income-tax-calculator)
   ============================================================ */

/* ---------- স্টেটাস মেসেজ ---------- */
.tool-msg { min-height: 1.4rem; font-size: .92rem; font-weight: 600; margin-top: .6rem; }
.tool-msg.ok { color: #15803d; }
.tool-msg.err { color: #b91c1c; }

/* ---------- টুল বন্ধ / প্রিমিয়াম গেট ---------- */
.tool-gate {
  text-align: center;
  padding: 2.2rem 1.4rem;
  border: 1.5px dashed rgba(30, 86, 214, .35);
  border-radius: 18px;
  background: linear-gradient(135deg, #f4f8ff, #eef4ff);
}
.tool-gate .tg-ic { font-size: 2.2rem; margin-bottom: .5rem; }
.tool-gate h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: .45rem; color: var(--primary-800); }
.tool-gate p { color: var(--muted); font-size: .95rem; max-width: 480px; margin: 0 auto 1.1rem; }
.tool-gate .tg-actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }

/* ---------- বাটন রো / কন্ট্রোল রো ---------- */
.nt-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.nt-row .spacer { flex: 1; }
.nt-chip {
  font-family: var(--font); font-size: .85rem; font-weight: 600;
  padding: .34rem .8rem; border-radius: 999px;
  border: 1.5px solid var(--border); background: #fff; color: var(--text);
  cursor: pointer; transition: all .18s ease;
}
.nt-chip:hover { border-color: var(--primary); color: var(--primary); }
.nt-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Preview মোডাল ---------- */
.nt-preview-back {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10, 22, 50, .55);
  display: grid; place-items: center; padding: 1rem;
}
.nt-preview-card {
  background: #fff; border-radius: 18px; max-width: 560px; width: 100%;
  max-height: 86vh; overflow: auto; padding: 1.3rem;
  box-shadow: 0 24px 60px rgba(4, 12, 34, .35);
}
.nt-preview-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: .7rem; color: var(--primary-800); }
.nt-preview-body { border: 1.5px solid var(--border); border-radius: 12px; padding: .9rem; margin-bottom: 1rem; background: #fafcff; }
.nt-preview-body img, .nt-preview-body canvas { max-width: 100%; height: auto; display: block; margin: 0 auto; border-radius: 8px; }
.nt-preview-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- টুল নির্দেশিকা / FAQ ---------- */
.nt-steps { margin: .6rem 0 0; padding-left: 1.2rem; }
.nt-steps li { margin-bottom: .45rem; line-height: 1.7; }
.nt-faq { border: 1.5px solid var(--border); border-radius: 14px; overflow: hidden; }
.nt-faq details { border-bottom: 1.5px solid var(--border); }
.nt-faq details:last-child { border-bottom: none; }
.nt-faq summary {
  cursor: pointer; font-weight: 700; font-size: .95rem;
  padding: .85rem 1rem; background: #f8faff; list-style: none;
  display: flex; align-items: center; gap: .5rem;
}
.nt-faq summary::before { content: "▸"; color: var(--primary); transition: transform .2s ease; }
.nt-faq details[open] summary::before { transform: rotate(90deg); }
.nt-faq .nt-faq-a { padding: .85rem 1rem 1rem; color: var(--muted); font-size: .92rem; line-height: 1.75; background: #fff; }

/* ---------- বাংলা টাইপিং ---------- */
.bt-editor { min-height: 260px; }
.bt-sugbar { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; min-height: 2.3rem; margin-bottom: .55rem; }
.bt-sugbar .bt-sug-label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.bt-sug {
  font-family: var(--font); font-size: 1rem; font-weight: 700;
  padding: .3rem .85rem; border-radius: 10px; cursor: pointer;
  border: 1.5px solid #cfe0ff; background: #fff; color: var(--text);
  transition: all .15s ease;
}
.bt-sug:hover { border-color: var(--primary); color: var(--primary); background: var(--blue-soft); }
.bt-sug.primary { background: var(--blue-soft); border-color: var(--primary); color: var(--primary-800); }
.bt-counts { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .88rem; font-weight: 700; color: var(--primary-800); }
.bt-counts small { color: var(--muted); font-weight: 600; }
textarea.bt-area {
  width: 100%; min-height: 260px; resize: vertical;
  font-family: var(--font); font-size: 1.15rem; line-height: 1.9;
  border: 1.5px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem;
  background: #fff; color: var(--text);
}
textarea.bt-area:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }

/* ---------- সিগনেচার ---------- */
.sig-wrap { position: relative; }
canvas.sig-canvas {
  width: 100%; height: 260px; touch-action: none;
  border: 1.5px solid var(--border); border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(30,86,214,.06) .5px, transparent .5px) 0 0/32px 32px,
    linear-gradient(rgba(30,86,214,.06) .5px, transparent .5px) 0 0/32px 32px,
    repeating-linear-gradient(to bottom, transparent 0 58px, rgba(30,86,214,.16) 58px 59px),
    #fff;
  cursor: crosshair;
}
.sig-preview { display: flex; gap: 1rem; flex-wrap: wrap; }
.sig-preview .sp-box {
  flex: 1; min-width: 200px; border-radius: 12px; border: 1.5px solid var(--border);
  padding: .6rem; text-align: center;
}
.sig-preview .sp-box img { max-width: 100%; max-height: 90px; }
.sig-preview .sp-box small { display: block; margin-top: .3rem; color: var(--muted); }
.sig-preview .sp-checker {
  background: repeating-conic-gradient(#e8eefc 0 25%, #fff 0 50%) 0 0/16px 16px;
}

/* ---------- থাম্বনেইল এডিটর ---------- */
.th-wrap-canvas { position: relative; }
canvas.yt-canvas { width: 100%; height: auto; display: block; border-radius: 12px; border: 1.5px solid var(--border); background: #0f172a; touch-action: none; cursor: default; }
.yt-layers { max-height: 200px; overflow-y: auto; display: grid; gap: .4rem; }
.yt-layer-item {
  display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem;
  border: 1.5px solid var(--border); border-radius: 10px; background: #fff;
  cursor: pointer; font-size: .88rem; font-weight: 600;
}
.yt-layer-item.sel { border-color: var(--primary); background: var(--blue-soft); }
.yt-layer-item .yl-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (max-width: 640px) { .yt-grid { grid-template-columns: 1fr; } }
.yt-toolbar { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .6rem; }

/* ---------- পাসপোর্ট ফটো ---------- */
.pp-stage {
  position: relative; width: 100%; max-width: 460px; margin: 0 auto;
  aspect-ratio: 3 / 3.6; border-radius: 14px; overflow: hidden;
  border: 1.5px solid var(--border); background:
    repeating-conic-gradient(#eef2fb 0 25%, #fff 0 50%) 0 0/18px 18px;
  touch-action: none; cursor: grab;
}
.pp-stage.dragging { cursor: grabbing; }
.pp-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pp-guide { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.pp-guide svg { width: 100%; height: 100%; }
.pp-sizes { display: flex; flex-wrap: wrap; gap: .45rem; }
.pp-colors { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pp-color-dot { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 0 0 1.5px var(--border); cursor: pointer; }
.pp-color-dot.on { box-shadow: 0 0 0 2.5px var(--primary); }
.pp-prints { overflow-x: auto; }
.pp-prints canvas { border: 1px solid var(--border); border-radius: 8px; margin: .4rem; background: #fff; }

/* ---------- আয়কর ---------- */
.tax-result table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tax-result th, .tax-result td { padding: .5rem .7rem; border-bottom: 1px solid var(--border); text-align: right; }
.tax-result th:first-child, .tax-result td:first-child { text-align: left; }
.tax-result .tr-total td { font-weight: 800; font-size: 1rem; color: var(--primary-800); background: var(--blue-soft); }
.tax-big {
  font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800;
  color: var(--primary-800);
}
.tax-note { font-size: .84rem; color: var(--muted); line-height: 1.7; }

/* ---------- মোবাইল ---------- */
@media (max-width: 640px) {
  .tool-gate .tg-actions .btn { width: 100%; justify-content: center; }
  .sig-preview .sp-box { min-width: 140px; }
}

/* ---------- YouTube থাম্বনেইল: ড্র্যাগ-অ্যান্ড-ড্রপ জোন ---------- */
.yt-dropzone { position: relative; }
.yt-dropzone.dropping::after {
  content: '';
  position: absolute; inset: 0; z-index: 5;
  border: 3px dashed var(--brand, #1e56d6);
  border-radius: 14px;
  background: rgba(30, 86, 214, 0.08);
  pointer-events: none;
}
.yt-drop-hint {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.15rem; color: #fff;
  background: rgba(18, 39, 92, 0.45);
  border-radius: 14px;
  pointer-events: none;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
