/* ==========================================================================
   db-components.css · Daelim Belefic child theme
   --------------------------------------------------------------------------
   Small visual helpers that Divi presets cannot store: angled "wedge" ends,
   the two-tone underline, the red list dot, the lightning-bolt image clip,
   icon masks, the custom select chevron and the square checkbox.

   How to use in Divi 5
   - Every class here starts with "db-". Add it to a module, Group, Row or
     Section in Advanced > Attributes > CSS Class, next to the element's
     preset (the preset supplies type, colour and padding; these classes add
     only the shape).
   - Values come from the design tokens (var(--c-red), var(--sp-12), ...).
     They must exist as CSS custom properties on :root: either alias Divi's
     Design Variables or load tokens.css as a bridge (see the export README).
   - Icons are loaded from ../svg/ relative to this file.
   ========================================================================== */


/* --------------------------------------------------------------------------
   Wedges (angled ends)
   The design's wedge SVGs are all the same right triangle, so each wedge is
   drawn with clip-path on a pseudo-element. The pseudo-element uses
   "background-color: inherit", so it always matches the block's own
   background, including hover colours and the grey wireframe view.
   Each wedge overlaps its block by 1px so no anti-aliased seam shows.
   -------------------------------------------------------------------------- */

/* db-badge: label badge slanted at both ends (an upside-down trapezoid,
   wider at the top). Pair with Text: Badge L / Badge S.
   The slant is a fixed 19.17px wide at every size. */
.db-badge { position: relative; margin-inline: 19.17px; }
.db-badge::before, .db-badge::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 19.17px; background-color: inherit;
}
.db-badge::before { right: calc(100% - 1px); width: calc(19.17px + 1px); clip-path: polygon(0 0, 100% 0, 100% 100%, calc(100% - 1px) 100%); }
.db-badge::after { left: calc(100% - 1px); width: calc(19.17px + 1px); clip-path: polygon(0 0, 100% 0, 1px 100%, 0 100%); }

/* db-tagbar: red tag bar with a wedge on the right only (22.05px wide).
   Pair with Text: Tag Bar. */
.db-tagbar { position: relative; margin-right: 22.05px; }
.db-tagbar::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(100% - 1px); width: calc(22.05px + 1px); background-color: inherit;
  clip-path: polygon(0 0, 100% 0, 1px 100%, 0 100%);
}
/* hover: the bar extends 24 to the right (Xae, dev tab, 2026-10-25). !important beats the preset's padding in Divi. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .db-tagbar { transition: padding-right var(--dur-base) var(--ease-standard); }
}
@media (hover: hover) {
  .db-tagbar:hover { padding-right: calc(var(--sp-64) + var(--sp-24)) !important; }
}

/* Header wedges: db-wedge-r = white logo block with a "/" slant on its right;
   db-wedge-l = red CTA / call block with a "/" slant on its left.
   24px wide on the 80px header; 19.4px on the 64px header (same angle). */
.db-wedge-r, .db-wedge-l { position: relative; --wedge-w: 24px; }
.db-wedge-r::after, .db-wedge-l::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: calc(var(--wedge-w) + 1px); background-color: inherit; pointer-events: none;
	transition: all .3s ease;
}
.db-wedge-r::after { left: calc(100% - 1px); clip-path: polygon(0 0, 100% 0, 1px 100%, 0 100%); }
.db-wedge-l::before { right: calc(100% - 1px); clip-path: polygon(calc(100% - 1px) 0, 100% 0, 100% 100%, 0 100%); }
@media (max-width: 1279px) { .db-wedge-r, .db-wedge-l { --wedge-w: 19.4px; } }


/* --------------------------------------------------------------------------
   db-ul: two-tone underline under eyebrows and feed headings
   Red line with a blue end segment (50px by default), 2px thick, 12px below
   the text. Modifiers: --block (full width), --feed (175px end segment),
   --white (all white, on dark bands), --red (all red, 100px segment).
   Custom properties: --ul-l (left colour), --ul-r (end colour),
   --ul-rw (end segment width).
   -------------------------------------------------------------------------- */
