/*
 * SuiteCentral Deployment Options Dashboard
 * Shows code present vs Squire activation proof for the deployment spectrum.
 */

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

:root {
  --deploy-font: 'Open Sans', 'Segoe UI', system-ui, sans-serif;
  --deploy-radius: 4px;
  --deploy-radius-lg: 8px;
  --deploy-transition: 0.18s ease;
  --deploy-bg: #f3f5f7;
  --deploy-surface: #ffffff;
  --deploy-border: #d6dbe1;
  --deploy-text: #182230;
  --deploy-muted: #627083;
  --deploy-blue: #1d4ed8;
  --deploy-blue-bg: #dbeafe;
  --deploy-green: #057a55;
  --deploy-green-bg: #d9f8e8;
  --deploy-amber: #b45309;
  --deploy-amber-bg: #fff3d6;
  --deploy-ink: #0f172a;
  --deploy-panel-width: 380px;
  --deploy-gap: 16px;
}

html, body {
  min-height: 100vh;
  background: var(--deploy-bg);
  color: var(--deploy-text);
  font-family: var(--deploy-font);
  font-size: 14px;
  line-height: 1.5;
}

.deploy-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 20px;
  /* Reserve room for the fixed top-right demo-tab-nav button so it doesn't
     overlap the audience (View) toggle. !important keeps this clearance through
     the `padding` shorthand resets in the responsive media queries below. */
  padding-right: 124px !important;
  background: var(--deploy-surface);
  border-bottom: 1px solid var(--deploy-border);
}

.deploy-title-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 520px;
  min-width: 0;
}

.deploy-title-block i {
  color: var(--deploy-green);
  font-size: 20px;
  flex: 0 0 auto;
}

.deploy-page-header h1 {
  color: var(--deploy-text);
  font-size: 18px;
  font-weight: 700;
}

.deploy-page-header p {
  color: var(--deploy-muted);
  font-size: 13px;
}

#audience-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.deploy-audience-label {
  color: var(--deploy-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.deploy-seg-control {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--deploy-border);
  border-radius: var(--deploy-radius);
}

.deploy-seg-control input[type="radio"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.deploy-seg-control label {
  padding: 6px 14px;
  border-right: 1px solid var(--deploy-border);
  background: var(--deploy-surface);
  color: var(--deploy-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background var(--deploy-transition), color var(--deploy-transition);
}

.deploy-seg-control label:last-of-type { border-right: none; }

.deploy-seg-control input[type="radio"]:checked + label {
  background: var(--deploy-blue);
  color: #ffffff;
}

/* The radio inputs are visually hidden, so surface keyboard focus on the
   adjacent label for keyboard + screen-reader users. */
.deploy-seg-control input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--deploy-blue);
  outline-offset: -2px;
}

.deploy-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--deploy-panel-width);
  gap: var(--deploy-gap);
  /* No max-width/centering: let the infographic (the 1fr column) use the full
     viewport width instead of being capped with empty side margins. */
  padding: var(--deploy-gap);
}

.deploy-infographic-section,
.deploy-side-col > section {
  background: var(--deploy-surface);
  border: 1px solid var(--deploy-border);
  border-radius: var(--deploy-radius-lg);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
}

.deploy-infographic-section {
  overflow: hidden;
}

.deploy-infographic-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #ffffff;
  border-bottom: 1px solid var(--deploy-border);
}

#deploy-infographic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.deploy-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.deploy-hotspot {
  position: absolute;
  border: 2px solid transparent;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  outline: none;
  pointer-events: all;
  transition: background var(--deploy-transition), border-color var(--deploy-transition), box-shadow var(--deploy-transition);
}

.deploy-hotspot:hover {
  background: rgba(29, 78, 216, 0.08);
  border-color: rgba(29, 78, 216, 0.45);
}

.deploy-hotspot:focus-visible {
  border-color: var(--deploy-blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.22);
}

.deploy-hotspot.is-active {
  background: rgba(5, 122, 85, 0.12);
  border-color: var(--deploy-green);
  box-shadow: inset 0 0 0 1px rgba(5, 122, 85, 0.2);
}

.deploy-hotspot-control:hover,
.deploy-hotspot-control.is-active {
  background: rgba(180, 83, 9, 0.12);
  border-color: var(--deploy-amber);
}

.deploy-hotspot-label {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 10;
  padding: 4px 8px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity var(--deploy-transition);
}

.deploy-hotspot:hover .deploy-hotspot-label,
.deploy-hotspot:focus-visible .deploy-hotspot-label {
  opacity: 1;
}

.deploy-infographic-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 10px 14px;
}

.deploy-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border: none;
  border-radius: var(--deploy-radius);
  background: transparent;
  color: var(--deploy-muted);
  cursor: pointer;
  font-family: var(--deploy-font);
  font-size: 12px;
  transition: background var(--deploy-transition), color var(--deploy-transition);
}

