/* RingCentral.com theme: rc-air. Builds on rc-theme.css tokens.
   Slice: #security (illustrative AIR Pro redaction chat) and .outbound-handoff.
   Older files style this slice at #security / .outbound-handoff specificity, several with
   !important, so every rule here is scoped under #outbound to win without touching them. */

#outbound #security {
  /* Local tokens for the chat states. */
  --air-bubble: #f4f3f0;
  --air-ok: #1f7a4a;
  --air-warn-ink: #8a3c00;
  --air-warn-bg: #fff1e2;
  --air-scan-bg: #d9eaf5;
  --air-scan-ink: #07456b;
  --air-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  padding: var(--rc-section-y) 0 0;
  background: transparent;
}

/* Layout: copy left, AIR visual right, as on RingCentral's AI product rows. */
#outbound #security .security-grid {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 112px);
  align-items: center;
}
#outbound #security .security-grid > div:first-child { max-width: 540px; }
#outbound #security .security-grid > div:first-child > p { margin-top: 20px; }
#outbound #security .security-grid > div:first-child > h2 + p { margin-top: 28px; }

/* The soft RingCentral panel the chat card floats in. */
#outbound #security .rc-air-stage {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(36px, 5.2vw, 88px) clamp(24px, 4.6vw, 80px);
  border-radius: var(--rc-radius-xl);
  background: var(--rc-grad-cool);
}

/* Chat card: white product UI with RingCentral's translucent rim. */
#outbound #security .security-demo.air-chat {
  container-type: inline-size;
  width: 100%;
  max-width: 560px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--rc-white);
  border-radius: var(--rc-radius-lg) !important;
  background: var(--rc-white) !important;
  color: var(--rc-ink);
  box-shadow: 0 0 0 10px #ffffff73, var(--rc-shadow-lift) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Header: logo, orange AIR Pro pill, quiet example label. */
#outbound #security .air-chat .air-chat-header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 20px 24px 18px;
  border: 0;
  border-bottom: 1px solid var(--rc-line);
  background: transparent;
  font-size: inherit;
}
#outbound #security .air-chat-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
#outbound #security .air-chat-brand img { display: block; width: 122px; height: auto; flex: 0 0 auto; }
#outbound #security .air-chat-brand strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 11px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--rc-orange) 0%, var(--rc-orange-soft) 100%);
  box-shadow: 0 0 0 2px var(--rc-white), 0 3px 8px #ff7a0033;
  color: var(--rc-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
#outbound #security .air-chat .air-chat-example {
  margin-left: auto;
  color: var(--rc-ink-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

/* Conversation. */
#outbound #security .air-chat-conversation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 24px 30px;
  background: transparent;
}
#outbound #security .air-chat .air-chat-sender {
  display: block;
  color: var(--rc-ink-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
#outbound #security .air-chat-agent {
  max-width: 88%;
  padding: 14px 18px 16px;
  border: 0;
  border-radius: 6px var(--rc-radius-md) var(--rc-radius-md);
  background: var(--air-bubble);
  box-shadow: none;
}
#outbound #security .air-chat-agent p {
  margin: 4px 0 0;
  color: var(--rc-ink);
  font-size: 18px;
  line-height: 1.5;
}
#outbound #security .air-chat .air-chat-customer {
  align-self: flex-end;
  max-width: 92%;
  padding: 14px 18px 16px;
  border: 0;
  border-radius: var(--rc-radius-md) 6px var(--rc-radius-md) var(--rc-radius-md);
  background: var(--rc-blue);
  box-shadow: 0 6px 16px #066fac29;
}
#outbound #security .air-chat .air-chat-customer > .air-chat-sender { color: #eef6fb; }
#outbound #security .air-chat .air-chat-customer p {
  margin: 4px 0 0;
  color: var(--rc-white);
  font-size: 18px;
  line-height: 1.6;
}

/* The sensitive token. Monospace keeps its width fixed while characters flip,
   and a padlock (decorative, drawn with a mask) shows the state alongside colour. */
