/* ====== Global chem tools styling ====== */

body.bt-body {
  background-color: #121212;
  color: #ffffff;
  font-family: Arial, sans-serif;
}

/* Make Bootstrap's .text-muted readable on dark */
.bt-body .text-muted,
.bt-body .ptable-note {
  color: #c0c0c0 !important;
}

/* general layout */

.bt-page {
  max-width: 1100px;
  margin: 0 auto;
}

.bt-card {
  background-color: #1e1e1e;
  border-radius: 0;          /* flat like main site */
  border: 1px solid #2a2a2a;
  padding: 1.75rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
}

.bt-card h1,
.bt-card h2,
.bt-card h3 {
  font-family: "Oswald", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

/* header / breadcrumb */

.bt-header {
  padding: 1rem 0 0.5rem;
}

.bt-brand {
  font-family: "Oswald", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5f5f5;
}

.bt-breadcrumb a {
  color: #a58e77;
  text-decoration: none;
  font-size: 0.9rem;
}

.bt-breadcrumb a:hover {
  text-decoration: underline;
}

/* buttons */

.bt-btn {
  border-radius: 0;              /* match main site */
  border: 1px solid transparent;
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
}

.bt-btn-main {
  background-color: #a58e77;
  color: #121212;
  border-color: #a58e77;
}

.bt-btn-main:hover {
  background-color: #c29f7d;
  border-color: #c29f7d;
  color: #121212;
}

.bt-btn-ghost {
  background-color: transparent;
  color: #f5f5f5;
  border-color: #3a3a3a;
}

.bt-btn-ghost:hover {
  background-color: #2a2a2a;
}

/* Softer greens/reds for eyes */

.bt-btn-green {
  background-color: #3b8c4d;     /* softer green */
  color: #fff;
  border-color: #3b8c4d;
}

.bt-btn-green:hover {
  background-color: #4ea760;
  border-color: #4ea760;
}

.bt-btn-red {
  background-color: #c05252;     /* softer red */
  color: #fff;
  border-color: #c05252;
}

.bt-btn-red:hover {
  background-color: #d66a6a;
  border-color: #d66a6a;
}

.current-element-box {
  border: 1px solid #3a3a3a;
  padding: 0.9rem 1rem;
  background-color: #181818;
}

/* feedback banner */
#feedback li {
    list-style: none;
}

.feedback-banner {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}

.feedback-banner {
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.feedback-success {
  background-color: #15452b;
  border: 1px solid #2a7a4b;
  color: #e4f8ec;
}

.feedback-warn {
  background-color: #514012;
  border: 1px solid #b08c2a;
  color: #fff3c0;
}

.feedback-error {
  background-color: #5a1b1b;
  border: 1px solid #d9534f;
  color: #fbeaea;
}

.feedback-ok {
  background-color: #1b3a27;
  border-left-color: #4caf50;
  color: #d7ffd9;
}

.feedback-warn {
  background-color: #3a2b1b;
  border-left-color: #ffb74d;
  color: #ffe6c6;
}

/* atom view */

.atom-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem; /* NEW – keeps the canvas from being squeezed by neighbors */
}

.atom-canvas {
  position: relative;
  width: min(320px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at center, #47372a 0, #1e1e1e 55%);
  border: none;
  margin-bottom: 1rem;

  /* NEW: stop it from shrinking so much that shells end up inside the nucleus */
  min-width: 260px;
  min-height: 260px;
}

.atom-nucleus {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #e0c2a0, #a58e77 60%, #705c46);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #121212;
  text-align: center;
}

.nucleus-charge {
  font-size: 1rem;
  font-weight: 600;
  color: #121212;
}

.atom-shell {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.35);
}

.atom-shell.active-shell {
  border-color: #a58e77; /* warm accent */
  border-style: solid;
  box-shadow: 0 0 6px rgba(165, 142, 119, 0.8);
}

.atom-electron {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f5f5f5;
}

/* info blocks */

.info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b0b0b0;
}

.info-value {
  font-size: 1.05rem;
}

.info-row {
  font-size: 0.95rem;
}

/* build controls */

.control-group {
  margin-bottom: 1.3rem; /* slightly more breathing room */
}

.control-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c5c5c5;
  margin-bottom: 0.25rem;
}

/* periodic table embed for element.html */

.ptable-wrapper {
  border-radius: 0;
  border: 1px solid #3a3a3a;
  overflow: hidden;
  background-color: #121212;
  margin-top: 0.75rem;
}

.ptable-wrapper iframe {
  width: 100%;
  height: 430px;
  border: none;
}

.ptable-note {
  font-size: 0.8rem;
}

/* responsive tweaks */

@media (max-width: 767.98px) {
  .bt-card {
    padding: 1.25rem;
  }

  .ptable-wrapper iframe {
    height: 280px; /* shorter on small screens */
  }
}
