/* Messaging and Events: the figures on its slides. Terminals, JSON and the
   shared colours are in ../iam.css. */

:root { --sqs: #b0084d; --sns: #e7157b; --eb: #b0084d; --ok: #1d8102; --no: #d13212; --s3c: #3f8624; }

.ic { width: 34px; height: 34px; flex: none; vertical-align: middle; }
.ic.sm { width: 20px; height: 20px; }
.cap { display: block; font-size: 13px; color: var(--sv-ink2); margin: 4px 0; }
.sv-fig { overflow: auto; }
.term.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.json.wrapj { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }

[data-sec="intro"] { --sec: #334155; }
[data-sec="decouple"] { --sec: #0369a1; }
[data-sec="sqs"] { --sec: #b0084d; }
[data-sec="sns"] { --sec: #be185d; }
[data-sec="eb"] { --sec: #7c3aed; }
[data-sec="more"] { --sec: #b45309; }

/* Tables. */
.tbl { border-collapse: collapse; background: #fff; border: 1px solid var(--sv-line); font-size: 14px; }
.tbl th, .tbl td { padding: 7px 11px; border-top: 1px solid #eef0f3; text-align: left; vertical-align: top; }
.tbl tr:first-child th { border-top: 0; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--sv-ink2); }
.tbl tr:not(:first-child) th { font-weight: 700; white-space: nowrap; }
.tbl code { font: 13px var(--mono); }
.tbl.wst, .tbl.kvt, .tbl.est, .tbl.fft { width: 100%; }

/* Exam questions. */
.pe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pe-q { display: grid; grid-template-columns: 1.6em minmax(0, 1fr); gap: 8px; background: #fffbea; border: 1px solid #e8d48a; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.pe-q > b { font-size: 16px; color: #8a6500; }
.pe-q p { margin: 0 0 6px; }
.pe-a, .pe-w { display: grid; grid-template-columns: 1.2em minmax(0, 1fr); gap: 4px; font-size: 13px; }
.pe-a { font-weight: 600; color: #1b5e05; }
.pe-w { color: var(--sv-ink2); }
.pe-q:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Boxes and arrows. */
.bx { background: #fff; border: 2px solid var(--c, var(--sv-line)); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; font-size: 13.5px; min-width: 0; }
.bx small { font-size: 12px; color: var(--sv-ink2); overflow-wrap: anywhere; }
.bx.plain { --c: var(--sv-line); border-width: 1px; }
.bx.s3 { --c: var(--s3c); background: #f6fbf3; } .bx.sns { --c: var(--sns); background: #fdf2f8; } .bx.sqs { --c: var(--sqs); background: #fdf2f6; }
.bx.asg { --c: #ed7100; background: #fff7ef; } .bx.mq { --c: #b0084d; } .bx.standby { border-style: dashed; opacity: .8; }
.bx.down { position: relative; } .bx.down::after { content: "✕"; position: absolute; top: -10px; right: -8px; color: var(--no); font-weight: 700; font-size: 18px; }
.bx .em { font-size: 30px; line-height: 1; }
.ar { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--sv-ink2); text-align: center; }
.ar i { font-style: normal; font-size: 24px; line-height: 1; color: #545b64; }
.ar.fan i { font-size: 30px; color: var(--sns); }
.msg { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px; border-radius: 4px; background: #fff; border: 1.5px solid var(--sqs); font: 600 12px var(--mono); color: var(--sqs); }
.msg.inflight { border-style: dashed; opacity: .6; } .msg.poison { font-size: 18px; height: 30px; min-width: 34px; }

/* The pipeline. */
.pipe { display: grid; grid-template-columns: minmax(70px, .5fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 2.4fr); gap: 8px; align-items: center; }
.pp-col.two { display: flex; flex-direction: column; gap: 12px; }
.pp-q { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.pp-q .ar2 { font-style: normal; color: #545b64; }
.pp-dlq { grid-column: 1 / -1; font-size: 12.5px; color: var(--sqs); display: flex; align-items: center; gap: 4px; }
.pp-legend { display: flex; gap: 20px; margin-top: 14px; font-size: 13px; color: var(--sv-ink2); }

/* Synchronous and asynchronous. */
.sas { display: flex; flex-direction: column; gap: 14px; }
.sa { background: #fff; border: 1px solid var(--sv-line); border-radius: 10px; padding: 10px 12px; }
.sa-t { display: block; margin-bottom: 6px; }
.sa-row { display: flex; align-items: center; gap: 10px; }
.sa-row .bx { flex: 0 0 140px; }
.ar.both { flex-direction: column; } .ar.both i { color: #b45309; }
.sa-notes { display: flex; gap: 20px; margin-top: 8px; font-size: 13px; font-weight: 600; }
.good { color: var(--ok); } .bad { color: var(--no); }

/* Charts. */
.dcd, .vd, .sfd { width: 100%; max-height: 100%; }
.b-t { font-size: 13.5px; font-weight: 600; fill: #16191f; }
.b-axis { stroke: #c6ccd2; stroke-width: 1.5; }
.b-l { font-size: 12.5px; fill: #545b64; }
.b-l.good { fill: var(--ok); font-weight: 600; } .b-l.bad { fill: var(--no); font-weight: 600; } .b-l.warn { fill: #b45309; font-weight: 600; }
.dc-in { fill: none; stroke: #ed7100; stroke-width: 2.5; }
.dc-two { fill: #9fc3e6; opacity: .8; } .dc-sc { fill: #0369a1; opacity: .85; }

/* Scaling on the backlog. */
.mm { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.mm-m { background: #fff; border: 1px solid var(--sv-line); border-radius: 8px; padding: 6px 10px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.mm-m .k { font: 700 13px var(--mono); color: #fff; background: #0369a1; border-radius: 4px; padding: 1px 7px; }
.mm-m.e { border: 2px solid #0369a1; }
.tbl.sct td:nth-child(3) b { color: #0369a1; }
.up { color: #b45309; font-weight: 600; } .dn { color: var(--ok); font-weight: 600; }

/* SQS. */
.sq { display: grid; grid-template-columns: minmax(0, .8fr) auto minmax(0, 1.6fr) auto minmax(0, .8fr); gap: 8px; align-items: center; }
.sq-q { background: #fdf2f6; border: 2px solid var(--sqs); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.sq-q small { color: var(--sv-ink2); font-size: 12px; }
.msgs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.sq-del { text-align: right; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--sqs); }
.v-r { fill: var(--sqs); } .v-r.b { fill: #7c3aed; }
.v-h { fill: #fbe1ec; stroke: var(--sqs); } .v-h.ghost { fill: none; stroke-dasharray: 4 3; opacity: .5; }
.v-del { stroke: var(--ok); stroke-width: 3; } .v-back { stroke: #b45309; stroke-width: 3; }
.lp { display: flex; flex-direction: column; gap: 16px; }
.lp > div { background: #fff; border: 1px solid var(--sv-line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.lp small { color: var(--sv-ink2); font-size: 13px; }
.lp-row { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; }
.lp-row.long { grid-template-columns: repeat(4, 1fr); }
.lp i { display: block; height: 22px; border-radius: 3px; }
.lp i.e { background: #eef0f3; border: 1px solid #c6ccd2; } .lp i.m { background: var(--sqs); }
.lp-leg { flex-direction: row !important; gap: 20px !important; border: 0 !important; background: none !important; font-size: 13px; }
.lp-leg span { display: flex; align-items: center; gap: 6px; } .lp-leg i { width: 22px; height: 14px; }
.dl { display: grid; grid-template-columns: minmax(0, 1.6fr) auto minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 12px; }
.dl-src, .dl-dlq { border: 2px solid var(--sqs); border-radius: 12px; padding: 10px; background: #fdf2f6; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dl-dlq { border-color: #545b64; background: #f2f3f3; }
.dl-steps { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.dl-s { font-size: 12px; background: #fff; border: 1px solid var(--sv-line); border-radius: 6px; padding: 2px 6px; }
.dl-s b { margin-right: 4px; } .dl-s.bad { color: var(--no); }
.json .hl.k { --c: #fdf2f6; --cc: var(--sqs); }
.grp { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.grp-r { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.grp-r code { font: 12.5px var(--mono); min-width: 13em; }
.grp-r i { font-style: normal; color: var(--sv-ink2); }

/* SNS. */
.sn { display: grid; grid-template-columns: minmax(0, .9fr) auto minmax(0, .9fr) auto minmax(0, 1.2fr); gap: 8px; align-items: center; }
.subs { display: flex; flex-direction: column; gap: 5px; }
.subs > small { font-size: 12.5px; font-weight: 600; color: var(--sv-ink2); }
.sub { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--sns); border-radius: 6px; padding: 4px 8px; font-size: 13.5px; }
.flt { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
.fm, .fs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid var(--sv-line); border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; font-size: 13.5px; }
.fm > b { color: var(--sns); } .fm code, .fs code { font: 12.5px var(--mono); }
.fs > span { margin-left: auto; display: flex; gap: 4px; }
.fs em { font-style: normal; font: 700 12px var(--mono); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.fs em.y { background: var(--sns); color: #fff; } .fs em.n { background: #eef0f3; color: #aab3bd; text-decoration: line-through; }
.fo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 2.2fr); gap: 8px; align-items: center; }
.fo-ls { display: flex; flex-direction: column; gap: 12px; }
.fo-l { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.fo-l > i { font-style: normal; color: #545b64; }

/* EventBridge. */
.ebw { display: grid; grid-template-columns: minmax(0, .7fr) auto minmax(0, 2fr); gap: 10px; align-items: center; }
.srcs { display: flex; flex-direction: column; gap: 6px; }
.srcs > small, .rules > small { font-size: 12.5px; font-weight: 600; color: var(--sv-ink2); }
.src { background: #fff; border: 1px solid var(--sv-line); border-radius: 8px; padding: 6px 10px; font-size: 13.5px; }
.bus { border: 2px solid #7c3aed; background: #f6f1ff; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.bus > b { display: flex; align-items: center; gap: 8px; }
.rules { display: flex; flex-direction: column; gap: 6px; }
.rule { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid #c4b5fd; border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.rule code { font: 12px var(--mono); } .rule > i { font-style: normal; color: var(--sv-ink2); }
.tg { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--sv-line); border-radius: 6px; padding: 1px 6px; font-size: 12.5px; }
.epw { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
.epw .json { font-size: 12px; margin: 0; }
.epw .json .hl.k { --c: #f6f1ff; --cc: #7c3aed; }
.ep-m { font-size: 13px; font-weight: 600; color: #7c3aed; }
.schw { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.sch { background: #fff; border: 1px solid #c4b5fd; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.sch b { display: flex; align-items: center; gap: 6px; } .sch code { font: 13px var(--mono); } .sch small { color: var(--sv-ink2); font-size: 12px; }

/* Kinesis, MQ, Step Functions. */
.kn { display: grid; grid-template-columns: minmax(0, .7fr) auto minmax(0, 1.8fr) auto minmax(0, .9fr); gap: 8px; align-items: center; }
.ks { border: 2px solid #8c4fff; background: #f6f1ff; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.ks > b { font-size: 14px; }
.sh small { font-size: 12px; font-weight: 600; color: var(--sv-ink2); }
.recs { display: flex; gap: 3px; flex-wrap: wrap; }
.recs span { font: 11.5px var(--mono); background: #fff; border: 1px solid #c4b5fd; border-radius: 4px; padding: 2px 5px; }
.kc { display: flex; flex-direction: column; gap: 6px; } .kc > small { font-size: 12px; color: var(--sv-ink2); font-weight: 600; }
.mqw { display: grid; grid-template-columns: minmax(0, .8fr) auto minmax(0, 2fr); gap: 10px; align-items: center; }
.mq-vpc { position: relative; border: 2px solid #7d3c98; border-radius: 12px; padding: 26px 10px 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mq-vpc > small { position: absolute; top: 5px; left: 12px; font-size: 12.5px; font-weight: 700; color: #7d3c98; }
.mq-az { border: 2px dashed #0972d3; border-radius: 10px; padding: 22px 8px 8px; position: relative; }
.mq-az > small { position: absolute; top: 4px; left: 10px; font-size: 12px; color: #0972d3; font-weight: 600; }
.sf-s { fill: #fff; stroke: #b45309; stroke-width: 2; } .sf-s.end { fill: #fdf0e3; } .sf-s.fail { fill: #fff8f6; stroke: var(--no); }
.sf-t { font-size: 13px; font-weight: 600; }
.sf-a { fill: none; stroke: #545b64; stroke-width: 2; }
.sf-par { fill: #fffbea; stroke: #b45309; stroke-dasharray: 6 4; }
.sf-l { font-size: 12.5px; font-weight: 600; fill: #b45309; } .sf-l.r { font-weight: 400; fill: #545b64; }

@media (max-width: 860px) {
  .pe, .pipe, .sq, .sn, .fo, .ebw, .epw, .schw, .kn, .mqw, .dl, .flt { grid-template-columns: 1fr; }
  .ar i { transform: rotate(90deg); }
  .sa-row { flex-wrap: wrap; } .sa-row .bx { flex: 1 1 120px; }
  .lp-row { grid-template-columns: repeat(15, 1fr); }
  .tbl { font-size: 13px; display: block; overflow-x: auto; }
}
