/* Mirrors the design-handoff DeployWizard: backdrop + bordered modal,
 * wizard-step tabs, two-column card picker, matrix/violet palette.
 * Scoped with .ctw- prefix so nothing leaks into other views. */

.ctw-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(1px);
}

.ctw-modal {
  width: 880px;
  max-width: 96vw;
  max-height: 90vh;
  background: var(--panel);
  border: 1px solid var(--violet);
  box-shadow: 0 0 30px var(--violet);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-mono);
  color: var(--text-color);
}

.ctw-head {
  padding: 14px 22px;
  border-bottom: 1px solid var(--border, var(--panel-border));
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ctw-head h3 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 3px;
  display: inline-flex;
  align-items: center;
}
.ctw-close {
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 4px;
}
.ctw-close:hover { color: var(--violet); }

.ctw-steps {
  display: flex;
  border-bottom: 1px solid var(--border, var(--panel-border));
}
.ctw-step {
  flex: 1;
  padding: 12px 14px;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  opacity: 0.4;
  border-bottom: 2px solid transparent;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ctw-step.active {
  opacity: 1;
  border-bottom-color: var(--violet);
  color: var(--violet);
}
.ctw-step.done { opacity: 0.8; color: var(--matrix, #33ff66); }

.ctw-body {
  padding: 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ctw-label {
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: var(--dim-color);
}
.ctw-violet { color: var(--violet); }
.ctw-dim { color: var(--dim-color); }

.ctw-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ctw-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.ctw-card {
  padding: 14px;
  border: 1px solid var(--border, var(--panel-border));
  background: var(--panel);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.ctw-card:hover { border-color: var(--violet); }
.ctw-card.selected {
  border-color: var(--violet);
  background: var(--violet-tint-10, var(--violet-tint-10));
}
.ctw-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ctw-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctw-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.ctw-card-sub {
  font-size: 0.62rem;
  letter-spacing: 1px;
  color: var(--dim-color);
  text-transform: uppercase;
}
.ctw-card-desc {
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-color);
  opacity: 0.85;
}
.ctw-card-note {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px dashed var(--border, var(--panel-border));
  color: var(--dim-color);
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.ctw-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ctw-field label {
  font-size: 0.62rem;
  letter-spacing: 1.5px;
  color: var(--dim-color);
}
.ctw-field input[type='text'] {
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border, var(--panel-border));
  color: var(--text-color);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.ctw-field input[type='text']:focus {
  outline: none;
  border-color: var(--violet);
}
.ctw-field input[type='range'] {
  accent-color: var(--violet);
}

.ctw-note {
  padding: 10px 12px;
  border: 1px dashed var(--violet);
  color: var(--text-color);
  font-size: 0.7rem;
  line-height: 1.5;
  letter-spacing: 0.3px;
  background: var(--violet-tint-10, var(--violet-tint-10));
}
.ctw-note strong {
  color: var(--violet);
  letter-spacing: 1px;
  margin-right: 6px;
}
.ctw-note code {
  background: var(--bg);
  padding: 1px 5px;
  font-family: var(--font-mono);
  color: var(--matrix, #33ff66);
}

.ctw-error {
  padding: 10px 12px;
  border: 1px solid var(--alert, #e74c3c);
  color: var(--alert, #e74c3c);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

.ctw-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border, var(--panel-border));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ctw-foot-right {
  display: flex;
  gap: 8px;
}

.ctw-btn {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--violet);
  color: var(--violet);
  padding: 7px 14px;
  transition: all 0.3s;
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ctw-btn:hover { background: var(--violet); color: var(--bg); box-shadow: var(--violet-glow); }
.ctw-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.ctw-btn.ghost { border-color: var(--border); color: var(--matrix); opacity: 0.7; }
.ctw-btn.ghost:hover {
  background: transparent; color: var(--matrix); opacity: 1;
  border-color: var(--matrix); box-shadow: var(--matrix-glow);
}
