/* Extracted from education/calculators.html, 12 September 2026. */

/* Calculator Specific Styles */
.calc-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.calc-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  min-width: 70px;
}

.calc-tagline {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
  font-style: italic;
  margin: 0.5rem 0 0 0;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .calc-header {
    flex-direction: column;
    gap: 1rem;
  }

  .calc-number {
    font-size: 2rem;
    min-width: auto;
  }

  .tabs-nav button {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
    min-height: 44px; /* Touch target size */
  }

  .calc-input {
    font-size: 16px; /* Prevents iOS zoom */
    padding: 0.875rem 1rem;
  }

  .result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .result-item .result-label {
    font-size: 0.85rem;
  }

  .result-item .result-value {
    font-size: 1.4rem;
  }

  .result-item.large .result-value {
    font-size: 1.6rem;
  }

  .btn {
    min-height: 44px; /* Touch target size */
    padding: 0.875rem 1.5rem;
  }

  .comparison-box {
    padding: 1rem;
  }

  .mistake-card,
  .tip-card {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .calc-tagline {
    font-size: 0.95rem;
  }

  .tabs-nav {
    flex-wrap: wrap;
  }

  .tabs-nav button {
    flex: 1 1 45%;
    font-size: 0.8rem;
  }
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.calc-results {
  display: flex;
  flex-direction: column;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.calc-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s ease;
}

.calc-input:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(91, 138, 255, 0.3);
}

/* Accessibility: Better focus states for keyboard navigation */
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(91, 138, 255, 0.2);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.input-hint {
  font-size: 0.8rem;
  color: var(--muted-2);
  margin-top: 0.25rem;
}

html[data-theme="light"] .calc-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text);
}

html[data-theme="light"] .calc-input:focus {
  background: rgba(0, 0, 0, 0.05);
}

.result-box {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(91, 138, 255, 0.1), rgba(118, 221, 255, 0.05));
  border: 1px solid rgba(91, 138, 255, 0.3);
  border-radius: 10px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.result-item:last-child {
  border-bottom: none;
}

.result-item.large {
  padding: 1rem 0;
}

.result-item.large .result-value {
  font-size: 1.8rem;
}

.result-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.result-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.info-card {
  padding: 0.75rem 1rem;
  background: rgba(118, 221, 255, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 0.85rem;
  margin-top: 1rem !important;
}

.info-card h5 {
  margin: 0 0 0.35rem 0;
  font-size: 0.9rem;
  color: var(--accent);
}

.info-card p {
  line-height: 1.5;
  margin: 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.comparison-table th,
.comparison-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
  font-weight: 600;
  color: var(--brand);
  background: rgba(91, 138, 255, 0.1);
}

.comparison-table .good {
  color: #3ed598;
  font-weight: 600;
}

.comparison-table .warn {
  color: #f9a23c;
  font-weight: 600;
}

.comparison-table .bad {
  color: #ff6b6b;
  font-weight: 600;
}

.comparison-box {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.comparison-box.good {
  border-color: rgba(62, 213, 152, 0.3);
  background: rgba(62, 213, 152, 0.05);
}

.comparison-box.bad {
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.05);
}

.comparison-box h5 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}

.comparison-box ul {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.8;
}

.mistake-card {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.mistake-header {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.mistake-header.bad {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.mistake-card h4 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.mistake-fix {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(62, 213, 152, 0.1);
  border-left: 3px solid #3ed598;
  border-radius: 6px;
  font-size: 0.95rem;
}

.tip-card {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(118, 221, 255, 0.05), rgba(91, 138, 255, 0.05));
  border: 1px solid rgba(118, 221, 255, 0.2);
  border-radius: 12px;
}

.tip-icon {
  font-size: 2rem;
  line-height: 1;
}

.tip-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--accent);
}

.tip-card p, .tip-card ul {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.verdict {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
}

/* Accessibility: Thicker borders and higher contrast for colorblind users */
.verdict.good {
  background: rgba(62, 213, 152, 0.15);
  color: #3ed598;
  border: 2px solid rgba(62, 213, 152, 0.6);
  box-shadow: 0 2px 4px rgba(62, 213, 152, 0.2);
}

.verdict.warn {
  background: rgba(249, 162, 60, 0.15);
  color: #f9a23c;
  border: 2px solid rgba(249, 162, 60, 0.6);
  box-shadow: 0 2px 4px rgba(249, 162, 60, 0.2);
}

.verdict.bad {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
  border: 2px solid rgba(255, 107, 107, 0.6);
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.2);
}

.lesson-card-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
  display: block;
}

.lesson-card-link:hover {
  transform: translateY(-2px);
}

.styled-list {
  padding-left: 1.5rem;
  line-height: 1.8;
}

.styled-list li {
  margin-bottom: 0.5rem;
}

.styled-list strong {
  color: var(--brand);
}