#outbound #security .air-chat .sensitive {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  margin: 6px 0 0;
  padding: 3px 10px 3px 8px;
  border-radius: 8px;
  background: var(--rc-white);
  color: var(--rc-ink);
  box-shadow: none;
  filter: none;
  font-family: var(--air-mono);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere; /* only breaks under heavy text zoom */
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
#outbound #security .air-chat .sensitive::before {
  content: "";
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: var(--air-lock) center / contain no-repeat;
  mask: var(--air-lock) center / contain no-repeat;
}
#outbound #security .air-chat {
  --air-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.75 7V5.25a3.25 3.25 0 0 1 6.5 0V7' fill='none' stroke='%23000' stroke-width='1.7'/%3E%3Crect x='2.75' y='7' width='10.5' height='8' rx='2' fill='%23000'/%3E%3C/svg%3E");
  --air-unlock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.75 7V5.25a3.25 3.25 0 0 1 6.3-1.1' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'/%3E%3Crect x='2.75' y='7' width='10.5' height='8' rx='2' fill='%23000'/%3E%3C/svg%3E");
}
#outbound #security .air-chat[data-state="exposed"] .sensitive {
  background: var(--air-warn-bg);
  color: var(--air-warn-ink);
  box-shadow: 0 0 0 2px var(--rc-orange-soft);
}
#outbound #security .air-chat[data-state="exposed"] .sensitive::before {
  -webkit-mask-image: var(--air-unlock);
  mask-image: var(--air-unlock);
}
#outbound #security .air-chat[data-state="redacting"] .sensitive {
  background:
    linear-gradient(100deg, #ffffff00 20%, #ffffffd9 50%, #ffffff00 80%) -80% 0 / 45% 100% no-repeat,
    var(--air-scan-bg);
  color: var(--air-scan-ink);
  box-shadow: 0 0 0 2px #ffffff8c;
  filter: none;
  animation: rc-air-scan 0.8s linear infinite;
}

/* Protection footer: hairline, status, blue pill. */
#outbound #security .air-chat-protection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label action" "status action";
  align-items: center;
  gap: 6px 20px;
  padding: 18px 24px 20px;
  border-top: 1px solid var(--rc-line);
  background: var(--rc-page);
}
#outbound #security .air-chat-protection-label {
  grid-area: label;
  color: var(--rc-ink-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}
#outbound #security .air-chat .protection-result {
  grid-area: status;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
}
#outbound #security .air-chat .protection-result p {
  margin: 0;
  color: var(--rc-ink);
  font-size: 16px;
  line-height: 1.4;
}
#outbound #security .air-chat .signal-dot {
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--air-ok);
  box-shadow: 0 0 0 4px #1f7a4a21;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
#outbound #security .air-chat[data-state="exposed"] .signal-dot {
  background: var(--rc-orange);
  box-shadow: 0 0 0 4px #ff7a002e;
}
#outbound #security .air-chat[data-state="redacting"] .signal-dot {
  background: var(--rc-blue);
  box-shadow: 0 0 0 4px #066fac2e;
  animation: rc-air-pulse 0.8s ease-in-out infinite;
}
#outbound #security .air-chat .shimmer-button {
  grid-area: action;
  justify-self: end;
  width: auto;
  min-width: 176px;
  min-height: 44px;
  margin: 0;
  padding: 10px 22px;
}
/* "Redacting…" is a deliberate in-progress state, not a faded button. */
#outbound #security .air-chat .shimmer-button:disabled {
  --button-surface: var(--air-scan-bg);
  opacity: 1;
  background: var(--air-scan-bg);
  color: var(--air-scan-ink);
  cursor: progress;
  transform: none;
}
#outbound #security .air-chat .shimmer-button:focus-visible {
  outline: 2px solid var(--rc-blue);
  outline-offset: 3px;
}

@keyframes rc-air-scan {
  to { background-position: 180% 0, 0 0; }
}
@keyframes rc-air-pulse {
  50% { box-shadow: 0 0 0 7px #066fac12; }
}

/* Narrow cards (container width, so tablet and phone both get it). */
@container (max-width: 470px) {
  #outbound #security .air-chat .air-chat-header { padding: 16px 18px 14px; gap: 8px 12px; }
  #outbound #security .air-chat .air-chat-example { margin-left: 0; flex-basis: 100%; }
  #outbound #security .air-chat-conversation { gap: 14px; padding: 22px 18px 24px; }
  #outbound #security .air-chat-agent { max-width: 94%; padding: 12px 15px 14px; }
  #outbound #security .air-chat .air-chat-customer { max-width: 96%; padding: 12px 15px 14px; }
  #outbound #security .air-chat-protection {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "label" "status" "action";
    gap: 6px;
    padding: 16px 18px 18px;
  }
  #outbound #security .air-chat .shimmer-button { justify-self: stretch; width: 100%; margin-top: 10px; }
}