.db-ul {
  display: inline-block;
  padding-bottom: var(--sp-12);
  background: linear-gradient(90deg, var(--ul-l, var(--c-red)) 0 calc(100% - var(--ul-rw, 50px)), var(--ul-r, var(--c-blue)) 0) left bottom / 100% var(--bw-ul) no-repeat;
}
.db-ul--block { display: block; }
.db-ul--feed { --ul-rw: 175px; }
.db-ul--white { --ul-l: var(--c-white); --ul-r: var(--c-white); }
.db-ul--red { --ul-r: var(--c-red); --ul-rw: 100px; }


/* --------------------------------------------------------------------------
   db-list-dot: bulleted list with a 15px red dot, 24px gap to the text and
   12px between items. Put it on the Text module (or directly on the <ul>).
   The dot is centred on the first line of each item.
   -------------------------------------------------------------------------- */
.db-list-dot ul, ul.db-list-dot { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-12); }
.db-list-dot li { position: relative; padding-left: calc(15px + var(--sp-24)); }
/* links inside a red-dot list (product names on Products Overview) take the list colour, underline on hover */
.db-list-dot a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
.db-list-dot a:hover, .db-list-dot a:focus-visible { color: inherit; text-decoration: underline; }
/* db-list-dot--loose: items 24 apart, a two-line item's title → 12 → line (product Projects / feature lists, dev tab 2026-10-25) */
.db-list-dot--loose ul, ul.db-list-dot--loose { gap: var(--sp-24); }
.db-list-dot--loose li > strong + * { margin-top: var(--sp-12); }
.db-list-dot li::before {
  content: ""; position: absolute; left: 0; top: calc((1lh - 15px) / 2); width: 15px; height: 15px; border-radius: 50%;
  background-color: var(--db-list-dot, var(--c-red));
}
/* On a red card the red dots would vanish, so they turn white (Xae, BugHerd #183, 2026-11-12). This works automatically
   from the card's preset: Card – Red List, Card – Zig Red and Card – Check Red. For any other red box, add the class
   db-on-red to it. Covers both list styles: db-list-dot (15px) and plain Text-module lists (8px). */
:is(.preset--module--divi-group--dbcardred1, .preset--module--divi-group--47c9d24b61, .preset--module--divi-group--94f4bde395, .db-on-red) {
  --db-list-dot: var(--c-white);
}


/* --------------------------------------------------------------------------
   db-focus-y-NN: where a cropped photo (object-fit: cover, e.g. hero photos) is cut. Add to the Image module's CSS
   class: db-focus-y-0 shows the top, -50 the middle (Divi's default), -100 the bottom. About hero uses 75 to show
   more of the office building (client edits sheet, 2026-11-12). Use instead of re-cropping a photo that's used elsewhere.
   -------------------------------------------------------------------------- */
.db-focus-y-0 img { object-position: 50% 0% !important; }
.db-focus-y-25 img { object-position: 50% 25% !important; }
.db-focus-y-50 img { object-position: 50% 50% !important; }
.db-focus-y-75 img { object-position: 50% 75% !important; }
.db-focus-y-100 img { object-position: 50% 100% !important; }

/* --------------------------------------------------------------------------
   db-lightning: clips an image to the lightning-bolt outline used on every
   split-hero (S02) image. Put it on the Image module, with Image: Lightning.
   -------------------------------------------------------------------------- */
.db-lightning { clip-path: polygon(15.6% 0, 100% 0, 100% 100%, 5.95% 100%, 23.37% 47.2%, 0 47.1%); }


/* --------------------------------------------------------------------------
   db-clip-x: for Sections whose decoration bleeds past the screen edge.
   Clips horizontally without creating a scroll container (unlike
   overflow: hidden), so sticky elements and vertical overlaps keep working.
   -------------------------------------------------------------------------- */
.db-clip-x { overflow-x: clip; }


/* --------------------------------------------------------------------------
   Icon masks for icon-only <button>/<a> elements
   The icon is a pseudo-element painted in currentColor through an SVG mask,
   so the element itself stays childless with a 44px hit area (give it an
   aria-label). db-icon-chevron draws before the label, -after after it.
   -------------------------------------------------------------------------- */
