/* =========================================================
   AUTOMATION & SCRIPTING
   Page-specific hero visual
========================================================= */

.automation-visual {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 500px;

  overflow: hidden;

  border: 1px solid rgba(21, 78, 122, 0.16);
  border-radius: 20px;

  background: var(--color-surface);

  box-shadow:
    0 30px 80px rgba(21, 78, 122, 0.12),
    0 10px 30px rgba(15, 23, 42, 0.06);

  transform: rotate(1deg);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.automation-visual:hover {
  transform: rotate(0) translateY(-5px);

  box-shadow:
    0 40px 90px rgba(21, 78, 122, 0.16),
    0 15px 35px rgba(15, 23, 42, 0.08);
}

/* =========================================================
   HEADER
========================================================= */

.automation-header {
  display: grid;

  grid-template-columns: auto 1fr auto;

  align-items: center;

  gap: 14px;

  padding: 17px 20px;

  border-bottom: 1px solid var(--color-border);
}

.automation-window-dots {
  display: flex;

  gap: 5px;
}

.automation-window-dots span {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: var(--color-border);
}

.automation-header-label {
  color: var(--color-muted);

  font-family: "Space Grotesk", sans-serif;

  font-size: 11px;
  font-weight: 600;
}

.automation-status {
  padding: 5px 9px;

  border-radius: 999px;

  background: var(--color-accent-soft);

  color: var(--color-accent);

  font-size: 9px;
  font-weight: 700;

  letter-spacing: 0.06em;

  text-transform: uppercase;
}

/* =========================================================
   AUTOMATION FLOW
========================================================= */

.automation-flow {
  padding: 25px 24px 22px;
}

.automation-step {
  display: grid;

  grid-template-columns: 28px 38px minmax(0, 1fr);

  align-items: center;

  gap: 12px;
}

.automation-step-number {
  color: var(--color-muted);

  font-family: "Space Grotesk", sans-serif;

  font-size: 9px;
  font-weight: 600;

  letter-spacing: 0.08em;
}

.automation-step-icon {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(21, 78, 122, 0.12);

  border-radius: 10px;

  background: var(--color-primary-soft);

  color: var(--color-primary);

  font-size: 14px;
  font-weight: 700;
}

.automation-step strong {
  display: block;

  color: var(--color-text);

  font-size: 12px;
  font-weight: 600;
}

.automation-step div:last-child span {
  display: block;

  margin-top: 3px;

  color: var(--color-muted);

  font-size: 10px;
}

/* =========================================================
   FLOW CONNECTORS
========================================================= */

.automation-connector {
  width: 1px;
  height: 18px;

  margin-left: 48px;

  background: linear-gradient(
    to bottom,
    rgba(21, 78, 122, 0.2),
    rgba(13, 148, 136, 0.35)
  );
}

/* =========================================================
   TERMINAL
========================================================= */

.automation-terminal {
  margin: 0 24px;

  overflow: hidden;

  border: 1px solid rgba(21, 78, 122, 0.1);

  border-radius: 12px;

  background: #f5f7f8;
}

.automation-terminal-header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  padding: 9px 13px;

  border-bottom: 1px solid rgba(21, 78, 122, 0.08);

  color: var(--color-muted);

  font-family: "Space Grotesk", sans-serif;

  font-size: 9px;
}

.automation-terminal-header span:last-child {
  color: var(--color-accent);

  font-weight: 600;
}

.automation-terminal-body {
  padding: 13px;
}

.automation-terminal-body p {
  margin: 0;

  color: var(--color-text-light);

  font-family: "Space Grotesk", monospace;

  font-size: 9px;

  line-height: 1.8;
}

.automation-terminal-body p span {
  margin-right: 6px;

  color: var(--color-primary);

  font-weight: 700;
}

.automation-terminal-success {
  color: var(--color-accent) !important;
}

/* =========================================================
   METRICS
========================================================= */

.automation-metrics {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  margin-top: 20px;

  border-top: 1px solid var(--color-border);
}

.automation-metrics > div {
  padding: 17px 18px;

  border-right: 1px solid var(--color-border);
}

.automation-metrics > div:last-child {
  border-right: 0;
}

.automation-metrics span {
  display: block;

  color: var(--color-muted);

  font-size: 9px;

  line-height: 1.3;
}

.automation-metrics strong {
  display: block;

  margin-top: 5px;

  color: var(--color-text);

  font-family: "Space Grotesk", sans-serif;

  font-size: 13px;

  font-weight: 600;
}

.automation-metrics > div:nth-child(2) strong {
  color: var(--color-accent);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {
  .automation-visual {
    transform: none;
  }

  .automation-visual:hover {
    transform: translateY(-3px);
  }
}

@media (max-width: 480px) {
  .automation-header {
    padding: 15px 16px;
  }

  .automation-flow {
    padding: 22px 18px 20px;
  }

  .automation-step {
    grid-template-columns: 24px 34px minmax(0, 1fr);

    gap: 9px;
  }

  .automation-step-icon {
    width: 33px;
    height: 33px;

    border-radius: 9px;

    font-size: 12px;
  }

  .automation-connector {
    margin-left: 42px;
  }

  .automation-terminal {
    margin-inline: 18px;
  }

  .automation-metrics > div {
    padding: 14px 12px;
  }

  .automation-metrics strong {
    font-size: 12px;
  }
}
