/* ==========================================================
   GST CALCULATOR
   Extracted from calculator-tools.css (lines 6383-6601)
   ========================================================== */
/* ----------------------------------------------------------
   GST CALCULATOR — PREMIUM STYLES, FULLY RESPONSIVE
   ---------------------------------------------------------- */

/* ===== MODE SELECTOR ===== */
.ct-gst-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: var(--ct-sp-xl);
}
.ct-gst-mode {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 16px 8px 14px; background: var(--ct-input-bg);
  border: 2px solid var(--ct-input-border); border-radius: var(--ct-r-lg);
  cursor: pointer; transition: all .3s ease; font-family: var(--ct-font);
  user-select: none; text-align: center; position: relative; overflow: hidden;
}
.ct-gst-mode::before { content:''; position:absolute; inset:0;
  background:linear-gradient(135deg,rgba(99,102,241,.07),rgba(16,185,129,.04));
  opacity:0; transition:opacity .3s ease; }
.ct-gst-mode:hover { border-color:var(--ct-primary-light); transform:translateY(-4px);
  box-shadow:0 8px 24px rgba(99,102,241,.14); }
.ct-gst-mode:hover::before { opacity:1; }
.ct-gst-mode-active, .ct-gst-mode-active:hover {
  border-color:var(--ct-primary)!important; background:rgba(99,102,241,.04)!important;
  box-shadow:0 8px 28px var(--ct-primary-glow)!important; transform:translateY(-4px)!important; }
.ct-gst-mode-active::before { opacity:1!important; }
.ct-gst-mode-icon {
  display:flex; align-items:center; justify-content:center;
  width:44px; height:44px; border-radius:12px;
  background:linear-gradient(135deg,rgba(99,102,241,.08),rgba(99,102,241,.04));
  font-size:20px; position:relative; z-index:1; transition:all .3s ease; }
.ct-gst-mode-active .ct-gst-mode-icon {
  background:linear-gradient(135deg,var(--ct-primary),var(--ct-primary-hover));
  box-shadow:0 4px 12px var(--ct-primary-glow); }
.ct-gst-mode-name { font-size:13px; font-weight:800; color:var(--ct-text-secondary);
  position:relative; z-index:1; }
.ct-gst-mode-active .ct-gst-mode-name { color:var(--ct-primary); }
.ct-gst-mode-desc { font-size:10px; font-weight:600; color:var(--ct-text-muted);
  position:relative; z-index:1; }

/* ===== SETTINGS ROW ===== */
.ct-gst-settings { margin-bottom: var(--ct-sp-lg); }

/* ===== PANELS ===== */
.ct-gst-panel { display:none; }
.ct-gst-panel-active { display:block; animation:ctFadeUp .3s var(--ct-ease); }
.ct-gst-panel-head {
  display:flex; align-items:center; gap:14px; padding:12px 16px;
  background:linear-gradient(135deg,rgba(99,102,241,.06),rgba(16,185,129,.03));
  border:1px solid rgba(99,102,241,.12); border-left:4px solid var(--ct-primary);
  border-radius:var(--ct-r-md); margin-bottom:var(--ct-sp-md);
  box-shadow:0 4px 14px rgba(99,102,241,.05); }
.ct-gst-panel-head span:first-child { font-size:28px; flex-shrink:0; }
.ct-gst-panel-head strong { display:block; font-size:15px; color:var(--ct-text); }
.ct-gst-panel-head small { display:block; font-size:12px; color:var(--ct-text-secondary); margin-top:2px; }

/* ===== QUICK RATE PILLS ===== */
.ct-gst-quick-rates { margin-top:var(--ct-sp-md); }
.ct-gst-qr-label { display:block; font-size:11px; font-weight:700; color:var(--ct-text-muted);
  text-transform:uppercase; letter-spacing:1px; margin-bottom:6px; }
.ct-gst-pills { display:flex; flex-wrap:wrap; gap:6px; }
.ct-gst-pill {
  padding:7px 16px; font-size:13px; font-weight:700; font-family:var(--ct-font);
  color:var(--ct-text-secondary); background:var(--ct-input-bg); border:2px solid var(--ct-input-border);
  border-radius:24px; cursor:pointer; transition:all .25s ease; }
.ct-gst-pill:hover { border-color:var(--ct-primary-light); color:var(--ct-primary);
  transform:translateY(-2px); box-shadow:0 4px 10px rgba(99,102,241,.1); }
.ct-gst-pill-active, .ct-gst-pill-active:hover {
  background:linear-gradient(135deg,var(--ct-primary),var(--ct-primary-hover))!important;
  color:#fff!important; border-color:var(--ct-primary)!important;
  box-shadow:0 4px 14px var(--ct-primary-glow)!important; }

