"use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunkB6Y7HCBMcjs = require('./chunk-B6Y7HCBM.cjs');



var _chunkRSHN4K6Ncjs = require('./chunk-RSHN4K6N.cjs');


var _chunkOBHJBBPCcjs = require('./chunk-OBHJBBPC.cjs');


var _chunkKW3JYLRIcjs = require('./chunk-KW3JYLRI.cjs');

// src/styles/global.tsx
var _react = require('@emotion/react');
var _react3 = require('react');
require('react-tooltip/dist/react-tooltip.css');
require('./static/fonts.css');
var _jsxruntime = require('@emotion/react/jsx-runtime');
var getFontImport = (theme) => {
  let importStr = "";
  const fontStrs = [];
  const interStr = "Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900";
  const manropeStr = "Manrope:wght@200..800";
  const montserratStr = "Montserrat:ital,wght@0,100..900;1,100..900";
  const robotoMonoStr = "Roboto+Mono:ital,wght@0,100..700;1,100..700";
  const suisseIntlStr = "Suisse+Intl:wght@100..900";
  const suisseIntlMonoStr = "Suisse+Intl+Mono:wght@100..900";
  if (theme.typography.fontFamilies.main === "Inter") {
    fontStrs.push(interStr);
  } else if (theme.typography.fontFamilies.main === "Manrope") {
    fontStrs.push(manropeStr);
  } else if (theme.typography.fontFamilies.main === "Montserrat") {
    fontStrs.push(montserratStr);
  } else if (theme.typography.fontFamilies.main === "SuisseIntl") {
    fontStrs.push(suisseIntlStr);
  }
  if (theme.typography.fontFamilies.code === "Roboto Mono") {
    fontStrs.push(robotoMonoStr);
  } else if (theme.typography.fontFamilies.code === "SuisseIntl-Mono") {
    fontStrs.push(suisseIntlMonoStr);
  }
  if (fontStrs.length) {
    importStr = `@import url('https://fonts.googleapis.com/css2?family=${fontStrs.join(
      "&family="
    )}&display=swap');`;
  }
  return importStr;
};
var getFontFaces = (theme) => {
  let fontFacesStr = "";
  if (theme.typography.fontFamilies.main === "SuisseIntl") {
    fontFacesStr += `
      @font-face {
        font-family: "SuisseIntl";
        src: url("/fonts/SuisseIntl-Light.woff2") format("woff2");
        font-weight: 300;
        font-style: normal;
        font-display: swap;
      }
      @font-face {
        font-family: "SuisseIntl";
        src: url("/fonts/SuisseIntl-Regular.woff2") format("woff2");
        font-weight: 400;
        font-style: normal;
        font-display: swap;
      }
      @font-face {
        font-family: "SuisseIntl";
        src: url("/fonts/SuisseIntl-Book.woff2") format("woff2");
        font-weight: 450;
        font-style: normal;
        font-display: swap;
      }
      @font-face {
        font-family: "SuisseIntl";
        src: url("/fonts/SuisseIntl-Medium.woff2") format("woff2");
        font-weight: 500;
        font-style: normal;
        font-display: swap;
      }
      @font-face {
        font-family: "SuisseIntl";
        src: url("/fonts/SuisseIntl-Semibold.woff2") format("woff2");
        font-weight: 600;
        font-style: normal;
        font-display: swap;
      }
      @font-face {
        font-family: "SuisseIntl";
        src: url("/fonts/SuisseIntl-Bold.woff2") format("woff2");
        font-weight: 700;
        font-style: normal;
        font-display: swap;
      }
    `;
  }
  if (theme.typography.fontFamilies.code === "SuisseIntl-Mono") {
    fontFacesStr += `
      @font-face {
        font-family: "SuisseIntl-Mono";
        src: url("/fonts/SuisseIntlMono-Regular.woff2") format("woff2");
        font-weight: 400;
        font-style: normal;
        font-display: swap;
      }
    `;
  }
  return fontFacesStr;
};
var globalComponentStyles = ({ theme }) => _react.css`
  ${getFontImport(theme)};
  ${getFontFaces(theme)};

  html {
    font-size: ${_chunkRSHN4K6Ncjs.rootFontSizeRems}rem;
    color: ${theme.text};

    /* required for iOS https://bit.ly/3Q8syG8 */
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    scroll-behavior: smooth;
  }

  body {
    font-family: ${theme.typography.fontFamilies.main}, sans-serif;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    &:before {
      position: absolute;
      visibility: hidden;
    }

    ${_chunkKW3JYLRIcjs.bp.sm(`&:before { content: "${"sm" /* sm */}"; }`)}
    ${_chunkKW3JYLRIcjs.bp.minSmMaxMd(`&:before { content: "${"minSmMaxMd" /* minSmMaxMd */}"; }`)}
      ${_chunkKW3JYLRIcjs.bp.minMdMaxLg(
  `&:before { content: "${"minMdMaxLg" /* minMdMaxLg */}"; }`
)}
    ${_chunkKW3JYLRIcjs.bp.lg(`&:before { content: "${"lg" /* lg */}"; }`)}
  }

  * {
    box-sizing: border-box;
    line-height: ${_chunkRSHN4K6Ncjs.standardLineHeightEms}em;
  }

  code {
    font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
      monospace;
  }

  a {
    color: #0d6efd;
    text-decoration: none;
  }

  .pretty-scrollbar {
    scrollbar-width: auto;
    scrollbar-color: #333333 #000000;
  }

  .pretty-scrollbar::-webkit-scrollbar {
    width: 16px;
  }

  .pretty-scrollbar::-webkit-scrollbar-track {
    background: #000000;
  }

  .pretty-scrollbar::-webkit-scrollbar-thumb {
    background-color: #333333;
    border-radius: 10px;
    border: 3px solid #000000;
  }

  *:focus-visible {
    outline: ${theme.hcNeutral} dashed 1px;
  }

  strong {
    font-weight: 700;
  }

  // Recaptcha badge invisibility
  .grecaptcha-badge {
    visibility: hidden;
  }
`;
function GlobalStyles() {
  const theme = _react.useTheme.call(void 0, );
  const bg = _chunkOBHJBBPCcjs.useThemeBg.call(void 0, );
  _react3.useEffect.call(void 0, () => {
    const documentHeight = () => {
      const doc = document.documentElement;
      doc.style.setProperty(_chunkB6Y7HCBMcjs.cssVars.docHeight, `${window.innerHeight}px`);
    };
    window.addEventListener("resize", documentHeight);
    documentHeight();
    return () => window.removeEventListener("resize", documentHeight);
  }, []);
  const globalStyles = _react.css`
    ${globalComponentStyles({ theme })}

    :root {
      ${_chunkB6Y7HCBMcjs.cssVars.docHeight}: 100vh;
      --rt-opacity: 1 !important;
      --rt-transition-show-delay: 0.15s !important;
      --rt-transition-closing-delay: 0.2s !important;
    }

    html {
      background: ${bg};
    }

    body {
      height: 100%;
      margin: 0;
      min-height: var(${_chunkB6Y7HCBMcjs.cssVars.docHeight});
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior: auto;
    }

    [id="root"] {
      height: 100%;
    }
  `;
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Global, { styles: globalStyles });
}




exports.globalComponentStyles = globalComponentStyles; exports.GlobalStyles = GlobalStyles;
