/* ==========================================
   SWOT ANALYSIS ASSISTANT – Styles
   ========================================== */

.swot-body {
  overflow-x: hidden;
  background: #0A0A0F;
}

.swot-heading {
  grid-template-columns: minmax(0, 820px) auto;
}

.swot-workspace {
  grid-template-columns: minmax(320px, 0.9fr) minmax(560px, 1.34fr);
}

.swot-form {
  position: sticky;
  top: 84px;
}

/* -- Workflow card -- */
.swot-workflow-card,
.swot-preset-block,
.swot-section,
.swot-mini-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: #111118;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.swot-preset-block {
  background: #161620;
}

.swot-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.swot-card-header strong {
  color: #EDEDF5;
  font: 800 1rem var(--font-display);
}

.swot-card-header span {
  color: #8888A0;
  font-size: 0.8rem;
  font-weight: 800;
}

/* -- Steps -- */
.swot-steps {
  display: grid;
  gap: 9px;
}

.swot-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  background: #161620;
}

.swot-step > span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #2A2A3A;
  color: #B8B8CC;
  font-size: 0.82rem;
  font-weight: 900;
}

.swot-step strong {
  display: block;
  color: #B8B8CC;
  font-size: 0.9rem;
  line-height: 1.25;
}

.swot-step em {
  display: block;
  margin-top: 2px;
  color: #8888A0;
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.35;
}

.swot-step.is-active {
  border-color: rgba(14, 165, 233, 0.36);
  background: rgba(14, 165, 233, 0.08);
}

.swot-step.is-active > span {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #f59e0b);
}

.swot-step.is-done > span {
  color: #ffffff;
  background: #0f766e;
}

/* -- Presets -- */
.swot-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: #111118;
  color: #B8B8CC;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.06);
  color: #0284c7;
}

/* -- Checkbox group -- */
.swot-checkbox-group {
  margin-top: 4px;
}

.swot-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-weight: 500 !important;
  cursor: pointer;
  color: #B8B8CC;
}

.swot-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0ea5e9;
  cursor: pointer;
  flex-shrink: 0;
}

/* -- Actions -- */
.swot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* -- Output header -- */
.swot-regen-control {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.swot-regen-control select {
  padding: 8px 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #111118;
  color: #EDEDF5;
  font-size: 0.85rem;
  font-weight: 600;
}

/* -- SWOT 2x2 Grid -- */
.swot-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 760px) {
  .swot-grid-2x2 {
    grid-template-columns: 1fr;
  }
}

.swot-quadrant {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #111118;
}

.swot-quadrant h3 {
  margin: 0 0 10px;
  font: 700 0.95rem var(--font-display);
  color: #EDEDF5;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.swot-quadrant h3:hover {
  background: rgba(14, 165, 233, 0.06);
}

.swot-quad-s { border-left: 4px solid #10b981; }
.swot-quad-w { border-left: 4px solid #f59e0b; }
.swot-quad-o { border-left: 4px solid #3b82f6; }
.swot-quad-t { border-left: 4px solid #ef4444; }

.swot-quad-s h3 { color: #065f46; }
.swot-quad-w h3 { color: #92400e; }
.swot-quad-o h3 { color: #1e40af; }
.swot-quad-t h3 { color: #991b1b; }

.swot-quadrant ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.swot-quadrant li {
  padding: 7px 10px;
  border-radius: 6px;
  background: #161620;
  border: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.85rem;
  line-height: 1.45;
  color: #B8B8CC;
}

/* -- Insight cards -- */
.swot-insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 760px) {
  .swot-insight-grid {
    grid-template-columns: 1fr;
  }
}

.swot-mini-card h3 {
  margin: 0 0 10px;
  font: 700 0.9rem var(--font-display);
  color: #EDEDF5;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.swot-mini-card h3:hover {
  background: rgba(14, 165, 233, 0.06);
}

.swot-mini-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.swot-mini-card li {
  padding: 7px 10px;
  border-radius: 6px;
  background: #161620;
  border: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.85rem;
  line-height: 1.45;
  color: #B8B8CC;
}

/* -- TOWS grid -- */
.swot-tows-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 760px) {
  .swot-tows-grid {
    grid-template-columns: 1fr;
  }
}

/* -- Section highlight on click -- */
.swot-quadrant h3.flash-highlight,
.swot-mini-card h3.flash-highlight {
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.35);
  transition: box-shadow 0.1s ease;
}

/* -- Loader -- */
.swot-loader {
  display: grid;
  gap: 18px;
  padding: 24px;
  text-align: center;
}

.swot-loader-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 320px;
  margin: 0 auto;
}

.swot-loader-cell {
  height: 60px;
  border-radius: 8px;
  background: linear-gradient(110deg, #2A2A3A 30%, #f1f5f9 50%, #2A2A3A 70%);
  background-size: 200% 100%;
  animation: swot-shimmer 1.6s ease-in-out infinite;
}

.swot-loader-cell:nth-child(3) {
  grid-column: span 2;
}

@keyframes swot-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.swot-loader strong {
  display: block;
  color: #EDEDF5;
  font: 800 1rem var(--font-display);
}

.swot-loader p {
  margin: 4px 0 0;
  color: #8888A0;
  font-size: 0.85rem;
}

/* -- Responsive workspace collapse -- */
@media (max-width: 940px) {
  .swot-workspace {
    grid-template-columns: 1fr;
  }

  .swot-form {
    position: static;
    top: auto;
  }
}
