/* Copyright 2026 The Chromium Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

:root {
  /* TODO(b/540253512): Migrate/port this surface color to the mixer to keep things simpler
   * and handle these types of color definitions properly.
   * Sample mixer: chrome/browser/ui/color/new_tab_page_color_mixer.cc */
  --desktop-sys-surface-colors-surface-1: rgb(248, 250, 253);
  --google-blue-100: rgb(210, 227, 252);
  --google-blue-600: rgb(26, 115, 232);

  /* Meaningful constants for repeated values */
  --font-weight-medium: 500;
  --icon-size-small: 20px;
  --line-height-normal: 20px;
}

body {
  -webkit-font-smoothing: antialiased;
  background-color: white;
  font-size: 100%;
  margin: 0;
}

[hidden] {
  display: none !important;
}

/** Typography -------------------------------------------------------------- */

.content {
  color: black;
  font-size: calc(100% - 2px);
  line-height: calc(100% + 6px);
  min-width: 240px;
}

h1 {
  font-size: calc(100% + 8px);
  font-weight: var(--font-weight-medium);
  line-height: calc(100% + 8px);
}

em {
  font-style: normal;
  font-weight: var(--font-weight-medium);
}

/* Small font on small screens. */
@media (max-width: 240px),
       (max-height: 320px) {
  .content {
    font-size: calc(100% - 4px);
    line-height: calc(100% + 6px);
  }

  h1 {
    font-size: calc(100% + 4px);
    line-height: calc(100% + 4px);
  }
}

/** Icon -------------------------------------------------------------------- */

.icon {
  content: url(../../../../ui/webui/resources/images/business_splash.svg);
  height: 120px;
  width: 120px;

  @media (height <= 480px), (width <= 720px) {
    height: 72px;
    width: 72px;
  }

  @media (width <= 240px), (width <= 720px) and (height <= 480px) {
    height: 48px;
    width: 48px;
  }
}


/** Boxes Grid -------------------------------------------------------------- */

#boxes-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, 1fr);
  margin: 24px 0;
}

.box-card {
  background-color: var(--desktop-sys-surface-colors-surface-1);
  border-radius: 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 16px;
  text-align: start;
}

.box-header {
  align-items: center;
  display: flex;
  margin-bottom: 8px;
}

.box-icon {
  background-color: black;
  flex-shrink: 0;
  height: var(--icon-size-small);
  margin-right: 8px;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100%;
  width: var(--icon-size-small);
}

.box-icon.dlp {
  -webkit-mask-image: url(../../../../ui/webui/resources/images/dlp.svg);
}

.box-icon.timer-pause {
  -webkit-mask-image: url(../../../../ui/webui/resources/images/timer_pause.svg);
}

.box-icon.extension {
  -webkit-mask-image: url(../../../../ui/webui/resources/images/extension.svg);
}

.box-icon.cookie-off {
  -webkit-mask-image: url(../../../../ui/webui/resources/images/cookie_off.svg);
}

.box-title {
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
}

.box-content {
  font-size: 14px;
  line-height: var(--line-height-normal);
}

/** Visibility Notice ------------------------------------------------------- */

#visibility-notice {
  align-items: center;
  border: 1px solid var(--google-blue-100);
  border-radius: 4px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  padding: 12px 20px;
}

#visibility-notice-header {
  align-items: center;
  display: flex;
  line-height: var(--line-height-normal);
  margin: 0;
}

.visibility-notice-icon {
  background-color: black;
  flex-shrink: 0;
  height: var(--icon-size-small);
  margin-right: 8px;
  -webkit-mask-image: url(../../../../ui/webui/resources/images/visibility_eye.svg);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100%;
  width: var(--icon-size-small);
}

.learn-more-button,
#visibility-notice a,
.box-content a {
  color: var(--google-blue-600);
  text-decoration: underline;
}

/** Layout ------------------------------------------------------------------ */

.content {
  margin-inline-end: auto;
  margin-inline-start: auto;
  max-width: 800px;
}

.icon {
  margin-inline-end: auto;
  margin-inline-start: auto;
}

h1,
#subtitle {
  text-align: center;
}

@media (max-width: 720px) {
  .content {
    max-width: 600px;
    text-align: start;
  }

  #boxes-grid {
    grid-template-columns: 1fr;
 }

  #visibility-notice {
    justify-content: flex-start;
  }
}

/** Paddings and margins ---------------------------------------------------- */

@media (min-width: 720px) {
  .icon,
  h1,
  .learn-more-button {
    margin-top: 1.5rem;
  }

  .icon,
  #visibility-notice {
    margin-bottom: 1.5rem;
  }

  h1 {
    margin-bottom: 0;
  }

  #subtitle {
    margin-top: 0.5rem;
    margin-bottom: 3rem;
  }

  .content {
    min-width: 240px;
  }

  @media (max-height: 480px) {
    html,
    body,
    .content {
      height: 100%;
    }

    .content {
      margin-bottom: 0;
      margin-top: 0;
      padding-bottom: 0;
      padding-top: 0;
    }

    .icon {
      margin-top: 0;
      padding-top: 32px;
    }
  }

  @media (max-height: 320px) {
    h1,
    #subtitle {
      margin-bottom: 16px;
      margin-top: 16px;
    }

    .learn-more-button,
    .icon,
    #visibility-notice {
      margin-bottom: 16px;
    }
  }
}

@media (max-width: 720px) {
  .content {
    min-width: 176px;
    padding: 72px 32px;
  }

  .icon,
  h1,
  #subtitle {
    margin-bottom: 1.5rem;
  }

  .learn-more-button,
  #visibility-notice {
    margin-bottom: 1.5rem;
  }

  @media (max-height: 600px) {
    .content {
      padding-top: 48px;
    }

    .icon,
    h1,
    #subtitle {
      margin-bottom: 1rem;
      margin-top: 1rem;
    }

    .learn-more-button,
    #visibility-notice {
      margin-bottom: 1rem;
    }
  }

  @media (max-height: 480px) {
    .content {
      padding-top: 32px;
    }
  }

  .icon {
    margin-top: 0;
  }

  .learn-more-button {
    margin-bottom: 0;
  }
}

@media (max-width: 240px) {
  .content {
    min-width: 192px;
    padding-inline-end: 24px;
    padding-inline-start: 24px;
  }
}