/* SQL 101 additions on top of deck.css, which is shared with Software Development 101. */

/* Links that look like buttons */
.link-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; background: var(--raised); color: var(--paper); font: 600 25px var(--sans); text-decoration: none; }
.pill:hover { background: #4e5254; }
.pill.primary { background: var(--packet); color: var(--ink); }
.pill.primary:hover { background: #ffd58f; }
.pill.big { padding: 18px 30px; font-size: 30px; }
.reveal a { color: var(--packet); }
.reveal .pill { color: var(--paper); }
.reveal .pill.primary { color: var(--ink); }

/* Opening */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 640px; gap: 64px; align-items: center; height: 100%; }
.sql-hero .deck-name { margin-bottom: 14px; color: var(--muted); font-size: 28px; font-weight: 600; }
.reveal .sql-hero h1 { margin-bottom: 26px; font-size: 84px; }
.reveal .sql-hero .lede { font-size: 31px; }

/* A query with a Run button and its live result */
.sql-run { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; min-width: 0; }
.reveal .sql-run pre { font-size: 25px; line-height: 1.4; }
.run-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 52px; }
.run-button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border: 0; border-radius: 10px; background: var(--client); color: var(--ink); font: 700 24px var(--sans); cursor: pointer; }
.run-button:hover { background: #b9d47a; }
.run-button:disabled { cursor: progress; opacity: .7; }
.run-status { color: var(--muted); font-size: 19px; line-height: 1.3; }
.run-result { min-width: 0; overflow: auto; }
.run-result:empty { display: none; }
.reveal .result-table { width: auto; min-width: 60%; font-size: 21px; }
.reveal .result-table th, .reveal .result-table td { padding: 6px 14px; white-space: nowrap; }
.reveal .result-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.reveal .result-table td.null { color: var(--wire); font-style: italic; }
.reveal .result-table td.more { color: var(--muted); font-family: var(--sans); font-style: italic; }
.reveal .run-note { margin-top: 8px; color: var(--muted); font-size: 20px; }
.reveal .run-error { padding: 12px 16px; border: 1px solid #6b3d4a; border-radius: 10px; background: #3a2a30; color: var(--paper); font: 400 20px/1.4 var(--mono); white-space: pre-wrap; }

.run-split { display: grid; grid-template-columns: 760px minmax(0, 1fr); gap: 48px; align-items: start; }
.reveal .run-split .points { margin-top: 0; }
.reveal .run-split .points li { font-size: 28px; line-height: 1.3; }
.run-split.wide-code { grid-template-columns: 900px minmax(0, 1fr); }
.reveal .run-split.wide-code pre { font-size: 23px; }
.reveal .run-result.tall .result-table { font-size: 19px; }
.reveal .run-result.tall .result-table th, .reveal .run-result.tall .result-table td { padding: 3px 14px; }
.reveal .wide-run { margin-top: 26px; }
.reveal .wide-run pre { font-size: 26px; }
.hero-run .run-result { min-height: 120px; }
.reveal .insert-run pre { font-size: 22px; line-height: 1.34; }

/* SELECT, FROM, WHERE as one sentence */
.reveal .flow.sentence > div { gap: 6px; padding: 18px 24px; }
.flow.sentence code { color: var(--packet); font: 600 30px var(--mono); }
.flow.sentence b { font-size: 28px; }
.flow.sentence span { color: var(--muted); font-size: 24px; }

/* Four role cards */
.reveal .roles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.reveal .roles.four li { padding: 24px; font-size: 25px; }
.reveal .roles.four b { font-size: 30px; }
.roles.four li span + span { color: var(--paper); }
.reveal .roles.tools li span { color: var(--muted); }
.roles .devicon-dbeaver-plain { color: #8c6c4b; }
.roles .devicon-datagrip-plain { color: #22d88f; }
.roles .devicon-postgresql-plain { color: var(--dev); }

/* The shop's tables */
.schema { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tbl { padding: 18px 20px 20px; border-radius: 14px; background: var(--panel); }
.reveal .tbl h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--data); font: 600 25px var(--mono); }
.tbl h3 i { font-size: 28px; }
.tbl h3 span { margin-left: auto; color: var(--muted); font: 400 18px var(--sans); }
.reveal .tbl ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font: 400 20px var(--mono); }
.tbl li.pk { color: var(--packet); font-weight: 600; }
.tbl li.pk::before { content: "key "; color: var(--wire); font-weight: 400; }
.tbl li.fk { color: var(--client); }
.reveal .points.compact { margin-top: 30px; gap: 14px; }
.reveal .points.compact li { font-size: 27px; }
.reveal .points code { font: 400 .9em var(--mono); color: var(--packet); }

/* Operators */
.reveal .vocab.ops { font-size: 25px; }
.reveal .vocab.ops th { width: 230px; padding: 8px 14px; font-size: 24px; color: var(--packet); }
.reveal .vocab.ops td { padding: 8px 14px; }

/* Aggregates */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stats > div { display: grid; align-content: start; gap: 6px; padding: 20px 24px; border-radius: 14px; background: var(--raised); }
.stats b { color: var(--packet); font-size: 50px; line-height: 1.05; font-weight: 800; }
.stats span { color: var(--muted); font-size: 23px; line-height: 1.25; }
.stats code { margin-top: 6px; color: var(--paper); font: 400 18px var(--mono); }

/* UPDATE and DELETE */
.danger { padding: 22px 26px; border: 2px solid var(--reply); border-radius: 14px; }
.reveal .danger h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--reply); font-size: 28px; }
.reveal .danger pre { font-size: 24px; }
.reveal .danger p { margin-top: 14px; font-size: 25px; line-height: 1.3; }
.reveal .danger .habit { color: var(--muted); }
.reveal .danger .habit b { color: var(--paper); }

