/* ════════════════════════════════════════════════
   YourToolbox.in — Calculator Style CSS v2.0
   Design: Calculator.net inspired
   ════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --f: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --tx: #1a1a1a;
  --mu: #555;
  --lt: #888;
  --br: #ddd;
  --bg: #f5f5f5;
  --wh: #fff;
  --bl: #2196F3;
  --gn: #4CAF50;
  --rd: #f44336;
  --gn-dark: #388E3C;
  --r: 4px;
}

* { box-sizing: border-box; }

/* ── PAGE LAYOUT ── */
.ytb-page-wrap {
  font-family: var(--f);
  color: var(--tx);
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 20px;
}
@media(max-width:700px){
  .ytb-page-wrap { grid-template-columns: 1fr; }
  .ytb-sidebar { display: none; }
}

/* ── MAIN CONTENT AREA ── */
.ytb-main { min-width: 0; }

/* ── BREADCRUMB ── */
.ytb-bc {
  font-size: 13px;
  color: var(--lt);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--br);
}
.ytb-bc a { color: var(--bl); text-decoration: none; }
.ytb-bc a:hover { text-decoration: underline; }
.ytb-bc span { margin: 0 4px; }

/* ── PAGE TITLE ── */
.ytb-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--tx);
  margin: 0 0 4px;
}
.ytb-page-desc {
  font-size: 14px;
  color: var(--mu);
  margin: 0 0 16px;
}

/* ── CALCULATOR CARD ── */
.ytb-calc-card {
  background: var(--wh);
  border: 1px solid var(--br);
  border-radius: var(--r);
  padding: 0;
  margin-bottom: 20px;
  overflow: hidden;
}
.ytb-calc-header {
  background: #1976D2;
  color: white;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── CURRENCY ROW ── */
.ytb-cur-wrap {
  padding: 10px 16px;
  background: #F8F9FA;
  border-bottom: 1px solid var(--br);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ytb-cur-wrap label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mu);
  white-space: nowrap;
}
.ytb-cur-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.ytb-cur-btn {
  padding: 3px 9px;
  border: 1px solid var(--br);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--mu);
  background: var(--wh);
  cursor: pointer;
  font-family: var(--f);
  transition: all .12s;
}
.ytb-cur-btn:hover { border-color: var(--bl); color: var(--bl); }
.ytb-cur-btn.active { background: var(--bl); border-color: var(--bl); color: #fff; }

/* ── CALC FIELDS ── */
.ytb-calc-body { padding: 16px; }
.ytb-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media(max-width:500px){ .ytb-calc-grid { grid-template-columns: 1fr; } }

.ytb-field-group { display: flex; flex-direction: column; gap: 3px; }
.ytb-field-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tx);
}
.ytb-field-group input,
.ytb-field-group select {
  padding: 8px 10px;
  border: 1px solid #bbb;
  border-radius: var(--r);
  font-size: 14px;
  color: var(--tx);
  background: var(--wh);
  outline: none;
  font-family: var(--f);
  width: 100%;
  transition: border-color .12s;
}
.ytb-field-group input:focus,
.ytb-field-group select:focus { border-color: var(--bl); box-shadow: 0 0 0 2px #2196F320; }
.ytb-field-hint { font-size: 11px; color: var(--lt); }
.ytb-tenure-row { display: flex; gap: 6px; }
.ytb-tenure-row input { flex: 1; }
.ytb-tenure-row select { width: 90px; }
.ytb-sym-label { color: var(--bl); font-weight: 700; }

/* ── CALCULATE BUTTON ── */
.ytb-calc-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gn);
  color: white;
  border: none;
  border-radius: var(--r);
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--f);
  transition: background .14s;
}
.ytb-calc-btn:hover { background: var(--gn-dark); }
.ytb-calc-btn svg { width: 16px; height: 16px; fill: white; }

/* ── RESULTS ── */
.ytb-results {
  display: none;
  border-top: 1px solid var(--br);
  margin-top: 14px;
  padding-top: 14px;
}
.ytb-results-header {
  background: var(--gn);
  color: white;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r) var(--r) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ytb-results-body {
  border: 1px solid var(--gn);
  border-top: none;
  border-radius: 0 0 var(--r) var(--r);
  padding: 14px;
  background: #F9FBF9;
}
.ytb-results-rows { margin-bottom: 14px; }
.ytb-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #e8f5e9;
  font-size: 14px;
}
.ytb-result-row:last-child { border-bottom: none; }
.ytb-result-label { color: var(--mu); }
.ytb-result-value { font-weight: 700; color: var(--tx); }
.ytb-result-value.ytb-hl { color: var(--gn-dark); font-size: 18px; }
.ytb-result-value.ytb-rd { color: var(--rd); }

