/* =============================================
   SaudiJabo — ফ্রি টুলের পাতা
   শুধু /tools ও /tools/<slug> এ লোড হয়।

   ⚠️ Tailwind purge করা, অনেক ক্লাস নেই — তাই সবই হাতে লেখা।
   ⚠️ মোবাইলে কিছুই যেন পাশে না গড়ায়: প্রতিটি grid এক কলাম দিয়ে
      শুরু, ছবি max-width:100%, লম্বা ফাইলের নাম ভাঙা।
   ============================================= */

/* ⚠️ box-sizing নিজেরাই ঠিক করে নিই। সাইটের Tailwind এটি দেয়,
   কিন্তু তার উপর নির্ভর না করলে এই পাতাগুলো একা একাই ঠিক থাকে —
   padding যোগ হয়ে প্রস্থ ১০০% ছাড়িয়ে গেলে মোবাইলে পাশে গড়াত। */
.tl, .tl *, .tl *::before, .tl *::after { box-sizing: border-box; }

.tl { padding: 24px 0 52px; }
.tl-wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 16px; }
.tl, .tl * { min-width: 0; }
.tl img { max-width: 100%; height: auto; }

.tl-crumb { font-size: 12.5px; color: #9ca3af; margin-bottom: 14px; }
.tl-crumb a { color: #1B4332; text-decoration: none; }
.tl-crumb span { margin: 0 5px; }

/* ---------- পাতার মাথা ---------- */
.tl-head { text-align: center; margin-bottom: 24px; }
.tl-ico { font-size: 42px; line-height: 1; display: block; margin-bottom: 8px; }
.tl-h1 {
  font-size: clamp(21px, 5vw, 31px); font-weight: 800; color: #111827;
  margin: 0 0 9px; line-height: 1.35; overflow-wrap: break-word;
}
.tl-lead { font-size: 14.5px; color: #4b5563; line-height: 1.85; margin: 0 auto 13px; max-width: 580px; }
.tl-safe {
  display: inline-block; font-size: 12.5px; color: #166534; background: #f0fdf4;
  border: 1px solid #bbf7d0; border-radius: 10px; padding: 9px 14px;
  margin: 0; line-height: 1.75; text-align: left; max-width: 580px;
}

/* ---------- কাজের বাক্স ---------- */
.tl-box {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
  padding: 18px; margin-bottom: 20px;
}
@media (min-width: 640px) { .tl-box { padding: 24px; } }

/* ---------- ফাইল টেনে আনার জায়গা ---------- */
.tl-drop {
  border: 2px dashed #86efac; border-radius: 14px; background: #f0fdf4;
  padding: 30px 18px; text-align: center; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.tl-drop:hover, .tl-drop.is-over { border-color: #1B4332; background: #e7f6ec; }
.tl-drop-ic { font-size: 34px; display: block; margin-bottom: 8px; }
.tl-drop b { display: block; font-size: 15px; color: #1B4332; margin-bottom: 4px; }
.tl-drop span { display: block; font-size: 12.5px; color: #6b7280; line-height: 1.7; }
.tl-drop input[type=file] { display: none; }

/* ---------- ফাইলের তালিকা ---------- */
.tl-files { list-style: none; padding: 0; margin: 16px 0 0; }
.tl-file {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 11px;
  padding: 10px 12px; margin-bottom: 8px;
}
.tl-file-n { flex: 1 1 140px; min-width: 0; }
.tl-file-n strong {
  display: block; font-size: 13.5px; color: #111827; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tl-file-n span { display: block; font-size: 11.5px; color: #9ca3af; margin-top: 2px; }
.tl-file-b { display: flex; gap: 4px; flex: none; }
.tl-mini {
  min-width: 34px; min-height: 34px; display: inline-flex; align-items: center;
  justify-content: center; border: 1px solid #e5e7eb; border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 13px; color: #4b5563;
}
.tl-mini:hover { background: #f3f4f6; }
.tl-mini:disabled { opacity: .35; cursor: default; }
.tl-mini-x { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }

/* ---------- ঘর ---------- */
.tl-f { margin-bottom: 15px; }
.tl-f > label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.tl-hint { font-size: 12px; color: #9ca3af; margin: 5px 0 0; line-height: 1.65; }
.tl-grid2 { display: grid; grid-template-columns: 1fr; gap: 0 15px; }
@media (min-width: 640px) { .tl-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tl-in {
  width: 100%; max-width: 100%; font-size: 14px; padding: 10px 12px;
  border: 1.5px solid #e5e7eb; border-radius: 10px; outline: none; background: #fff;
  color: #111827; min-height: 44px;
}
.tl-in:focus { border-color: #1B4332; }
select.tl-in { cursor: pointer; }

/* প্রিসেট বোতাম */
.tl-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tl-chip {
  font-size: 12.5px; font-weight: 600; color: #374151; background: #fff;
  border: 1.5px solid #e5e7eb; border-radius: 999px; padding: 8px 14px;
  cursor: pointer; min-height: 38px;
}
.tl-chip:hover { border-color: #86efac; background: #f0fdf4; }
.tl-chip.is-on { background: #1B4332; border-color: #1B4332; color: #fff; }

/* স্লাইডার */
.tl-range { width: 100%; accent-color: #1B4332; height: 34px; }
.tl-range-v { font-size: 13.5px; font-weight: 700; color: #1B4332; }

/* ---------- বোতাম ---------- */
.tl-go {
  width: 100%; min-height: 50px; padding: 13px 18px; border: 0; border-radius: 12px;
  background: #1B4332; color: #fff; font-size: 15.5px; font-weight: 700;
  cursor: pointer; margin-top: 4px;
}
.tl-go:hover { background: #163a2a; }
.tl-go:disabled { opacity: .45; cursor: default; }
.tl-go2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 46px; padding: 12px 18px; border-radius: 11px; border: 1.5px solid #1B4332;
  background: #fff; color: #1B4332; font-size: 14px; font-weight: 700;
  cursor: pointer; text-decoration: none;
}
.tl-go2:hover { background: #f0fdf4; color: #1B4332; }

/* ---------- বার্তা ---------- */
.tl-msg { font-size: 13.5px; border-radius: 10px; padding: 11px 13px; margin-top: 14px; line-height: 1.75; }
.tl-msg-e { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.tl-msg-i { background: #f0f9ff; border: 1px solid #bae6fd; color: #075985; }
.tl-msg-w { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* কাজ চলছে */
.tl-busy { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #4b5563; margin-top: 14px; }
.tl-spin {
  width: 18px; height: 18px; border: 2.5px solid #d1fae5; border-top-color: #1B4332;
  border-radius: 50%; animation: tlspin .7s linear infinite; flex: none;
}
@keyframes tlspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tl-spin { animation-duration: 2.4s; } }

/* ---------- ফলাফল ---------- */
.tl-out { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 14px; padding: 18px; margin-top: 18px; }
.tl-out h3 { font-size: 15px; font-weight: 700; color: #166534; margin: 0 0 12px; }
.tl-prev { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.tl-prev figure { margin: 0; text-align: center; }
.tl-prev img {
  width: 104px; height: 104px; object-fit: contain; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 9px; display: block;
}
.tl-prev figcaption { font-size: 11px; color: #6b7280; margin-top: 4px; }
.tl-dl { display: flex; flex-wrap: wrap; gap: 8px; }

/* ছবির আগে-পরে */
.tl-cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tl-cmp figure { margin: 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 11px; padding: 10px; text-align: center; }
.tl-cmp img { max-height: 180px; width: auto; max-width: 100%; margin: 0 auto 7px; display: block; }
.tl-cmp figcaption { font-size: 12px; color: #4b5563; line-height: 1.6; }
.tl-cmp b { color: #1B4332; }

/* ---------- নিচের লেখা ---------- */
.tl-article { font-size: 15px; line-height: 1.95; color: #374151; margin-top: 34px; }
.tl-article h2 { font-size: 19px; font-weight: 700; color: #111827; margin: 24px 0 10px; }
.tl-article h3 { font-size: 16px; font-weight: 700; color: #111827; margin: 18px 0 8px; }
.tl-article p { margin: 0 0 14px; }
.tl-article ul, .tl-article ol { margin: 0 0 14px; padding-left: 22px; }
.tl-article li { margin-bottom: 7px; }
.tl-article a { color: #1B4332; font-weight: 600; }
.tl-article table { width: 100%; display: block; overflow-x: auto; border-collapse: collapse; }
.tl-article th, .tl-article td { border: 1px solid #e5e7eb; padding: 8px 10px; font-size: 13.5px; }

/* ---------- টুলের তালিকা ---------- */
.tl-h2 { font-size: clamp(18px, 3.6vw, 22px); font-weight: 800; color: #111827; margin: 0 0 14px; }
.tl-more { margin-top: 36px; }
.tl-grid { display: grid; grid-template-columns: 1fr; gap: 11px; }
@media (min-width: 620px) { .tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 940px) { .tl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tl-card {
  display: block; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: 16px; text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.tl-card:hover { transform: translateY(-2px); border-color: #86efac; box-shadow: 0 8px 22px rgba(0, 0, 0, .06); }
.tl-card-ico { font-size: 26px; display: block; margin-bottom: 8px; }
.tl-card strong { display: block; font-size: 15px; color: #111827; margin-bottom: 5px; line-height: 1.45; }
.tl-card span { display: block; font-size: 12.5px; color: #6b7280; line-height: 1.7; }
