/* Modal opening object (link, button, or pretend button) */

.single-class button,
[aria-role="button"] {
  cursor: pointer;
}
.single-class button[data-modal][aria-controls],
.single-class [aria-role="button"][data-modal][aria-controls] {
  transition: all .3s ease-out;
}

/* Hover & focus indication. */

/* Reads as: if button, or aria-role=button, has data-model attribute and JavaScript has added aria-controls then on hover or focus */ 

.single-class button[data-modal][aria-controls]:hover,
.single-class button[data-modal][aria-controls]:focus,
.single-class [aria-role="button"][data-modal][aria-controls]:hover,
.single-class [aria-role="button"][data-modal][aria-controls]:focus {
  -webkit-filter: contrast(120%);
  filter: contrast(120%);
/*  box-shadow: 0 0 0 4px rgba(255, 0, 0, .6); */
outline: 0 solid;
}


/* Modal opening link cosmetics */

.single-class .lnk_modal-open {
  font-size: larger;
  background-color: #000;
  padding:.25rem .5rem;
  display: inline-block;
  text-decoration: none;
  border: 0 solid;
  margin: 0 auto;
}

.single-class .lnk_modal-img {
  padding: 0;
}

.single-class .lnk_modal-open:active {
  -webkit-filter: brightness(85%);
  filter: brightness(85%);
}

.single-class .img_modal-open {
  display: block;
  border: 0 solid;
}


/* The modal section is added via JS */

.single-class .modal {
  max-width: 50vw;
  max-height: 50vh;
  background-color: #F7F0E8;
  margin: 0 auto;
  position: absolute;
  left: 10%;
  right: 10%;
  top: 10%;
  bottom: 5%;
  z-index: 10;
  border: 1px solid #000;
  box-shadow: 0 .25em .5em #000;
  transition: opacity .5s ease-out, visibility 0s ease-out 1s, transform .5s ease-out .5s;
  backface-visibility: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(.8) translate3d(0,0,0);
  pointer-events: none;
}

.single-class .modal[aria-hidden="false"] {
  position: fixed;
  transition-delay: 0s,0s, 0s;
  opacity: 1;
  visibility: visible;
  transform: scale(1) translate3d(0,0,0);
  pointer-events: auto;
}




/* Light box properties */

