/**
 * GoToolstack — Tool Specific Styles & Interactive Widgets
 * SaaS Polish, Modern Lucide SVG Icon Rendering & Responsive Elements.
 */

/* Vector SVG Icon Rendering */
.tool-svg-icon {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  stroke-width: 2;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.ticon .tool-svg-icon {
  width: 24px;
  height: 24px;
  stroke: var(--cat-color, var(--brand));
}

.tool-card .icon .tool-svg-icon {
  width: 22px;
  height: 22px;
  stroke: var(--card-color, var(--brand));
}

.navitem .ico .tool-svg-icon {
  width: 17px;
  height: 17px;
}

/* Drag & Drop File Zone (Stripe Surface Polish) */
.drop {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  background: var(--panel-2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 600;
  font-size: 0.94rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.drop:hover, .drop.drag {
  border-color: var(--cat-color, var(--brand));
  background: var(--cat-dim, var(--brand-dim));
  color: var(--cat-color, var(--brand));
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.drop svg {
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.drop:hover svg {
  transform: scale(1.1);
  color: var(--cat-color, var(--brand));
}

/* File list inside PDF / File uploaders */
.filelist {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filelist > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
}

/* Markdown Preview Box */
.md-preview {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  min-height: 280px;
  font-size: 0.94rem;
  line-height: 1.7;
  overflow-y: auto;
}

.md-preview mark {
  background: #FEF08A;
  color: #000000;
  padding: 2px 6px;
  border-radius: 4px;
}

[data-theme="dark"] .md-preview mark {
  background: #CA8A04;
  color: #FFFFFF;
}

.md-preview pre {
  background: var(--panel);
  padding: 14px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  border: 1px solid var(--line);
}

.md-preview code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
}

/* Tables (Amortization, Schedules) */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  max-height: 480px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

table.amort {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

table.amort th {
  text-align: right;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1.5px solid var(--line);
  background: var(--panel-2);
  position: sticky;
  top: 0;
  font-weight: 600;
}

table.amort td {
  text-align: right;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

table.amort tr:hover td {
  background: var(--panel-2);
}

/* World Clock */
.clock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.clock-row:hover {
  background: var(--panel-2);
}

.clock-row:last-child {
  border-bottom: none;
}

.clock-row .place {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 4px;
}

.clock-row .tz {
  font-size: 0.76rem;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.clock-row .time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--cat-color, var(--brand));
  text-shadow: 0 4px 12px color-mix(in srgb, var(--cat-color, var(--brand)) 30%, transparent);
}

/* Color Picker Swatches */
.swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Password Generator */
.pw-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 18px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  word-break: break-all;
  letter-spacing: 2px;
  color: var(--brand);
}

.strength-bar {
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  margin-top: 12px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}

/* Pomodoro Face */
.pomodoro-face {
  text-align: center;
  padding: 28px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.pomo-mode {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--brand);
  text-transform: uppercase;
}

.pomo-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 4.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
}

/* Range Inputs */
input[type=range].range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: var(--line);
  outline: none;
  padding: 0;
  border: none;
}

input[type=range].range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cat-color, var(--brand));
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.1s ease;
}

input[type=range].range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Knowledge Hub & Conceptual Guides */
.knowledge-hub {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 40px;
  margin-top: 36px;
  box-shadow: var(--shadow-sm);
  line-height: 1.75;
}

.hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cat-color, var(--brand));
  background: var(--cat-dim, var(--brand-dim));
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.knowledge-hub h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.knowledge-hub h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.knowledge-hub p {
  color: var(--text-secondary, var(--text));
  font-size: 0.95rem;
  margin: 0 0 14px;
  line-height: 1.7;
}

.knowledge-hub p strong, .knowledge-hub p b {
  color: var(--text);
  font-weight: 700;
}

.hub-formula-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cat-color, var(--brand));
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 14px 0 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cat-color, var(--brand));
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
}

[dir="rtl"] .hub-formula-card {
  border-left: 1px solid var(--line);
  border-right: 4px solid var(--cat-color, var(--brand));
}

.hub-formula-desc {
  font-size: 0.88rem !important;
  color: var(--muted) !important;
  margin-bottom: 20px !important;
}

.hub-practice-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-practice-list li {
  position: relative;
  padding-left: 28px;
  font-size: 0.93rem;
  color: var(--text-secondary, var(--text));
  line-height: 1.65;
}

[dir="rtl"] .hub-practice-list li {
  padding-left: 0;
  padding-right: 28px;
}

.hub-practice-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ok);
  font-weight: 800;
  font-size: 1.05rem;
}

[dir="rtl"] .hub-practice-list li::before {
  left: auto;
  right: 0;
}

/* Accordion FAQ */
.hub-faq-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.hub-faq-item {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hub-faq-item[open] {
  border-color: var(--cat-color, var(--brand));
  box-shadow: var(--shadow-xs);
}

.hub-faq-question {
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none;
}

.hub-faq-question::-webkit-details-marker {
  display: none;
}

.hub-faq-question svg {
  transition: transform 0.2s ease;
  color: var(--muted-2);
  flex-shrink: 0;
}

.hub-faq-item[open] .hub-faq-question svg {
  transform: rotate(180deg);
  color: var(--cat-color, var(--brand));
}

.hub-faq-answer {
  padding: 0 20px 18px;
  font-size: 0.91rem;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .knowledge-hub {
    padding: 24px 20px;
  }
  .knowledge-hub h2 {
    font-size: 1.35rem;
  }
  .hub-formula-card {
    font-size: 0.85rem;
    padding: 12px 14px;
  }
}

/* =========================================================================
   NEW GENERATION NICHE TOOLS STYLES
========================================================================= */
.sub-cue-row input:focus {
  border-color: var(--brand);
  outline: none;
}

#glass_preview_card {
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

#grid_canvas {
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

