/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

* {
  margin: 0;
  padding: 0;
}

:root {
  --background-color: #fff;
  --text-color: #0c0c0d;
  --border-color: #e1e1e2;
  --button-background-color: #f5f5f5;
  --selected-tab-text-color: #0061e0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #292833;
    --text-color: #f9f9fa;
    --border-color: rgba(255, 255, 255, 0.15);
    --button-background-color: rgba(0, 0, 0, 0.15);
    --selected-tab-text-color: #00ddff;
  }
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font: message-box;
  font-size: 14px;
  -moz-text-size-adjust: none;
  display: grid;
  grid-template-areas: "d d" "a b" "c c";
  grid-template-columns: 1fr 1fr;
  grid-template-rows: fit-content(100%) 1fr;
}

h1 {
  grid-area: d;
  margin: 0.5em 0.5em 0;
}

.tab[data-l10n-id="label-interventions"] {
  grid-area: a;
}

.tab[data-l10n-id="label-smartblock"] {
  grid-area: b;
}

section {
  grid-area: c;
}

section,
article,
p {
  display: block;
}

section {
  border-top: 2px solid var(--border-color);
  margin-top: -2px;
  width: 100%;
  z-index: 1;
  display: none;
}

article {
  border-block-end: 1px solid var(--border-color);
  padding: 0;
}

a {
  color: inherit;
  font-size: 94%;
}

.tab {
  cursor: pointer;
  z-index: 2;
  display: inline-block;
  text-align: start;
  border-block: 2px solid transparent;
  font-size: 1em;
  font-weight: var(--font-weight-bold);
  padding: 1em;
}

.tab.active {
  color: var(--selected-tab-text-color);
  border-block-end-color: currentColor;
  margin-block-end: 0;
  padding-block-end: calc(1em + 2px);
}

.tab.active + section {
  display: block;
}

article > span {
  grid-area: b;
  align-self: center;
}

article > span:first-child {
  grid-area: a;
  padding-inline-start: 1em;
}

article > span:last-child {
  grid-area: c;
  padding-block-end: 1em;
}

article {
  display: grid;
  grid-template-areas: "a b c" "a b c";
  grid-template-columns: 1fr 1fr 6.5em;
  column-gap: 1em;
  padding-block: 0.4em;
}

article > span:nth-child(1) {
  font-weight: var(--font-weight-bold);
}

article > span:nth-child(3) {
  display: flex;
  padding: 0;
  height: 100%;
}

button {
  align-self: center;
  margin: 0.5em 0;
  height: 90%;
}

@media only screen and (max-width: 500px) {
  article {
    grid-template-areas: "d d" "a c" "b c";
    grid-template-columns: 1fr 6.5em;
  }

  article > span {
    padding-inline-start: 1em;
  }

  article > span:first-child {
    padding-block-start: 1em;
  }

  article > span:nth-child(1) {
    padding-block-end: 0.25em;
  }

  article > span:nth-child(2) {
    padding-block-end: 1em;
  }
}