.deploy-legend-item:hover,
.deploy-legend-item.is-active {
  background: var(--deploy-green-bg);
  color: var(--deploy-green);
}

.deploy-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--deploy-green);
  flex: 0 0 auto;
}

.deploy-legend-decision .deploy-legend-dot,
.deploy-legend-platform .deploy-legend-dot { background: var(--deploy-blue); }

.deploy-legend-control .deploy-legend-dot { background: var(--deploy-amber); }

.deploy-side-col {
  display: flex;
  flex-direction: column;
  gap: var(--deploy-gap);
  min-width: 0;
}

#node-detail-panel,
.deploy-qa-panel {
  padding: 16px;
}

.deploy-panel-empty,
.deploy-alert {
  color: var(--deploy-muted);
  font-size: 14px;
}

.deploy-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.deploy-kicker {
  color: var(--deploy-green);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.deploy-panel-header h2 {
  color: var(--deploy-ink);
  font-size: 20px;
  line-height: 1.18;
}

.deploy-audience-chip {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--deploy-border);
  border-radius: 999px;
  color: var(--deploy-muted);
  font-size: 11px;
  font-weight: 700;
}

.deploy-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0;
}

.deploy-metric {
  padding: 10px;
  border: 1px solid var(--deploy-border);
  border-radius: var(--deploy-radius);
  background: #f8fafc;
}

.deploy-metric span {
  display: block;
  color: var(--deploy-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.deploy-metric strong {
  display: block;
  margin-top: 2px;
  color: var(--deploy-green);
  font-size: 18px;
  line-height: 1.2;
}

.deploy-summary-text {
  margin: 12px 0;
  color: var(--deploy-text);
}

.deploy-link-group,
.deploy-suggested-qs {
  margin-top: 14px;
}

.deploy-link-group h3,
.deploy-suggested-qs h3 {
  margin-bottom: 6px;
  color: var(--deploy-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.deploy-link-group ul,
.deploy-suggested-qs ul,
.deploy-sources ul {
  list-style: none;
}

.deploy-link-group li,
.deploy-suggested-qs li,
.deploy-sources li {
  margin-top: 5px;
}

.deploy-link-group a {
  color: var(--deploy-blue);
  text-decoration: none;
}

.deploy-link-group a:hover { text-decoration: underline; }

.deploy-suggested-q-btn {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--deploy-border);
  border-radius: var(--deploy-radius);
  background: var(--deploy-surface);
  color: var(--deploy-text);
  cursor: pointer;
  font-family: var(--deploy-font);
  font-size: 13px;
  text-align: left;
}

.deploy-suggested-q-btn:hover {
  border-color: var(--deploy-blue);
  background: var(--deploy-blue-bg);
}

.deploy-qa-header {
  margin-bottom: 10px;
  color: var(--deploy-text);
  font-size: 14px;
  font-weight: 800;
}

.deploy-qa-header i {
  margin-right: 6px;
  color: var(--deploy-blue);
}

.deploy-question-row {
  display: flex;
  gap: 8px;
}

#question-input {
  flex: 1 1 auto;
  min-width: 0;
  resize: vertical;
  padding: 8px;
  border: 1px solid var(--deploy-border);
  border-radius: var(--deploy-radius);
  color: var(--deploy-text);
  font-family: var(--deploy-font);
  font-size: 13px;
}

#question-input:focus {
  border-color: var(--deploy-blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
  outline: none;
}

#question-submit {
  align-self: stretch;
  padding: 0 14px;
  border: none;
  border-radius: var(--deploy-radius);
  background: var(--deploy-blue);
  color: #ffffff;
  cursor: pointer;
  font-family: var(--deploy-font);
  font-size: 13px;
  font-weight: 800;
}

#question-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

#answer-panel {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--deploy-border);
  border-radius: var(--deploy-radius);
  background: #f8fafc;
}

#answer-panel.is-visible { display: block; }

.deploy-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--deploy-muted);
}

.deploy-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--deploy-border);
  border-top-color: var(--deploy-blue);
  border-radius: 50%;
  animation: deploy-spin 0.8s linear infinite;
}

@keyframes deploy-spin {
  to { transform: rotate(360deg); }
}

.deploy-answer-text {
  color: var(--deploy-text);
}

.deploy-sources {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--deploy-border);
}

.deploy-sources p {
  color: var(--deploy-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.deploy-sources a {
  color: var(--deploy-blue);
  text-decoration: none;
}

.deploy-alert {
  padding: 10px;
  border: 1px solid var(--deploy-amber);
  border-radius: var(--deploy-radius);
  background: var(--deploy-amber-bg);
  color: var(--deploy-amber);
}

@media (max-width: 1100px) {
  .deploy-main {
    grid-template-columns: 1fr;
  }

  .deploy-side-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .deploy-page-header,
  .deploy-main {
    padding: 10px;
  }

  .deploy-side-col {
    display: flex;
  }

  .deploy-question-row {
    flex-direction: column;
  }

  #question-submit {
    min-height: 38px;
  }
}
