/* DIYCalcTools Embed Stylesheet — Minimal subset for iframe embedding */

:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #1e2a45;
  --bg-input: #0f1626;
  --accent: #ff6b35;
  --accent-hover: #ff8c5a;
  --accent-yellow: #fbbf24;
  --text-primary: #f0f0f0;
  --text-secondary: #a0aec0;
  --text-muted: #6b7280;
  --border: #2d3a52;
  --border-focus: #ff6b35;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  padding: 1rem;
}

h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--text-primary); }
h2 { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--accent); }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
h4 { font-size: 1rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }
a { color: var(--accent); text-decoration: none; }

.embed-main { max-width: 700px; margin: 0 auto; }

.calculator-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.calculator-widget h2 {
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.form-group { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input:not([type="checkbox"]),
.form-group select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
  -webkit-appearance: auto;
  appearance: auto;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
  padding: 0.5rem 0;
}

.form-group input:not([type="checkbox"]):focus,
.form-group select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.form-group input::placeholder { color: var(--text-muted); }

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0aec0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.form-group .input-hint { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; }

.btn-calculate {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
}

.btn-calculate:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.results-panel {
  display: none;
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: rgba(255, 107, 53, 0.05);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: var(--radius-lg);
  animation: slideIn 0.3s ease;
}
.results-panel.visible { display: block; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-panel h3 { color: var(--accent); margin-bottom: 0.75rem; font-size: 1rem; }
.result-item { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid rgba(255, 107, 53, 0.1); }
.result-item:last-child { border-bottom: none; }
.result-label { color: var(--text-secondary); font-size: 0.85rem; }
.result-value { font-size: 1.1rem; font-weight: 700; color: var(--accent-yellow); font-variant-numeric: tabular-nums; }

.result-highlight {
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
  margin-top: 0.75rem;
}
.result-highlight .result-value { font-size: 1.75rem; color: var(--accent); }
.result-highlight .result-label { font-size: 0.8rem; margin-top: 0.2rem; }

.cost-estimate { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 2px solid var(--accent); }
.cost-estimate h4 { color: var(--accent); font-size: 0.9rem; margin-bottom: 0.75rem; }
.cost-table { width: 100%; border-collapse: collapse; margin-bottom: 0.5rem; }
.cost-table thead th { padding: 0.4rem 0.5rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); border-bottom: 1px solid rgba(255, 107, 53, 0.2); text-align: right; }
.cost-table thead th:first-child { text-align: left; }
.cost-table tbody td { padding: 0.4rem 0.5rem; font-size: 0.8rem; color: var(--text-secondary); border-bottom: 1px solid rgba(255, 107, 53, 0.08); text-align: right; }
.cost-table tbody td:first-child { text-align: left; }
.cost-table tfoot td { padding: 0.5rem; font-weight: 700; font-size: 0.9rem; border-top: 2px solid rgba(255, 107, 53, 0.3); text-align: right; }
.cost-table tfoot td:first-child { text-align: left; color: var(--text-primary); }
.cost-table .cost-low { color: var(--text-secondary); }
.cost-table .cost-avg { color: var(--accent-yellow); }
.cost-table .cost-high { color: var(--text-secondary); }
.cost-table tfoot .cost-avg { color: var(--accent); font-size: 1rem; }
.cost-disclaimer { font-size: 0.7rem; color: var(--text-muted); font-style: italic; }

.embed-footer {
  text-align: center;
  padding: 0.75rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.embed-footer a { color: var(--accent); }
.embed-footer strong { color: var(--text-primary); }