/* Handoff: one calm white card, copy left and a RingCentral checklist right. */
#outbound .outbound-handoff {
  margin-top: clamp(56px, 7vw, 104px);
  padding: 0;
  background: transparent;
  color: var(--rc-ink);
}
#outbound .outbound-handoff .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 112px);
  align-items: center;
  padding: clamp(32px, 5vw, 72px);
  border: 0;
  border-radius: var(--rc-radius-lg);
  background: var(--rc-white);
  box-shadow: var(--rc-shadow);
}
#outbound .outbound-handoff .wrap > div > p { margin-top: 20px; max-width: 34em; }
#outbound .outbound-handoff .wrap > div > h3 + p { margin-top: 24px; }
#outbound .handoff-list { margin: 0; padding: 0; list-style: none; }
#outbound .handoff-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 4px;
  padding: 22px 0;
  border: 0;
}
#outbound .handoff-list li + li { border-top: 1px solid var(--rc-line); }
#outbound .handoff-list li:first-child { padding-top: 0; }
#outbound .handoff-list li:last-child { padding-bottom: 0; border-bottom: 0; }
#outbound .handoff-list li::before {
  content: "";
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ff7a00' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.4l3 3 6-6.6'/%3E%3C/svg%3E")
      center / 16px no-repeat,
    #fbf1e7;
}
#outbound .handoff-list strong {
  grid-column: 2;
  display: block;
  color: var(--rc-ink);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}
#outbound .handoff-list span {
  grid-column: 2;
  display: block;
  margin-top: 0;
  color: var(--rc-ink-2);
  font-size: 17px;
  line-height: 1.5;
}

@media (max-width: 960px) {
  #outbound #security .security-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  #outbound #security .security-grid > div:first-child { max-width: 640px; }
  #outbound .outbound-handoff .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: start; }
}
@media (max-width: 620px) {
  #outbound #security .security-grid { gap: 32px; }
  #outbound #security .rc-air-stage { padding: 28px 16px; border-radius: var(--rc-radius-lg); }
  #outbound #security .security-demo.air-chat { border-radius: var(--rc-radius-md) !important; box-shadow: 0 0 0 6px #ffffff73, var(--rc-shadow-lift) !important; }
  #outbound #security .air-chat-agent p,
  #outbound #security .air-chat .air-chat-customer p { font-size: 16px; }
  #outbound #security .air-chat .sensitive { font-size: 15px; }
  #outbound .outbound-handoff .wrap { padding: 28px 22px 30px; gap: 28px; }
  #outbound .outbound-handoff h3 br { display: none; }
  #outbound .handoff-list li { column-gap: 14px; padding: 18px 0; }
  #outbound .handoff-list strong { font-size: 18px; }
  #outbound .handoff-list span { font-size: 16px; }
}
@media (max-width: 360px) {
  #outbound #security .rc-air-stage { padding: 22px 12px; }
  #outbound #security .air-chat .air-chat-header,
  #outbound #security .air-chat-conversation,
  #outbound #security .air-chat-protection { padding-inline: 14px; }
  #outbound #security .air-chat-brand img { width: 108px; }
  #outbound #security .air-chat .sensitive { font-size: 14px; padding-inline: 7px 8px; gap: 5px; }
  #outbound .outbound-handoff .wrap { padding: 24px 18px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) #outbound #security .air-chat .sensitive,
  html:not([data-motion="full"]) #outbound #security .air-chat .signal-dot {
    transition: none;
    animation: none;
  }
}
@media (forced-colors: active) {
  #outbound #security .air-chat .sensitive { border: 1px solid CanvasText; }
  #outbound #security .air-chat .sensitive::before,
  #outbound #security .air-chat .signal-dot { background: CanvasText; }
  #outbound .outbound-handoff .wrap { border: 1px solid CanvasText; }
}