/* ===== INVOICE ITEM ROWS ===== */
.ct-gst-items { display:flex; flex-direction:column; gap:10px; }
.ct-gst-item-row {
  display:grid; grid-template-columns:1fr 60px 1fr 80px 36px;
  gap:8px; align-items:end; padding:12px 14px;
  background:var(--ct-input-bg); border:1px solid var(--ct-input-border);
  border-radius:var(--ct-r-md); animation:ctFadeUp .25s var(--ct-ease); }
.ct-gst-item-row .ct-form-group { margin:0; }
.ct-gst-item-row .ct-label { font-size:11px; margin-bottom:4px; }
.ct-gst-item-row .ct-input { font-size:13px; padding:8px 10px; }
.ct-gst-item-del {
  width:36px; height:36px; display:flex; align-items:center; justify-content:center;
  background:rgba(239,68,68,.08); border:1.5px solid rgba(239,68,68,.2);
  border-radius:var(--ct-r-sm); color:var(--ct-danger); font-size:16px;
  cursor:pointer; transition:all .2s ease; font-family:var(--ct-font);
  padding:0; line-height:1; }
.ct-gst-item-del:hover { background:var(--ct-danger); color:#fff; border-color:var(--ct-danger); }

/* ===== ANSWER ===== */
.ct-gst-answer {
  text-align:center; padding:20px var(--ct-sp-md);
  word-break:break-word; overflow-wrap:break-word;
  background:linear-gradient(180deg,rgba(99,102,241,.03),transparent);
  border-radius:var(--ct-r-lg); margin-bottom:var(--ct-sp-md); }
.ct-gst-answer:empty { display:none; }
.ct-gst-answer-label {
  display:inline-block; font-size:11px; font-weight:800; text-transform:uppercase;
  letter-spacing:2px; color:var(--ct-text-muted); margin-bottom:10px;
  padding:4px 16px; background:rgba(0,0,0,.03); border-radius:20px; }
.ct-gst-answer-value {
  display:block; font-size:clamp(20px,4vw,28px); font-weight:900; line-height:1.1;
  background:linear-gradient(135deg,var(--ct-primary),var(--ct-secondary));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text; word-break:break-word; }
.ct-gst-answer-sub {
  display:block; font-size:clamp(13px,2.5vw,16px); font-weight:600;
  color:var(--ct-text-secondary); margin-top:6px; word-break:break-word; }

/* ===== BAR ===== */
.ct-gst-bar-wrap { margin:var(--ct-sp-lg) 0; padding:16px;
  background:var(--ct-input-bg); border:1px solid var(--ct-input-border);
  border-radius:var(--ct-r-md); }
.ct-gst-bar-wrap[hidden] { display:none; }
.ct-gst-bar { display:flex; width:100%; height:26px; border-radius:13px; overflow:hidden;
  box-shadow:inset 0 2px 5px rgba(0,0,0,.08); }
.ct-gst-bar-base { height:100%; background:linear-gradient(135deg,#818cf8,#6366f1,#4f46e5);
  transition:flex-basis 1s cubic-bezier(.4,0,.2,1); flex-basis:0%;
  display:flex; align-items:center; justify-content:center;
  font-size:clamp(9px,1.8vw,11px); font-weight:800; color:#fff; overflow:hidden; min-width:0; }
.ct-gst-bar-tax { height:100%; background:linear-gradient(135deg,#34d399,#10b981,#059669);
  transition:flex-basis 1s cubic-bezier(.4,0,.2,1); flex-basis:0%;
  display:flex; align-items:center; justify-content:center;
  font-size:clamp(9px,1.8vw,11px); font-weight:800; color:#fff; overflow:hidden; min-width:0; }
.ct-gst-bar-legend { display:flex; justify-content:center; gap:20px; margin-top:10px; flex-wrap:wrap; }
.ct-gst-bar-legend > span { display:inline-flex; align-items:center; gap:6px;
  font-size:clamp(10px,2vw,13px); font-weight:700; color:var(--ct-text-secondary); }
.ct-gst-dot { width:12px; height:12px; border-radius:3px; flex-shrink:0; }
.ct-gst-dot-base { background:linear-gradient(135deg,#818cf8,#4f46e5); }
.ct-gst-dot-tax { background:linear-gradient(135deg,#34d399,#059669); }

/* ===== SPLIT CARDS ===== */
.ct-gst-split-box { margin:var(--ct-sp-lg) 0; padding:var(--ct-sp-lg);
  background:var(--ct-input-bg); border:1px solid var(--ct-input-border);
  border-radius:var(--ct-r-md); }
.ct-gst-split-box[hidden] { display:none; }
.ct-gst-split-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:10px; margin-top:var(--ct-sp-md); }
.ct-gst-split-card { padding:16px 14px; background:var(--ct-card-bg); border:2px solid var(--ct-input-border);
  border-radius:var(--ct-r-md); text-align:center; transition:transform .2s ease;
  word-break:break-word; }
.ct-gst-split-card:hover { transform:translateY(-3px); box-shadow:0 6px 18px rgba(0,0,0,.06); }
.ct-gst-split-tag { display:inline-block; font-size:10px; font-weight:800; text-transform:uppercase;
  letter-spacing:1px; color:#fff; padding:3px 12px; border-radius:12px;
  margin-bottom:6px; }
.ct-gst-split-tag-cgst { background:linear-gradient(135deg,var(--ct-primary),var(--ct-primary-hover)); }
.ct-gst-split-tag-sgst { background:linear-gradient(135deg,var(--ct-secondary),#be185d); }
.ct-gst-split-tag-igst { background:linear-gradient(135deg,#f59e0b,#d97706); }
.ct-gst-split-tag-total { background:linear-gradient(135deg,#10b981,#059669); }
.ct-gst-split-val { display:block; font-size:clamp(16px,3.5vw,22px); font-weight:800;
  color:var(--ct-text); margin-top:4px; word-break:break-word; }
.ct-gst-split-label { display:block; font-size:11px; font-weight:700; color:var(--ct-text-muted); margin-top:2px; }

/* Active rate row */
.ct-gst-rate-active { background:rgba(99,102,241,.06)!important; }
.ct-gst-rate-active td { color:var(--ct-primary)!important; font-weight:700!important; }

/* ===== RESPONSIVE OVERRIDES ===== */
.ct-tool-section[data-tool="gst"] .ct-result-value {
  font-size:clamp(14px,2.8vw,20px); word-break:break-word; overflow-wrap:break-word;
  line-height:1.2; max-width:100%; padding:0 2px; }
.ct-tool-section[data-tool="gst"] .ct-result-card {
  min-width:0; overflow:hidden; padding:var(--ct-sp-md) var(--ct-sp-sm); word-break:break-word; }
.ct-tool-section[data-tool="gst"] .ct-result-summary {
  word-break:break-word; font-size:clamp(12px,2.5vw,15px); line-height:1.7; }
.ct-tool-section[data-tool="gst"] .ct-detail-val {
  word-break:break-word; overflow-wrap:break-word; }

/* 768px */
@media (max-width:768px) {
  .ct-gst-modes { gap:8px; }
  .ct-gst-mode { padding:12px 6px 10px; }
  .ct-gst-mode-icon { width:38px; height:38px; font-size:17px; }
  .ct-gst-mode-name { font-size:11px; }
  .ct-gst-mode-desc { font-size:9px; }
  .ct-gst-item-row { grid-template-columns:1fr 1fr; gap:6px; }
  .ct-gst-item-del { grid-column:span 2; justify-self:end; }
  .ct-gst-split-cards { grid-template-columns:repeat(2,1fr); }
  .ct-gst-pill { padding:6px 12px; font-size:12px; }
  .ct-tool-section[data-tool="gst"] .ct-result-grid {
    grid-template-columns:1fr!important; gap:var(--ct-sp-sm); }
  .ct-tool-section[data-tool="gst"] .ct-detail-item {
    flex-direction:column; align-items:flex-start; gap:2px; }
  .ct-tool-section[data-tool="gst"] .ct-detail-val {
    text-align:left; padding-left:28px; }
  .ct-gst-panel-head { padding:12px 14px; gap:10px; }
  .ct-gst-panel-head span:first-child { font-size:22px; }
  .ct-gst-bar { height:22px; }
}

/* 480px */
@media (max-width:480px) {
  .ct-gst-modes { grid-template-columns:1fr; gap:6px; }
  .ct-gst-mode { flex-direction:row; padding:12px 14px; gap:12px; text-align:left; }
  .ct-gst-mode-icon { width:34px; height:34px; font-size:15px; }
  .ct-gst-mode-name { font-size:12px; }
  .ct-gst-item-row { grid-template-columns:1fr; }
  .ct-gst-item-del { grid-column:auto; justify-self:end; }
  .ct-gst-split-cards { grid-template-columns:1fr; }
  .ct-gst-pill { padding:5px 10px; font-size:11px; }
  .ct-gst-panel-head span:first-child { font-size:20px; }
  .ct-gst-panel-head strong { font-size:13px; }
  .ct-gst-bar { height:18px; }
  .ct-gst-bar-legend { gap:10px; }
  .ct-gst-split-card { padding:12px 10px; }
}

/* 360px */
@media (max-width:360px) {
  .ct-gst-pill { padding:4px 8px; font-size:10px; }
  .ct-gst-bar { height:16px; }
  .ct-gst-bar-legend { flex-direction:column; align-items:flex-start; gap:4px; }
}



