/* The primary colour of the Recivi app (recivi-android theme/Color.kt) on top of Bulma: #6750a4, in the dark mode #d0bcff */
:root {
  --bulma-primary-h: 256deg;
  --bulma-primary-s: 34%;
  --bulma-primary-l: 48%;
  /* Text on the primary colour (onPrimary) and the primary colour as text, e.g. the outlined button */
  --bulma-primary-invert-l: 100%;
  --bulma-primary-on-scheme-l: 48%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bulma-primary-h: 258deg;
    --bulma-primary-s: 100%;
    --bulma-primary-l: 87%;
    --bulma-primary-invert-l: 28%;
    --bulma-primary-on-scheme-l: 87%;
  }
}

/* Bulma's display rules (e.g. .button) would win over the hidden attribute */
[hidden] {
  display: none !important;
}

/* Hidden until the texts are filled in, the {{keys}} of the template never show */
html.loading body {
  visibility: hidden;
}

.logo {
  display: block;
  height: 3.5rem;
  margin: 0 auto 1.5rem;
}

/* The whole notice is a link to MOJE daně; its logo is red and grey, a white plate keeps it readable in the dark mode too */
.source {
  display: block;
  transition: background-color 0.15s;
}

.source:hover {
  --bulma-notification-background-l: calc(var(--bulma-background-l) + var(--bulma-hover-background-l-delta));
}

.source .media {
  align-items: center;
}

.source .media-left {
  padding: 0.5rem 0.75rem;
  background: #fff;
  border-radius: var(--bulma-radius);
  line-height: 0;
}

.source .chevron {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin-inline-start: 0.75rem;
  fill: currentColor;
}

@media screen and (max-width: 480px) {
  .source .media-left img {
    width: 90px;
  }
}

.fatal {
  padding: 2rem;
  text-align: center;
}

.privacy {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: -0.5rem;
  font-size: 0.875rem;
  color: var(--bulma-text-weak);
}

.lock {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
}

/* Buttons like Material 3 in the Android app: a pill, the filled one in the primary colour */
.button {
  border-radius: 9999px;
  height: 2.75rem;
  padding-inline: 1.5rem;
  font-weight: 500;
}

.button.is-primary:not(.is-outlined) {
  background-color: var(--bulma-primary);
  color: var(--bulma-primary-invert);
}

/* Material 3 disabled button: a faint surface, not a faded primary */
.button.is-primary:not(.is-outlined)[disabled] {
  opacity: 1;
  background-color: color-mix(in srgb, var(--bulma-text-strong) 12%, transparent);
  color: color-mix(in srgb, var(--bulma-text-strong) 38%, transparent);
}

/* The drop zone fills the height of its column next to the fields */
.certificate {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.certificate .dropzone {
  flex: 1;
  justify-content: center;
}

/* The file input covers the whole zone: clicking and dropping a file both work natively */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 2.5rem 1rem;
  border: 2px dashed var(--bulma-border);
  border-radius: var(--bulma-radius-large);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.dropzone small {
  color: var(--bulma-text-weak);
}

.dropzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  width: 100%;
  height: 100%;
}

.dropzone:hover,
.dropzone.dragover,
.dropzone:focus-within {
  border-color: var(--bulma-primary);
}

.dropzone.dragover,
.dropzone.selected {
  background-color: var(--bulma-primary-soft);
}

.dropzone.selected {
  border-style: solid;
  border-color: var(--bulma-primary);
}

.status .media {
  align-items: center;
}

.status .scan {
  flex: none;
  width: 3rem;
  height: 3rem;
  fill: var(--bulma-primary);
}

.status .notice-icon {
  flex: none;
  width: 3rem;
  height: 3rem;
  fill: currentColor;
}

.status-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* The QR straight on the page, without a card; the progress bar is as wide as the QR */
.qr,
#step-transfer .progress {
  display: block;
  width: 100%;
  max-width: 18rem;
  margin-inline: auto;
}

.qr {
  margin-block: 1.5rem;
  border-radius: var(--bulma-radius);
  image-rendering: pixelated;
}

/* The EET seal on the final step, as on the final page of the app */
.seal {
  display: block;
  height: 10rem;
  margin: 1rem auto 2rem;
  fill: var(--bulma-primary);
}
