/**
 * style.css - Calculadora de ingletes y biseles compuestos
 * Fijate Tools - Estándar canónico
 */

:root {
  --bg: #090d16;
  --surface: #0f172a;
  --surface-hover: #1e293b;
  --surface-active: #283548;
  --border: #1e293b;
  --border-subtle: #2d3b4e;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-glow: rgba(245, 158, 11, 0.2);
  --success: #10b981;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --surface-active: #e2e8f0;
  --border: #e2e8f0;
  --border-subtle: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #d97706;
  --primary-hover: #b45309;
  --primary-glow: rgba(217, 119, 6, 0.12);
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

.tool-layout {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  flex: 1 0 auto;
}

.tool-with-sidebar {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* Selector de pestañas */
.miter-tabs-bar {
  display: flex;
  gap: 0.5rem;
  background: var(--surface-hover);
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.miter-tab-btn {
  flex: 1 1 0%;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.miter-tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.miter-tab-pane {
  display: none;
}

.miter-tab-pane.active {
  display: block;
}

/* Grid de controles */
.form-grid-miter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control, select.form-control {
  height: 42px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* Tarjetas de resultados angulares */
.angles-display-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.angle-card {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.angle-card-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.angle-card-val {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
}

.setup-guide-box {
  background: var(--surface-hover);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.miter-svg {
  width: 100%;
  max-height: 260px;
  display: block;
}

@media (max-width: 768px) {
  .tool-layout {
    margin: 1rem auto 2rem;
    padding: 0 0.75rem;
  }
}