/* DDL */
.ddl { display: grid; grid-template-columns: 1.25fr 1fr .8fr; gap: 20px; align-items: start; }
.reveal .ddl h3 { margin: 0 0 10px; color: var(--packet); font: 600 28px var(--mono); }
.reveal .ddl pre { font-size: 21px; line-height: 1.35; }
.reveal .ddl p { margin-top: 10px; color: var(--muted); font-size: 24px; }
.reveal .ddl + .wide-run pre { font-size: 22px; }

/* Cheat sheet */
.reveal .vocab.cheat { font-size: 27px; }
.reveal .vocab.cheat th { width: 520px; padding: 10px 16px; color: var(--packet); font-size: 25px; }
.reveal .vocab.cheat td { padding: 10px 16px; }

/* Your turn */
.turn { display: grid; grid-template-columns: minmax(0, 1fr) 600px; gap: 48px; align-items: start; }
.reveal .exercise-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: ex; }
.exercise-list li { display: grid; grid-template-columns: 44px 84px 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 14px 20px; border-radius: 14px; background: var(--raised); counter-increment: ex; }
.exercise-list li::before { content: counter(ex); grid-row: span 2; align-self: center; color: var(--muted); font: 600 30px var(--mono); }
.exercise-list .stars { grid-row: span 2; align-self: center; color: var(--packet); font-size: 26px; letter-spacing: 2px; }
.exercise-list b { font-size: 29px; line-height: 1.2; }
.exercise-list span:last-child { color: var(--muted); font: 400 20px var(--mono); }
.reveal .turn-side .points { margin-top: 30px; }
.reveal .turn-side .points li { font-size: 25px; line-height: 1.3; }

/* Closing */
.reveal .closing-sql { width: auto; margin-bottom: 30px; font-size: 40px; }
.reveal .closing-sql code { display: inline-block; }

html.phone .hero-grid, html.phone .run-split, html.phone .run-split.wide-code, html.phone .turn, html.phone .ddl { grid-template-columns: minmax(0, 1fr) !important; gap: 26px; height: auto; }
html.phone .schema, html.phone .reveal .roles.four, html.phone .stats { grid-template-columns: minmax(0, 1fr) 1fr !important; }
html.phone .reveal .sql-hero h1 { font-size: 58px; }
html.phone .reveal .vocab.cheat th { width: auto; white-space: normal; }
html.phone .exercise-list li { grid-template-columns: 36px 1fr; }
html.phone .exercise-list .stars { grid-row: auto; }
html.phone .flow.sentence { flex-direction: column; }
html.phone .flow.sentence > i { transform: rotate(90deg); }
.printing .run-bar, .printing .link-row { display: none; }
