/* -------------------------------------------------------------
 * High School Science & Lab Unit Converter Styles
 * ------------------------------------------------------------- */

.sc-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.sc-tab-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
  padding: 8px 16px !important;
  border-radius: 9999px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.sc-tab-btn:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  transform: translateY(-1px);
}

.sc-tab-btn.active {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25) !important;
}

.sc-tab-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* Workspace */
.sc-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Converter Grid */
.sc-converter-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.75rem;
}

.sc-unit-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-input-val {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  padding: 12px 14px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 10px !important;
}

.sc-input-val:focus {
  border-color: #10b981 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.sc-result-display {
  display: flex;
  align-items: center;
  height: 52px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  background: #ffffff;
  border: 2px solid #10b981;
  border-radius: 10px;
  padding: 0 14px;
  overflow-x: auto;
  white-space: nowrap;
}

.sc-select-unit {
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  background-color: #ffffff !important;
}

/* Swap Button */
.sc-swap-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1.5rem;
}

button.sc-swap-btn,
.sc-swap-btn {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: #f0fdf4 !important;
  border: 1.5px solid #10b981 !important;
  color: #047857 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

button.sc-swap-btn svg,
.sc-swap-btn svg,
.sc-swap-icon {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  stroke: #047857 !important;
  stroke-width: 2.5px !important;
  fill: none !important;
  transition: stroke 0.2s ease, transform 0.25s ease !important;
}

button.sc-swap-btn:hover,
.sc-swap-btn:hover {
  background: #10b981 !important;
  border-color: #059669 !important;
  transform: rotate(180deg) scale(1.1) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

button.sc-swap-btn:hover svg,
.sc-swap-btn:hover svg,
button.sc-swap-btn:hover .sc-swap-icon,
.sc-swap-btn:hover .sc-swap-icon {
  stroke: #ffffff !important;
}

/* Presets */
.sc-presets-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sc-preset-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  margin-right: 4px;
}

.sc-presets-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sc-preset-btn {
  background: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  padding: 5px 12px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.sc-preset-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

/* Result Hero Banner */
.sc-result-hero {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 50%, #f8fafc 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.1);
}

.sc-result-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #047857;
  background: rgba(16, 185, 129, 0.15);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.sc-full-equation {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  word-break: break-word;
}

/* Show Your Work Box */
.sc-work-box {
  background: #ffffff;
  border-left: 4px solid #10b981;
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sc-work-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 6px;
}

.sc-work-step {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92rem;
  color: #1e293b;
  line-height: 1.5;
}

/* Action Row */
.sc-action-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sc-action-row a.leaf-btn-primary,
.sc-action-row .leaf-btn-primary {
  border: none !important;
  text-decoration: none !important;
}

/* Cheatsheet Grid */
.sc-info-card {
  margin-top: 2.5rem;
}

.sc-info-title {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 1.25rem 0 !important;
}

.sc-cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.sc-cheat-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}

.sc-cheat-item h4 {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 0 0.75rem 0 !important;
}

.sc-cheat-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sc-cheat-item li {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .sc-converter-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem;
  }
  .sc-swap-col {
    padding: 0;
  }
}