/* ── PIE CHART ── */
.ytb-chart-area {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.ytb-pie-wrap { position: relative; width: 110px; height: 110px; flex-shrink: 0; }
.ytb-pie-wrap svg { width: 110px; height: 110px; }
.ytb-pie-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  text-align: center;
  font-size: 11px;
  color: var(--mu);
  pointer-events: none;
  line-height: 1.3;
}
.ytb-legend { display: flex; flex-direction: column; gap: 6px; }
.ytb-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.ytb-legend-dot {
  width: 12px; height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── SIDEBAR ── */
.ytb-sidebar {
  font-family: var(--f);
}
.ytb-sidebar-box {
  background: var(--wh);
  border: 1px solid var(--br);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 16px;
}
.ytb-sidebar-title {
  background: #1976D2;
  color: white;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}
.ytb-sidebar-links { padding: 6px 0; }
.ytb-sidebar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--bl);
  text-decoration: none;
  transition: background .1s;
  border-bottom: 1px solid #f0f0f0;
}
.ytb-sidebar-link:last-child { border-bottom: none; }
.ytb-sidebar-link:hover { background: #EFF6FF; }
.ytb-sidebar-link-icon { font-size: 14px; }
.ytb-sidebar-link.active { background: #EFF6FF; font-weight: 600; color: #1565C0; }

/* ── CONTENT BELOW CALCULATOR ── */
.ytb-article {
  font-family: var(--f);
  line-height: 1.7;
  color: var(--tx);
  font-size: 15px;
}
.ytb-article h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--tx);
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e0e0e0;
}
.ytb-article h3 { font-size: 16px; font-weight: 700; margin: 20px 0 8px; }
.ytb-article p  { margin: 0 0 12px; }
.ytb-article ul, .ytb-article ol { padding-left: 22px; margin: 0 0 12px; }
.ytb-article li { margin-bottom: 6px; }

/* ── INFO TABLE ── */
.ytb-tbl-wrap {
  overflow-x: auto;
  margin: 12px 0 20px;
  border: 1px solid var(--br);
  border-radius: var(--r);
}
.ytb-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.ytb-tbl th {
  background: #f0f0f0;
  padding: 9px 12px;
  text-align: left;
  font-weight: 700;
  color: var(--tx);
  font-size: 13px;
  border-bottom: 2px solid var(--br);
}
.ytb-tbl td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--tx);
}
.ytb-tbl tr:last-child td { border-bottom: none; }
.ytb-tbl tr:hover td { background: #fafafa; }

/* ── FORMULA BOX ── */
.ytb-formula {
  background: #F3F4F6;
  border-left: 4px solid var(--bl);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 14px 16px;
  margin: 12px 0 20px;
  font-family: 'Courier New', monospace;
}
.ytb-formula strong {
  display: block;
  font-size: 15px;
  color: #1565C0;
  margin-bottom: 8px;
}
.ytb-formula ul { margin: 0; padding-left: 18px; }
.ytb-formula li { font-size: 13px; color: var(--mu); margin-bottom: 3px; font-family: var(--f); }
.ytb-formula-note { font-size: 13px; color: var(--mu); margin-top: 8px; font-family: var(--f); }

/* ── TIPS ── */
.ytb-tips-list {
  background: #FFFDE7;
  border: 1px solid #FDD835;
  border-radius: var(--r);
  padding: 14px 14px 14px 32px;
  margin: 12px 0 20px;
}
.ytb-tips-list li { font-size: 14px; margin-bottom: 8px; }
.ytb-tips-list li:last-child { margin-bottom: 0; }

/* ── FAQs ── */
.ytb-faq-list { margin: 12px 0 0; }
.ytb-faq-item {
  border: 1px solid var(--br);
  border-radius: var(--r);
  margin-bottom: 8px;
  overflow: hidden;
}
.ytb-faq-q {
  background: #F8F9FA;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--tx);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ytb-faq-q::after { content: '+'; font-size: 18px; color: var(--lt); }
.ytb-faq-a {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--mu);
  line-height: 1.6;
  border-top: 1px solid var(--br);
}

/* ── HIGHLIGHT BOXES ── */
.ytb-highlight-box {
  border-radius: var(--r);
  padding: 12px 14px;
  margin: 12px 0 20px;
  font-size: 14px;
}
.ytb-highlight-box.blue { background: #E3F2FD; border-left: 4px solid var(--bl); }
.ytb-highlight-box.green { background: #E8F5E9; border-left: 4px solid var(--gn); }
.ytb-highlight-box.yellow { background: #FFFDE7; border-left: 4px solid #FFC107; }

/* ── RESPONSIVE ── */
@media(max-width:600px){
  .ytb-calc-grid { grid-template-columns: 1fr; }
  .ytb-chart-area { flex-direction: column; }
  .ytb-page-title { font-size: 18px; }
}
