/* Buttons of the website in the style of the app (UAT-313): every button straight with a small radius, in ordinary
   letters; the main one orange with black text, the others with a thin line. Loaded after the styles of each page,
   so it wins over the older button rules there. */
.btn, .btn-o, .btn-l, .btn-g {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px !important; background: none !important; border: 0 !important; border-radius: 4px;
  clip-path: none !important; font-family: 'Source Sans 3', Arial, sans-serif; font-weight: 700 !important; font-size: 16px !important;
  letter-spacing: 0; text-transform: none; text-decoration: none;
}
.btn::before, .btn-o::before, .btn-l::before, .btn-g::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 4px; background: #E36A31; border: 1px solid transparent;
}
/* the main button: orange with black text */
.btn, a.btn, .btn-o, a.btn-o { color: #151413 !important; }
.btn:hover::before, .btn-o:hover::before { background: #EB8456; }
/* on a light background: white with a thin line */
.btn-l, a.btn-l, .dark a.btn-l { color: #151413 !important; }
.btn-l::before { background: #FFFFFF; border-color: #B9B3AC; }
.btn-l:hover::before { background: #F1EEEB; }
/* on a dark background: a light line */
.btn-g, a.btn-g, .btn.line, a.btn.line { color: #F4F3F2 !important; }
.btn-g::before, .btn.line::before { background: transparent; border-color: #8C8680; }
.btn-g:hover::before, .btn.line:hover::before { background: #2A2826; }
.btn:focus-visible, .btn-o:focus-visible, .btn-l:focus-visible, .btn-g:focus-visible { outline: 2px solid #E36A31; outline-offset: 3px; }
:lang(ar) :is(.btn, .btn-o, .btn-l, .btn-g), :lang(hi) :is(.btn, .btn-o, .btn-l, .btn-g),
:lang(zh) :is(.btn, .btn-o, .btn-l, .btn-g), :lang(ja) :is(.btn, .btn-o, .btn-l, .btn-g) {
  font-family: inherit; font-size: 15px !important;
}
@media (prefers-reduced-motion: no-preference) {
  .btn::before, .btn-o::before, .btn-l::before, .btn-g::before { transition: background .12s; }
}

/* ===== House style layer (UAT-312, UAT-314) =====
   The pages are built from designs with inline styles; this layer takes out what looks generated, on every page and
   in every language at once, without changing the texts (so no translation changes):
   no orange labels in capitals above sections (2A), no capitals elsewhere (8B), no slanted shapes (3), no rotated
   orange blocks in the corners (6), no coloured stripe on top of cards (1B), headings in one colour (5A). */
span[style^="font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase"] { display: none !important; }
[style*="text-transform: uppercase"] { text-transform: none !important; letter-spacing: 0 !important; }
[style*="clip-path"] { clip-path: none !important; border-radius: 4px; }
[style*="rotate(28deg)"] { display: none !important; }
[style*="border-top: 4px solid #E36A31"], [style*="border-top: 5px solid #E36A31"] { border-top: 0 !important; border-radius: 6px; }
:is(h1, h2, h3) span[style*="#E36A31"] { color: inherit !important; }
/* the label above the main heading stays, as a plain label in the colours of the main button */
span[style^="align-self: flex-start; font-size: 14px; font-weight: 700"] { background: #E36A31 !important; color: #151413 !important; font-size: 15px !important; }
/* the same for the pages with their own class names (help, guides, product pages, legal pages) */
.eyebrow, .feat .k { display: none !important; }
.brand small, .tag, .toc p, th, table.cmp tr.grp td { text-transform: none !important; letter-spacing: 0 !important; }
.tag { clip-path: none !important; border-radius: 4px; color: #151413 !important; background: #E36A31 !important; }
.num { clip-path: none !important; border-radius: 6px; }
/* hero: the product on a large orange block instead of the rotated shape (6B); see below */
.note, .demo .sum, .trust div, .dl { border-left: 1px solid var(--line, #D6D1CB) !important; border-radius: 6px; }
.note { border: 1px solid var(--line, #D6D1CB) !important; }
.flow div, table.cmp thead th.hl { border-top: 0 !important; }
.flow div { border-radius: 6px; }
.toc ol, .toc a { border-left: 0 !important; }
.toc a { padding-left: 0 !important; margin-left: 0 !important; }
.toc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mono, .store { clip-path: none !important; border-radius: 4px; }

/* ===== The product in view (UAT-314, 6B) =====
   Page headers show a real screenshot of the app (fictional data) on a large orange block at the right, instead of
   the rotated orange square. Which screenshot follows from the page (its canonical link, so in every language). */
.hero::after {
  content: ""; display: none; transform: none !important; opacity: 1 !important;
  position: absolute; top: 0; bottom: 0; right: 0 !important; left: auto; width: 40%; height: auto !important;
  background: #E36A31 var(--hero-shot, url(/img/hero/dashboard.jpg)) no-repeat 48px 56px / 760px auto;
}
@media (min-width: 1100px) {
  .hero::after { display: block; }
  .hero .wrap > * { max-width: 56%; }
  :lang(ar) .hero::after { right: auto !important; left: 0; background-position: right 48px top 56px; }
}
html:has(link[rel=canonical][href*="/ai/"]) .hero { --hero-shot: url(/img/hero/ai.jpg); }
html:has(link[rel=canonical][href*="/pricing/"]) .hero, html:has(link[rel=canonical][href*="/compare/"]) .hero { --hero-shot: url(/img/hero/report.jpg); }
html:has(link[rel=canonical][href*="/integrations/"]) .hero, html:has(link[rel=canonical][href*="/help/"]) .hero { --hero-shot: url(/img/hero/issues.jpg); }
html:has(link[rel=canonical][href*="/dynamics-365/"]) .hero { --hero-shot: url(/img/hero/dashboard.jpg); }
html:has(link[rel=canonical][href*="/salesforce/"]) .hero { --hero-shot: url(/img/hero/release.jpg); }
html:has(link[rel=canonical][href*="/privacy/"]) .hero::after, html:has(link[rel=canonical][href*="/accessibility/"]) .hero::after,
html:has(link[rel=canonical][href*="/procurement/"]) .hero::after { display: none; }

/* ===== One large and two small (UAT-314, 4B) ===== */
@media (min-width: 900px) {
  /* Situation, Complication, Question: the question is the large one */
  div[style*="minmax(260px, 1fr)"]:has(> div:nth-child(3):last-child) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) !important; }
  div[style*="minmax(260px, 1fr)"]:has(> div:nth-child(3):last-child) > div:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; font-size: 1.15em; justify-content: center; }
  /* three things that change, and three cards on the product pages: the first is the large one */
  div[style*="minmax(300px, 1fr)"]:has(> article:nth-child(3):last-child),
  .cards:has(> :nth-child(3):last-child) { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) !important; }
  .cards:has(> :nth-child(3):last-child) > :first-child { background: #FBEFE7; }
}
div[style*="minmax(300px, 1fr)"] > article:first-child > div[style*="background: #151413"] { background: #E36A31 !important; color: #151413 !important; }
div[style*="minmax(300px, 1fr)"] > article:first-child > div[style*="background: #151413"] span { color: #151413 !important; }

/* UAT round 11: the footer on one line on a wide screen; the fox in a page heading */
@media (min-width: 1180px) {
  footer > div { max-width: 1240px !important; gap: 8px 16px !important; }
  footer nav { gap: 8px 16px !important; flex-wrap: nowrap !important; }
  footer, footer a, footer span { font-size: 13px !important; }
  footer a { white-space: nowrap; }
}
h1 .h1-fox { height: 1.3em; width: 1.3em; vertical-align: -.3em; margin-inline-end: .02em; margin-inline-start: -.12em; }
/* the fox in front of Fennec AI in the pricing tables (comment on test 367) */
table.cmp tr.grp.fx td span::before, tr[data-addon="ai"] > td:first-child > b::before, tr[data-addon="ai_uat"] > td:first-child > b::before, tr[data-addon="ai_extra"] > td:first-child > b::before {
  content: ""; display: inline-block; width: 1.5em; height: 1.5em; margin-inline-end: .35em; vertical-align: -.4em; background: url(/img/fennec/fennec.svg) center / contain no-repeat; }
