/* Copyright 2021 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.page :deep(.xfaLayer) {
  --xfa-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");
  --xfa-focus-outline: auto;
}

@media screen and (forced-colors: active) {
  .page :deep(.xfaLayer) {
    --xfa-focus-outline: 2px solid CanvasText;
  }

  .page :deep(.xfaLayer *:required) {
    outline: 1.5px solid selectedItem;
  }
}

.page :deep(.xfaLayer) {
  color-scheme: only light;

  background-color: transparent;
}

.page :deep(.xfaLayer .highlight) {
  margin: -1px;
  padding: 1px;
  background-color: rgb(239 203 237);
  border-radius: 4px;
}

.page :deep(.xfaLayer .highlight.appended) {
  position: initial;
}

.page :deep(.xfaLayer .highlight.begin) {
  border-radius: 4px 0 0 4px;
}

.page :deep(.xfaLayer .highlight.end) {
  border-radius: 0 4px 4px 0;
}

.page :deep(.xfaLayer .highlight.middle) {
  border-radius: 0;
}

.page :deep(.xfaLayer .highlight.selected) {
  background-color: rgb(203 223 203);
}

.page :deep(.xfaPage) {
  overflow: hidden;
  position: relative;
}

.page :deep(.xfaContentarea) {
  position: absolute;
}

.page :deep(.xfaPrintOnly) {
  display: none;
}

.page :deep(.xfaLayer) {
  position: absolute;
  text-align: initial;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  line-height: 1.2;
}

.page :deep(.xfaLayer *) {
  color: inherit;
  font: inherit;
  font-style: inherit;
  font-weight: inherit;
  font-kerning: inherit;
  letter-spacing: -0.01px;
  text-align: inherit;
  text-decoration: inherit;
  box-sizing: border-box;
  background-color: transparent;
  padding: 0;
  margin: 0;
  pointer-events: auto;
  line-height: inherit;
}

.page :deep(.xfaLayer *:required) {
  outline: 1.5px solid red;
}

.page :deep(.xfaLayer div),
.page :deep(.xfaLayer svg),
.page :deep(.xfaLayer svg *) {
  pointer-events: none;
}

.page :deep(.xfaLayer a) {
  color: blue;
}

.page :deep(.xfaRich li) {
  margin-left: 3em;
}

.page :deep(.xfaFont) {
  color: black;
  font-weight: normal;
  font-kerning: none;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0;
  text-decoration: none;
  vertical-align: 0;
}

.page :deep(.xfaCaption) {
  overflow: hidden;
  flex: 0 0 auto;
}

.page :deep(.xfaCaptionForCheckButton) {
  overflow: hidden;
  flex: 1 1 auto;
}

.page :deep(.xfaLabel) {
  height: 100%;
  width: 100%;
}

.page :deep(.xfaLeft) {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.page :deep(.xfaRight) {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
}

.page :deep(:is(.xfaLeft, .xfaRight)> :is(.xfaCaption, .xfaCaptionForCheckButton)) {
  max-height: 100%;
}

.page :deep(.xfaTop) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page :deep(.xfaBottom) {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
}

.page :deep(:is(.xfaTop, .xfaBottom)> :is(.xfaCaption, .xfaCaptionForCheckButton)) {
  width: 100%;
}

.page :deep(.xfaBorder) {
  background-color: transparent;
  position: absolute;
  pointer-events: none;
}

.page :deep(.xfaWrapped) {
  width: 100%;
  height: 100%;
}

.page :deep(:is(.xfaTextfield, .xfaSelect):focus) {
  background-image: none;
  background-color: transparent;
  outline: var(--xfa-focus-outline);
  outline-offset: -1px;
}

.page :deep(:is(.xfaCheckbox, .xfaRadio):focus) {
  outline: var(--xfa-focus-outline);
}

.page :deep(.xfaTextfield),
.page :deep(.xfaSelect) {
  height: 100%;
  width: 100%;
  flex: 1 1 auto;
  border: none;
  resize: none;
  background-image: var(--xfa-unfocused-field-background);
}

.page :deep(.xfaSelect) {
  padding-inline: 2px;
}

.page :deep(:is(.xfaTop, .xfaBottom)> :is(.xfaTextfield, .xfaSelect)) {
  flex: 0 1 auto;
}

.page :deep(.xfaButton) {
  cursor: pointer;
  width: 100%;
  height: 100%;
  border: none;
  text-align: center;
}

.page :deep(.xfaLink) {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.page :deep(.xfaCheckbox),
.page :deep(.xfaRadio) {
  width: 100%;
  height: 100%;
  flex: 0 0 auto;
  border: none;
}

.page :deep(.xfaRich) {
  white-space: pre-wrap;
  width: 100%;
  height: 100%;
}

.page :deep(.xfaImage) {
  object-position: left top;
  object-fit: contain;
  width: 100%;
  height: 100%;
}

.page :deep(.xfaLrTb),
.page :deep(.xfaRlTb),
.page :deep(.xfaTb) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.page :deep(.xfaLr) {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.page :deep(.xfaRl) {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
}

.page :deep(.xfaTb>div) {
  justify-content: left;
}

.page :deep(.xfaPosition) {
  position: relative;
}

.page :deep(.xfaArea) {
  position: relative;
}

.page :deep(.xfaValignMiddle) {
  display: flex;
  align-items: center;
}

.page :deep(.xfaTable) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.page :deep(.xfaTable .xfaRow) {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.page :deep(.xfaTable .xfaRlRow) {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  flex: 1;
}

.page :deep(.xfaTable .xfaRlRow>div) {
  flex: 1;
}

.page :deep(:is(.xfaNonInteractive, .xfaDisabled, .xfaReadOnly) :is(input, textarea)) {
  background: initial;
}

@media print {

  .page :deep(.xfaTextfield),
  .page :deep(.xfaSelect) {
    background: transparent;
  }

  .page :deep(.xfaSelect) {
    appearance: none;
    text-indent: 1px;
    text-overflow: "";
  }
}