/* -------------------------------- 

File: _modal.box.scss
Title: Modal Styles
Descr: Core styles for the modal component.
Usage: Haleon AEM CF Framework

-------------------------------- */
div.wf-modal {
  position: relative;
  width: auto;
  height: auto;
  opacity: 1;
  visibility: visible;
  background-color: transparent; }
  div.wf-modal::after {
    content: "Modal / Dialog region (Overlay styles available in preview or 'view as published')";
    background: black;
    padding: 0.2rem;
    font-size: 12px;
    color: white;
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%); }
  div.wf-modal .wf-modal-wrapper {
    width: auto !important;
    transform: scale(1) !important;
    border: solid 1px black;
    position: relative;
    margin: 0 auto; }
  div.wf-modal .wf-modal-body .new.section {
    min-width: 12rem; }

dialog.wf-modal {
  position: fixed;
  z-index: var(--wf-modal-z-index, 100);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  left: 0;
  top: 0;
  max-width: 100%;
  max-height: 100%;
  opacity: 0;
  visibility: hidden;
  border: none;
  background: transparent;
  padding: 1.5rem; }
  dialog.wf-modal::backdrop {
    background: var(--wf-modal-backdrop, rgba(0, 0, 0, 0.8)); }
  dialog.wf-modal:not([open]) {
    pointer-events: none;
    background-color: transparent; }
  dialog.wf-modal[open] {
    opacity: 1;
    visibility: visible; }

.wf-modal-wrapper {
  width: 100%;
  max-height: 100%;
  height: auto !important;
  transform: scale(0);
  max-width: 64em;
  border-radius: var(--wf-modal-radius, 0.3em);
  margin: 0 1rem;
  background-color: var(--wf-modal-background-color, white); }
  .wf-modal-wrapper--xs {
    max-width: var(--wf-modal-xs, 540px); }
  .wf-modal-wrapper--sm {
    max-width: var(--wf-modal-sm, 720px); }
  .wf-modal-wrapper--md {
    max-width: var(--wf-modal-md, 960px); }
  .wf-modal-wrapper--lg {
    max-width: var(--wf-modal-lg, 1140px); }
  .wf-modal-wrapper--xl {
    max-width: var(--wf-modal-xl, 1320px); }

.wf-modal-body {
  padding: var(--wf-modal-padding, 1rem) !important;
  font-size: var(--wf-modal-font-size-body, 1rem); }

.wf-modal-close {
  transition: var(--wf-modal-transition-duration, 0.2s);
  cursor: pointer;
  border: none;
  position: absolute;
  right: -15px;
  top: -15px;
  background-color: var(--wf-modal-close-button-background, black) !important;
  border-radius: 50%;
  height: 35px;
  width: 35px;
  line-height: 1; }
  .wf-modal-close:hover, .wf-modal-close:focus, .wf-modal-close:focus-visible {
    background-color: var(--wf-modal-close-button-background-focus, blue) !important; }
  .wf-modal-close > svg {
    fill: var(--wf-modal-close-icon-color, white);
    position: absolute;
    left: 8px;
    top: 8px; }

