/* style.css — DRH Micro‑Tool 3.0 (Dark Mode + Accordion + Export UI) */

/* ------------------------------------------------------------ */
/* ROOT VARIABLES */
/* ------------------------------------------------------------ */
:root {
  --bg: #f2f2f2;
  --card: #ffffff;
  --border: #dcdcdc;
  --text: #1a1a1a;
  --text-light: #555;
  --accent: #000;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,0.07);
  --font: 'Inter', system-ui, Arial, sans-serif;
}

/* DARK MODE */
html[data-theme="dark"] {
  --bg: #0e0e0e;
  --card: #181818;
  --border: #333;
  --text: #eaeaea;
  --text-light: #aaa;
  --accent: #fff;
  --shadow: none;
}

/* ------------------------------------------------------------ */
/* GLOBAL */
/* ------------------------------------------------------------ */
body {
  margin: 0;
  padding: 30px;
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 900px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
}

header p {
  margin-top: 8px;
  font-size: 16px;
  color: var(--text-light);
}

/* ------------------------------------------------------------ */
/* TOP CONTROL BAR */
/* ------------------------------------------------------------ */
.top-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.top-controls select {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

#darkToggle {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-weight: 700;
}

#darkToggle:hover {
  opacity: 0.8;
}

/* ------------------------------------------------------------ */
/* ACCORDION */
/* ------------------------------------------------------------ */
.accordion {
  margin-bottom: 30px;
}

.acc-item {
  margin-bottom: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}

.acc-header {
  width: 100%;
  padding: 15px;
  background: var(--card);
  border: none;
  text-align: left;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.acc-header::after {
  content: '+';
  font-size: 18px;
  color: var(--text-light);
}

.acc-item.active .acc-header::after {
  content: '-';
}

.acc-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 15px;
  transition: max-height 0.25s ease-in-out, padding 0.25s ease;
}

.acc-item.active .acc-body {
  padding: 15px;
  max-height: 800px;
}

/* ------------------------------------------------------------ */
/* FORM FIELDS */
/* ------------------------------------------------------------ */
.field {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

input, select {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ------------------------------------------------------------ */
/* BUTTON ROW */
/* ------------------------------------------------------------ */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 25px;
}

.button-row button {
  padding: 12px 20px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s ease;
}

.button-row button:hover {
  opacity: 0.85;
}

/* ------------------------------------------------------------ */
/* OUTPUT */
/* ------------------------------------------------------------ */
.output {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
}

#output {
  font-family: var(--font);
  white-space: pre-wrap;
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

/* ------------------------------------------------------------ */
/* MOBILE */
/* ------------------------------------------------------------ */
@media (max-width: 600px) {
  body {
    padding: 15px;
  }
  .button-row button {
    flex: 1 1 100%;
  }
  .top-controls {
    flex-direction: column;
  }
}
