/* Shared deep-dive control for Security+ simulations and hot spots */
.actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.actions__primary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.actions__primary button[id$="checkBtn"],
.actions__primary button[id="checkBtn"],
.actions button[id$="checkBtn"],
.actions button[id="checkBtn"] {
  order: 1;
  flex-shrink: 0;
}

.actions__primary button[id$="resetBtn"],
.actions button[id$="resetBtn"] {
  order: 2;
  flex-shrink: 0;
}

.actions__primary button[id$="showBtn"],
.actions__primary button[id="showAnswerBtn"],
.actions button[id$="showBtn"],
.actions button[id="showAnswerBtn"] {
  order: 4;
  margin-left: auto;
  flex-shrink: 0;
}

.actions__primary [role="status"],
.actions [role="status"],
.actions #result {
  order: 10;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  margin-top: 2px;
}

.deep-dive-btn {
  border: 1px solid #38bdf8;
  background: #121a2b;
  color: #e0f2fe;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.deep-dive-btn:hover {
  background: #1e293b;
  border-color: #7dd3fc;
}

.deep-dive-btn:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}

body.secplus-deep-dive-open {
  overflow: hidden;
}

.secplus-deep-dive-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(11, 16, 32, 0.82);
  backdrop-filter: blur(4px);
}

.secplus-deep-dive-modal[hidden] {
  display: none !important;
}

.secplus-deep-dive-modal.is-open {
  display: flex;
}

.secplus-deep-dive-modal__panel {
  width: min(820px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: #ffffff;
  color: #1e293b;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.secplus-deep-dive-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}

.secplus-deep-dive-modal__title {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
  line-height: 1.35;
}

.secplus-deep-dive-modal__close {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.secplus-deep-dive-modal__body {
  padding: 16px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.secplus-deep-dive-modal__body p {
  margin: 0 0 12px;
}

.secplus-deep-dive-modal__body ul {
  margin: 0 0 12px;
  padding-left: 1.25rem;
}

.deep-dive-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: deepstep;
}

.deep-dive-steps > li {
  counter-increment: deepstep;
  margin: 0 0 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid #e5e7eb;
}

.deep-dive-steps > li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.deep-dive-steps > li h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
  color: #0f172a;
}

.deep-dive-steps > li h3::before {
  content: "Step " counter(deepstep) " — ";
  color: #5b21b6;
}

.deep-dive-answer {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
  font-weight: 700;
}