@media (prefers-reduced-motion: no-preference) {
  .wf-modal--fade, .wf-modal--scale, .wf-modal--fade-up, .wf-modal--fade-down, .wf-modal--fade-right, .wf-modal--fade-left, .wf-modal--slide-up, .wf-modal--slide-down, .wf-modal--slide-right, .wf-modal--slide-left {
    transition: opacity var(--wf-modal-transition-duration, 0.2s), background-color var(--wf-modal-transition-duration, 0.2s), visibility 0s var(--wf-modal-transition-duration, 0.2s); }
    .wf-modal--fade[open], .wf-modal--scale[open], .wf-modal--fade-up[open], .wf-modal--fade-down[open], .wf-modal--fade-right[open], .wf-modal--fade-left[open], .wf-modal--slide-up[open], .wf-modal--slide-down[open], .wf-modal--slide-right[open], .wf-modal--slide-left[open] {
      transition: opacity var(--wf-modal-transition-duration, 0.2s), background-color var(--wf-modal-transition-duration, 0.2s), visibility 0s; }
  .wf-modal--fade[open] {
    transition: opacity var(--wf-modal-transition-duration, 0.2s), background-color var(--wf-modal-transition-duration, 0.2s), visibility 0s; }
    .wf-modal--fade[open] .wf-modal-wrapper {
      transform: scale(1);
      /* reset all transformations */ }
  .wf-modal--scale .wf-modal-wrapper, .wf-modal--fade-up .wf-modal-wrapper, .wf-modal--fade-down .wf-modal-wrapper, .wf-modal--fade-right .wf-modal-wrapper, .wf-modal--fade-left .wf-modal-wrapper {
    will-change: transform;
    transition: transform var(--wf-modal-transition-duration, 0.2s) var(--wf-modal-ease, cubic-bezier(0.215, 0.61, 0.355, 1)); }
  .wf-modal--scale[open], .wf-modal--fade-up[open], .wf-modal--fade-down[open], .wf-modal--fade-right[open], .wf-modal--fade-left[open] {
    transition: opacity var(--wf-modal-transition-duration, 0.2s), background-color var(--wf-modal-transition-duration, 0.2s), visibility 0s; }
    .wf-modal--scale[open] .wf-modal-wrapper, .wf-modal--fade-up[open] .wf-modal-wrapper, .wf-modal--fade-down[open] .wf-modal-wrapper, .wf-modal--fade-right[open] .wf-modal-wrapper, .wf-modal--fade-left[open] .wf-modal-wrapper {
      transform: scale(1);
      /* reset all transformations */ }
  .wf-modal--slide-up .wf-modal-wrapper, .wf-modal--slide-down .wf-modal-wrapper, .wf-modal--slide-right .wf-modal-wrapper, .wf-modal--slide-left .wf-modal-wrapper {
    will-change: transform;
    transition: transform var(--wf-modal-transition-duration, 0.2s) var(--wf-modal-ease, cubic-bezier(0.215, 0.61, 0.355, 1)); }
  .wf-modal--slide-up[open], .wf-modal--slide-down[open], .wf-modal--slide-right[open], .wf-modal--slide-left[open] {
    transition: background-color var(--wf-modal-transition-duration, 0.2s), visibility 0s; }
    .wf-modal--slide-up[open] .wf-modal-wrapper, .wf-modal--slide-down[open] .wf-modal-wrapper, .wf-modal--slide-right[open] .wf-modal-wrapper, .wf-modal--slide-left[open] .wf-modal-wrapper {
      transform: scale(1);
      /* reset all transformations */ }
  .wf-modal--scale .wf-modal-wrapper {
    transform: scale(0.95); }
  .wf-modal--fade-up .wf-modal-wrapper {
    transform: translateY(40px); }
  .wf-modal--fade-down .wf-modal-wrapper {
    transform: translateY(-40px); }
  .wf-modal--fade-right .wf-modal-wrapper {
    transform: translateX(-40px); }
  .wf-modal--fade-left .wf-modal-wrapper {
    transform: translateX(40px); }
  .wf-modal--slide-up .wf-modal-wrapper {
    transform: translateY(100%); }
  .wf-modal--slide-down .wf-modal-wrapper {
    transform: translateY(-100%); }
  .wf-modal--slide-right .wf-modal-wrapper {
    transform: translateX(-100%); }
  .wf-modal--slide-left .wf-modal-wrapper {
    transform: translateX(100%); } }

.wf-u-sr-only,
.wf-u-sr-only-focusable:not(:focus):not(:focus-within) {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  white-space: nowrap; }
select.wf-form-control::-ms-expand {
  display: none; }

input::-ms-clear {
  display: none; }

.wf-l-container {
  width: calc(100% - 2 * 1rem);
  margin-left: auto;
  margin-right: auto;
  max-width: var(--wf-col-xl, 1140px); }

.wf-form-control {
  background-color: transparent;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  line-height: inherit;
  appearance: none; }

.wf-form fieldset {
  border: 0;
  padding: 0;
  margin: 0; }

.wf-form textarea {
  resize: vertical;
  overflow: auto;
  vertical-align: top; }

.wf-form input::-ms-clear {
  display: none; }

.wf-form-control {
  font-size: var(--wf-form-control-font-size, 1rem);
  padding: var(--wf-form-control-padding-y, 0.75rem) var(--wf-form-control-padding-x, 0.75rem);
  border-radius: var(--wf-form-control-radius, 0);
  width: 100%;
  background: var(--wf-form-control-background, white);
  color: var(--wf-form-control-color, black);
  line-height: 1.2;
  box-shadow: inset 0px 0px 0px 1px #ccc;
  transition: all 0.2s ease; }

.wf-form-control::placeholder {
  opacity: 0.8;
  color: var(--wf-color-contrast-low, gray); }

.wf-form-control:focus, .wf-form-control:focus-within {
  background: var(--wf-color-bg);
  outline: none; }

.wf-form-control:focus-visible {
  outline: solid; }

.wf-form {
  position: relative; }

.wf-form-section {
  margin-bottom: var(--wf-form-section-spacing, 1.5rem) !important; }

.wf-form-legend {
  display: block;
  line-height: 1.2;
  font-size: var(--wf-form-legend-font-size, 1.5rem);
  margin-bottom: var(--wf-space-sm);
  color: var(--wf-form-legend-color, black); }

.wf-form-label {
  display: block;
  font-size: var(--wf-form-label-font-size, 1rem);
  color: var(--wf-form-label-color, black);
  padding-bottom: var(--wf-space-xxs);
  font-weight: bold; }

