/* StereoISO Phase-1 UI (CHANGE-lite) */
.stereo-card-wrap { padding-top: 8px; }
/* ===== Stereo header layout fix ===== */

.stereo-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stereo-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 14px;
}

.stereo-actions button {
  width: auto !important;
  flex: 0 0 auto !important;
}


.stereo-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}
@media (max-width: 900px){
  .stereo-grid{ grid-template-columns:1fr; }
}

.stereo-col{
  border:1px solid #e6e6e6;
  border-radius:10px;
  padding:10px;
  min-height: 220px;
}

.stereo-struct-list{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap:10px;
  margin-top: 8px;
}

.stereo-struct-card{
  border:1px solid #ddd;
  border-radius:10px;
  padding:8px;
  cursor:pointer;
  background:#fff;
}
.stereo-struct-card.is-active{
  outline:2px solid #333;
  outline-offset:2px;
}

.stereo-struct-svg{
  width:100%;
  height:160px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:8px;
  background:#fafafa;
}
.stereo-struct-svg svg{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
}
.stereo-struct-cap{
  margin-top:6px;
  font-size: 12px;
  line-height: 1.2;
  color:#222;
  word-break: break-word;
}
.stereo-muted{
  margin-top:8px;
  font-size: 12px;
  color:#666;
  line-height: 1.35;
}
.stereo-analysis{
  margin-top:8px;
  border:1px solid #eee;
  border-radius:10px;
  padding:10px;
  min-height: 160px;
  line-height: 1.35;
  white-space: normal;
}
.stereo-analysis .stereo-title{
  font-weight:700;
  margin-bottom:6px;
}
.stereo-analysis ul{
  margin: 6px 0 0 18px;
}
.stereo-analysis li{ margin: 2px 0; }

.stereo-toggle{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top: 10px;
  font-size: 12px;
  color:#333;
}

/* ===== StereoISO Phase-2C teaching glyph ===== */
.stereo-rs-wrap{
  margin-top: 10px;
  display:flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.stereo-rs-controls{
  min-width: 220px;
  font-size: 12px;
  color:#333;
}
.stereo-rs-title{
  font-weight: 700;
  margin-bottom: 6px;
}
.stereo-rs-controls label{
  margin-right: 6px;
}
.stereo-rs-note{
  margin-top: 6px;
  font-size: 12px;
  color:#666;
  line-height: 1.35;
}
.stereo-glyph{
  width: 220px;
  height: 170px;
  flex: 0 0 auto;
  border:1px solid #eee;
  border-radius: 12px;
  background:#fafafa;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.stereo-glyph svg{
  width:100%;
  height:100%;
  display:block;
}
.stereo-rs-toggle {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 10px;
  row-gap: 6px;
  width: fit-content;
  margin: 6px 0 10px 0;
}

.stereo-rs-toggle label {
  display: contents;
}

.stereo-rs-toggle span {
  font-weight: 600;
}

.stereo-rs-toggle input[type="radio"] {
  margin: 0;
}
/* ===== STRONG FIX for inline results ===== */

/* Make the inline panel behave like its OWN row in the layout */
.stereo-inline-panel{
  width: 100% !important;
  display: block !important;
  grid-column: 1 / -1 !important;   /* works if parent is CSS grid */
  flex-basis: 100% !important;      /* works if parent is flex */
  box-sizing: border-box;
  margin: 12px 0 20px 0;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  background: #fafafa;
}

/* Prevent inherited card styles from squashing text */
.stereo-inline-panel,
.stereo-inline-panel *{
  position: relative !important;
  overflow: visible !important;
  white-space: normal !important;
}

/* Extra breathing room between the two centers */
.stereo-inline-panel .stereo-title{
  margin-top: 10px;
}
/* ===== Highlight clicked / moved stereoisomer card ===== */
.stereo-card-active{
  border: 2px solid #1c39ff !important;   /* blue accent */
  background: #f2f5ff !important;         /* very light blue */
  box-shadow: 0 4px 12px rgba(28,57,255,.15);
}