.db-icon-chevron::before, .db-icon-chevron-after::after, .db-icon-menu::before, .db-icon-close::before {
  content: ""; display: block; flex: none; background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
/* 11.33 x 6.67 = the 9.3 x 4.7 chevron plus its 1px stroke overflow */
.db-icon-chevron::before, .db-icon-chevron-after::after { --icon: url("../svg/nav-chevron.svg"); width: 11.33px; height: 6.67px; }
.db-icon-menu::before { --icon: url("../svg/icon-menu.svg"); width: 24px; height: 18px; }
.db-icon-close::before { --icon: url("../svg/icon-close.svg"); width: 20px; height: 20px; }
.db-icon-phone { width: 24px; height: 24px; }


/* --------------------------------------------------------------------------
   db-meta-sep: puts a "·" between inline meta items (date · location · type).
   Put it on the container; each item is a direct child element.
   -------------------------------------------------------------------------- */
.db-meta-sep > * + *::before { content: "·"; margin-inline: 0.5em; }


/* --------------------------------------------------------------------------
   db-anchor: in-page link targets land below the sticky header instead of
   under it. Applied to every element with an id as well.
   -------------------------------------------------------------------------- */
.db-anchor, [id] { scroll-margin-top: calc(var(--h-header) + 16px); }


/* --------------------------------------------------------------------------
   db-select: native <select> with the design's chevron. Wrap the select in
   an element with this class; the chevron turns red while the field has
   focus. The field itself uses the Form – Field preset.
   select-chevron.svg is drawn as a ">" (12 x 19); it is rotated 90° so it
   points down, as in the design.
   -------------------------------------------------------------------------- */
.db-select { position: relative; display: block; }
.db-select select { appearance: none; -webkit-appearance: none; padding-right: calc(var(--sp-16) * 2 + 12px); background: var(--c-white); }
.db-select::after {
  content: ""; position: absolute; right: var(--sp-16); bottom: calc(var(--h-field) / 2); translate: 0 50%; rotate: 90deg; width: 12px; height: 19px;
  background-color: var(--c-grey-300); pointer-events: none; transition: background-color var(--dur-fast) var(--ease-standard);
  -webkit-mask: url("../svg/select-chevron.svg") center / contain no-repeat; mask: url("../svg/select-chevron.svg") center / contain no-repeat;
}
.db-select:focus-within::after { background-color: var(--c-red); }


/* --------------------------------------------------------------------------
   db-check: 24px square checkbox with a 1px black border; blue with a white
   tick when checked. Put the class on the <input type="checkbox"> itself.
   -------------------------------------------------------------------------- */
input[type="checkbox"].db-check {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; width: 24px; height: 24px; display: grid; place-content: center;
  border: var(--bw-hair) solid var(--c-black); border-radius: var(--r-0); background: var(--c-white); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
}
input[type="checkbox"].db-check:hover { border-color: var(--c-blue); }
input[type="checkbox"].db-check:checked { background-color: var(--c-blue); border-color: var(--c-blue); }
input[type="checkbox"].db-check:checked::before {
  content: ""; width: 14px; height: 10px; border: solid var(--c-white); border-width: 0 0 2px 2px; rotate: -45deg; translate: 0 -2px;
}

/* ---- video pop-up (js/db-video.js; Xae, BugHerd #77): a native <dialog> in the top layer, the video at up to 1280 wide,
   16:9, on a dark backdrop; the × sits above the video's top-right corner ---- */
.db-video-modal { width: min(1280px, 100vw - 2 * var(--gutter)); max-width: none; max-height: none; padding: 0; border: 0; overflow: visible; background: transparent; }
.db-video-modal::backdrop { background: rgb(0 0 0 / .85); }
.db-video-modal__video { display: block; width: 100%; max-height: calc(100vh - 120px); aspect-ratio: 16 / 9; background: var(--c-black); }
.db-video-modal__close {
  position: absolute; right: 0; bottom: calc(100% + 8px); display: grid; place-items: center; width: 44px; height: 44px;
  padding: 0; border: 0; background: none; color: var(--c-white); cursor: pointer;
}
.db-video-modal__close::before { content: ""; width: 24px; height: 24px; background-color: currentColor;
  -webkit-mask: url("../svg/icon-close.svg") center / contain no-repeat; mask: url("../svg/icon-close.svg") center / contain no-repeat; }
.db-video-modal__close:hover { color: var(--c-red); }
.db-video-modal__close:focus-visible { outline: 2px solid var(--c-focus-on-dark); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Running text (Text modules, FAQ answers): plain lists, tables, sup/sub
   (Xae, BugHerd #123 #124 #126, 2026-11-05)
   -------------------------------------------------------------------------- */
/* plain bulleted lists get small red dots (8px; the blue-band db-list-dot lists keep their 15px dots) */
:is(.et_pb_text_inner, .et_pb_toggle_content) ul:not([class]):not(.db-list-dot *) { list-style: none; padding-left: 0; }
:is(.et_pb_text_inner, .et_pb_toggle_content) ul:not([class]):not(.db-list-dot *) > li { position: relative; padding-left: var(--sp-24); }
:is(.et_pb_text_inner, .et_pb_toggle_content) ul:not([class]):not(.db-list-dot *) > li::before {
  content: ""; position: absolute; left: 2px; top: calc((1lh - 8px) / 2); width: 8px; height: 8px; border-radius: 50%; background-color: var(--db-list-dot, var(--c-red)); }

/* tables: light grey lines around every cell, inside too. Header cells (<th>) are blue with white text; or add a class to
   the <table> in the Text module's HTML view: db-table--head-top (first row), db-table--head-side (first column). */
:is(.et_pb_text_inner, .et_pb_toggle_content) table { width: 100%; margin: var(--sp-16) 0 var(--sp-24); border: 0 !important; border-collapse: collapse; }
:is(.et_pb_text_inner, .et_pb_toggle_content) :is(td, th) { padding: 10px var(--sp-24) !important; border: 1px solid var(--c-grey-300) !important; text-align: left; vertical-align: top; }
:is(.et_pb_text_inner, .et_pb_toggle_content) :is(th, table.db-table--head-top tr:first-child > *, table.db-table--head-side tr > :first-child) {
  background-color: var(--c-blue); color: var(--c-white); font-weight: var(--fw-semibold); }

/* superscript and subscript: smaller than the text around them, without opening up the line spacing */
sup, sub { font-size: 0.7em; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.45em; }
sub { bottom: -0.25em; }

/* --------------------------------------------------------------------------
   db-review-note: a yellow "For review" note on a page, for open questions while OFO reviews on Dev. Everyone sees it on
   review copies (Dev, local; body class db-review-site from functions.php), nobody on the live domain (a safety net if one
   is left in at launch; logged-in users still see it there). Remove the notes once answered.
   -------------------------------------------------------------------------- */
.db-review-note { display: none !important; }
body.db-review-site .db-review-note, body.logged-in .db-review-note, body.et-fb .db-review-note {
  display: block !important; width: 100% !important; max-width: 46rem; margin: var(--sp-16) 0 !important; padding: var(--sp-12) var(--sp-16) !important;
  background: #fff4c2; border: 1px dashed #b38a00; color: #3d3000 !important; font-size: 15px; line-height: 1.45; text-align: left; }
body .db-review-note * { color: #3d3000 !important; font-size: inherit !important; }
body .db-review-note p { padding: 0 !important; margin: 0 !important; }

/* "Or email careers@…" under mailto buttons (Careers), for people without a mail app. Client note 2026-11-12. */
.et_pb_group:has(> .db-email-fallback) { flex-wrap: wrap !important; }
.et_pb_text.db-email-fallback { flex: 0 0 100% !important; width: 100% !important; max-width: none !important; margin: var(--sp-12, 12px) 0 0 !important; }
.et_pb_text.db-email-fallback p { font-size: 0.875rem; }
.et_pb_text.db-email-fallback a { text-decoration: underline; text-underline-offset: 2px; }