.wf-form-helptext {
  color: var(--wf-form-helper-text-color, black); }

.wf-form-helptext > p {
  margin-bottom: 0; }

.wf-form-error {
  line-height: 1;
  display: inline-block; }

.wf-form-error > p {
  margin: 0; }

.wf-form-is-hidden,
.wf-form-hidden-item {
  display: none;
  visibility: hidden; }

.wf-form-reveal-if-active {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  font-size: 16px;
  transform: scale(0.8);
  transition: 0.5s; }

.wf-form-reveal-if-active label {
  display: block;
  margin: 0 0 3px 0; }

.wf-form-reveal-if-active input[type="text"] {
  width: 100%; }

input[type="radio"]:checked ~ .wf-form-reveal-if-active,
input[type="checkbox"]:checked ~ .wf-form-reveal-if-active {
  opacity: 1;
  visibility: visible;
  max-height: 100px;
  padding: 10px 30px;
  transform: scale(1);
  overflow: visible; }

.wf-form-upload-wrapper {
  --upload-height: calc(var(--wf-form-control-padding-y, 0.75rem) * 4);
  --upload-radius: 0 var(--wf-form-control-radius, 0)
		var(--wf-form-control-radius, 0) 0;
  position: relative;
  width: 100%;
  height: var(--upload-height); }

.wf-form-upload-wrapper::after {
  content: attr(data-input);
  font-size: var(--text-sm, 1rem);
  position: absolute;
  top: 0;
  left: 10px;
  width: calc(100% - 40px);
  pointer-events: none;
  z-index: 20;
  height: var(--upload-height);
  line-height: var(--upload-height); }

.wf-form-upload-wrapper::before {
  content: var(--wf-form-upload-text, attr(data-button));
  position: absolute;
  top: 0;
  right: 0;
  display: inline-block;
  background: var(--wf-form-upload-background, grey);
  color: white;
  z-index: 25;
  line-height: var(--upload-height);
  padding: 0 15px;
  text-transform: uppercase;
  pointer-events: none;
  border-radius: var(--upload-radius); }

.wf-form-upload-wrapper:hover::before, .wf-form-upload-wrapper:focus::before {
  background: var(--wf-form-upload-background-hover-focus, black); }

.wf-form-upload-wrapper input {
  opacity: 0;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99;
  height: var(--upload-height);
  margin: 0;
  padding: 0;
  display: block;
  cursor: pointer;
  width: 100%; }

.wf-form-upload-file-item {
  list-style-type: none;
  border-radius: 10px;
  background-color: rgba(144, 163, 203, 0.2);
  margin: 0;
  color: initial;
  display: inline-flex;
  margin-right: 1rem;
  padding-right: 1rem; }

.wf-form-upload-file-item > span.name {
  padding-right: 10px;
  width: max-content;
  display: inline-flex; }

.wf-form-upload-file-item-delete {
  display: flex;
  width: 24px;
  color: initial;
  background-color: #6eb4ff00;
  font-size: large;
  justify-content: center;
  margin-right: 3px;
  cursor: pointer; }

.wf-form-upload-file-item-delete:hover, .wf-form-upload-file-item-delete:focus {
  background-color: rgba(144, 163, 203, 0.2);
  border-radius: 10px; }

.wf-form-upload-file-item-delete > span {
  transform: rotate(45deg); }

.wf-form-control[aria-invalid="true"],
.wf-form-control[aria-required="true"] .wf-form-control.wf-form-control--error,
.wf-form-list--error {
  box-shadow: 0px 0px 0px 2px var(--wf-color-error, red); }

.wf-form-control[aria-invalid="true"]:focus, .wf-form-control[aria-invalid="true"]:focus-within,
.wf-form-control[aria-required="true"] .wf-form-control.wf-form-control--error:focus,
.wf-form-control[aria-required="true"] .wf-form-control.wf-form-control--error:focus-within,
.wf-form-list--error:focus,
.wf-form-list--error:focus-within {
  box-shadow: 0px 0px 0px 2px var(--wf-color-error, red); }

.wf-form-label.wf-form-label--error {
  color: var(--wf-color-error, red); }

.wf-form-list--error {
  padding: var(--wf-space-xs) !important;
  border-radius: var(--wf-form-control-radius, 0); }

.wf-form-control--disabled,
.wf-form-control[disabled],
.wf-form-control[aria-disabled="true"],
.wf-form-control[readonly],
.wf-form-radio-item[disabled] + label,
.wf-form-radio-item[aria-disabled="true"] + label,
.wf-form-checkbox-item[disabled] + label,
.wf-form-checkbox-item[aria-disabled="true"] + label {
  opacity: 0.5;
  cursor: not-allowed; }