.single-class .modal_lightbox {
  text-indent: -200em;
  background-color: rgba(0, 0, 0, 0.8);
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  /* places the modal overlay between the main page (0) and the modal dialog (10) */
  z-index: 5;
  cursor: pointer;
  transition: opacity .5s ease-out, visibility 0s ease-out .5s;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.single-class .modal_lightbox-on {
  transition-delay: 0s, 0s;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.single-class .modal_lightbox-on:hover {
  /* Stolen from trickle.js. Under consideration. SVGs will not work here */
  cursor: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAANpJREFUOBGNkz0KAjEQhYPYWXgCKws7LcXWyt7WG4i9jegBvIJ4AvEyXsRCsBDiN0sGkiE/O/A2O9n3viS7rPPeb9ETrVzPwrtHDzR1XF5I6oPWLQaeq5hDXQRw0I6xCuF5HH7Tz7oFuTkhrSyEhza8THaLoQhphpWUg/QOFyA/AFpy5nTbGrIjxvg4AiiGBzYc+rGZH9KPzFy+ZbX4bX9l+VDZr5NQMMbhbtvMxccpQ3JhpTchtXATQviItIpvW0CY7HHm8c9UDRd2chbABt3RQk2tEe8O3dDkD4JQ4iOR7BMpAAAAAElFTkSuQmCC"), pointer;
}


/* Modal title and description */

.single-class .modal_title,
.single-class .modal_desc {
  position: absolute;
  top: 5px;
  left: -200em;
  background-color: #fff;
  color: #000;
  text-shadow: 0 0 0 #fff;
  font-size: 20px;
  padding: 0.125em .25em;
  /* Tesco requirement
  font-family: Tesco_W_Rg, sans-serif; */
  margin: 0;
  display: none;
}

.single-class .modal_title:focus,
.single-class .modal_desc:focus {
  left: 5px;
}

.single-class [aria-hidden="false"] .modal_title {
  transition: opacity .5s ease-out 3s;
  opacity: 0;
}

.single-class .modal_title,
.single-class .modal_title:focus {
  opacity: 1;
  transition: opacity .5s ease-out;
}


/* The iframe */

.single-class .modal_iframe {
  transition: opacity .5s ease-out, visibility 0s ease-out 1s;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
/*  height: 600px;
*/
}

.single-class .modal_iframe-on {
  transition: opacity .8s ease-out, visibility 0s ease-out 0s;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.single-class [aria-hidden="true"] .modal_iframe {
  display: none;
}

.single-class [aria-hidden="false"] .modal_iframe {
  display: block;
}


/* The modal pop-ups close button, appears last in the modal, but is moved visually to the top right of the pop-up */

.single-class .modal_lnk-close {
  cursor: pointer;
  position: absolute;
  top: -15px;
  right: -15px;
  border: 0 solid;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  background-color: #ffffff;
  /*box-shadow: 0 .25em .5em rgba(0, 0, 0, .25);*/
  overflow: hidden;
  transition: background-color .3s ease-out;
  content: url(/wp-content/uploads/2023/04/black-close-icon-3.png);
}

.single-class .modal_lnk-close:hover,
.single-class .modal_lnk-close:active,
.single-class .modal_lnk-close:focus {
  /*background-color: #c00;*/
  outline: 0 solid;
}

.single-class .svg-close {
  pointer-events: none;
  width: 40px;
  height: 40px;
  stroke: #fff;
  stroke-width: 2;
}

.single-class .svg-close:after {
    background-image: url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2217px%22%20height%3D%2217px%22%20viewBox%3D%22722%2063%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cg%20id%3D%22Group%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate%28722.000000%2C%2063.000000%29%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.5%2C0.5%20L13.5%2C13.5%22%20id%3D%22Path-952%22%20stroke%3D%22%23696C74%22%3E%3C%2Fpath%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.5%2C0.5%20L0.5%2C13.5%22%20id%3D%22Path-953%22%20stroke%3D%22%23696C74%22%3E%3C%2Fpath%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E);
    background-position: 50%;
    background-repeat: no-repeat;
    content: '';
    cursor: pointer;
    display: block;
    height: 32px;
    position: absolute;
    text-decoration: none;
    transform: translate(calc(-32px - 8px), calc((-720px/2) + 8px));
    width: 32px;
    z-index: 2147483647;
}


/* Modal SVG (Tesco) loading animation version 2 (overlaid on itself and out of phase) */

.single-class [class*="svg-loading"] {
  position: absolute;
  width: 80px;
  height: 80px;
  top: calc(50% - 40px);
  left: calc(50% - 40px);
  z-index: -1;
  transition: opacity .3s ease-out;
  backface-visibility: hidden;
}

.single-class .svg-loading {
  fill: #00539f;
  -webkit-animation: rotate 4s linear 0s infinite;
  animation: rotate 4s linear 0s infinite;
}

.single-class .svg-loading2 {
  /* Match to .modal background colour for full effect */
  fill: #F7F0E8;
  -webkit-animation: rotate 5s linear 1s infinite;
  animation: rotate 5s linear 1s infinite;
}

@-webkit-keyframes rotate {
  to {
    -webkit-transform: rotate(360deg) translate3d(0,0,0);
    transform: rotate(360deg) translate3d(0,0,0);
  }
}

@keyframes rotate {
  to {
    -webkit-transform: rotate(360deg) translate3d(0,0,0);
    transform: rotate(360deg) translate3d(0,0,0);
  }
}



/* While modal is open */

/* Class added to body tag to prevent scroll
   Note the body does not require class "-modal" */
body.single-class .-modal-open {
  overflow: hidden;
}


/* Any tags classed with "-modal", when open, get "-modal-open" added */
/* Both of these are equivalent, best practice to use the attribute version which enforces accessibility */

.single-class .-modal[aria-hidden="true"] {
  -webkit-filter: blur(4px);
  filter: blur(4px);
}
.single-class .-modal.-modal-open {
  -webkit-filter: blur(4px);
  filter: blur(4px);
}


/* Generic helper style */
.single-class .u-margin2 {
  margin: 2rem 0;
}