.hidden {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

body,
#loading-screen,
#main-content,
#wl-signature,
#add-to-apple-wallet,
#add-to-google-wallet,
#add-to-samsung-wallet {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: none;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    min-width: 100%;
    overflow: hidden;
    touch-action: none;
    -ms-touch-action: none;
    overscroll-behavior-x: none;
    overscroll-behavior-y: contain;
}

body {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.5s ease-in-out;
}

/* Hide signature in unbranded modes */
body.unbranded_light #wl-signature,
body.unbranded_dark #wl-signature {
    display: none !important;
    opacity: 0 !important;
}

#loading-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 10000000vh;
    min-height: -webkit-fill-available;
    transition: display 0.5s ease-out;
}

/* Global icon styling */
#loading-icon {
  max-height: 13vh;
  transition: filter ease-out 0.1s;
}

#loading-icon[data-src="light"],
#loading-icon[data-src="dark"],
#loading-icon[data-src="wl"],
#loading-icon[data-src="custom"]{
  height: 13vh;
  filter: drop-shadow(2px 2px rgba(0, 0, 0, 0.25));
}

/* IBM-specific icon styling */
#loading-icon[data-src="ibm"]{
  height: 8.5vh;
  margin-bottom: 1.5vh;
}

#loading-icon[data-src="isc"] {
  height: 8.5vh;
  margin-bottom: 1.5vh;
  filter: drop-shadow(0px 0px rgba(0, 0, 0, 0.25));
}

#loading-icon[data-src="dmp"] {
  height: 8.5vh;
  margin-bottom: 2vh;
  filter: drop-shadow(2px 2px rgba(0, 0, 0, 0.25));
}


#loading-bar-container{
    height: 2vh;
    width: 33vw;
    max-width: 300px;
    background-color: transparent;
    margin-top: 1vh;
    position: relative;
    transition: width 0.7s ease-in-out, box-shadow ease;

}

#loading-bar{
    display: flex;
    height: 2vh;
    width: 0;
    border-radius: 50px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    transition:
      width 0.4s ease,
      box-shadow ease;
}

/* Content */

#main-content {
    display: flex;
    overflow: hidden;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 50px;
    padding-top: 5vh;
    padding-bottom: 3vh;
    padding-left: 3.5vw;
    padding-right: 3.5vw;
    margin-left: 5vw;
    margin-right: 5vw;
    max-height: 500px;
    max-width: 500px;
    min-width: 75px;
    box-shadow: 2px 2px 1px 1px rgba(0, 0, 0, 60%);
    color: #ffffff;
    transform: scale(1, 0);
    transition: 
        background-color 0.5s ease,
        color 0.5s ease,
        scale 0.2s ease-in,
        transform 0.6s ease-in-out,
        height 0.5s ease-out,
        width 0.5s ease-out,
}

#card-container {
  position: relative;
  max-width: 250px;
  min-width: 75px;
  margin-top: -1vh;
  margin-bottom: 3vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.75s ease-in,
    box-shadow 0.3s ease-in-out;
  }

.card-art {
    max-width: 250px;
    min-width: 75px;
    height: auto;
    border-radius: 15px;
    box-shadow: 2px 2px 1px 1px rgba(0, 0, 0, 30%);
    transition:
      opacity 0.3s ease-in,
      box-shadow 0.3s ease-in-out;
}

#apple-card-logo {
  position: absolute;
  top: 8%;
  left: 5%;
  height: 17%;
  z-index: 1;
}

#card-image {
  background-size: cover;
  background-position: center;
  border-radius: 15px;
  z-index: 0;
}

#card-background{
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #014b6a;
  background-size: cover;
  background-position: center;
  z-index: -1;
  transition: opacity 0.3s ease-in;
}

#add-to-apple-wallet {
    cursor: pointer;
    width: auto;
    height: 15mm;
    min-height: 10mm;
    transition:
      opacity 0.5s ease-in;
}

#main-content h3, #main-content p {
    transition:
      color 0.5s ease-in-out,
}

/* Debug content */
#log-output {
    flex-direction: column;
    display: flex;
    align-items: flex-start;
    text-align: left;
    padding-top: 1vh;
    padding-bottom: 1vh;
    overflow-y: scroll;
    overflow-x: none;
    opacity: 0;
    mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 90%, transparent 100%);
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-y;
    transition:
      opacity 0.5s ease;
}

#log-output ul li {
    transition: opacity 0.5s ease-in;
}

#log-output ul li.visible {
    opacity: 1;
}

/* WL signature styles */
#wl-signature {
    position: fixed;
    z-index: -1;
    bottom: 2vh;
    right: 5vw;
    display: flex;
    flex-direction: column;
    align-items: baseline;
    opacity: 0;
    transition:
      opacity 2s ease-out;
}

#signature-top-row {
    font-size: 10px;
    font-weight: 700;
    margin-bottom: -10px;
}

#signature-bottom-row {
    font-size: 12px;
    display: flex;
    flex-direction: row;
}

#signature-bottom-row > p {
    margin-top: 3px;
}

#sig-logo {
    max-width: 40px;
    margin-right: 5px;
    margin-top: -7px;
    transition: content 0.5s ease-in-out;
}

#loading-icon, #sig-logo {
    transition: content 0.5s ease, 0.5s ease;
}

/* Spinner styles */
.lds-ellipsis {
  position: relative;
  width: 80px;
  height: 80px;
  transition:
    opacity 1s ease-out;
}

.lds-ellipsis div {
  position: absolute;
  top: 33.33333px;
  width: 13.33333px;
  height: 13.33333px;
  border-radius: 50%;
  background: currentColor;
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
  transition:
    transform 0.6s ease,
    box-shadow 0.6s,
    opacity 1s ease-in,
    background-color 0.5s ease-in-out;
    
}

.lds-ellipsis div:nth-child(1) {
    left: 8px;
    box-shadow: 0.25px 0.2px 0.2px rgba(0, 0, 0, 0.75);
    animation: lds-ellipsis1 0.6s infinite;
}
.lds-ellipsis div:nth-child(2) {
  left: 8px;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.25);
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(3) {
  left: 32px;
  box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.75);
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(4) {
  left: 56px;
  box-shadow: 0.25px 0.2px 0.5px rgba(0, 0, 0, 0.75);
  animation: lds-ellipsis3 0.6s infinite;
}
.lds-ellipsis div:nth-child(5) {
  left: 56px;
  box-shadow: 0.25px 0.5px 0.5px rgba(0, 0, 0, 0.75);
  animation: lds-ellipsis3 0.6s infinite;
} 
  
@keyframes lds-ellipsis1 {
    0% {transform: scale(0);}
    100% {transform: scale(1);}
  }
@keyframes lds-ellipsis3 {
  0% {transform: scale(1);}
  100% {transform: scale(0);}
}
@keyframes lds-ellipsis2 {
  0% {transform: translate(0, 0);}
  100% {transform: translate(24px, 0);}
}
@keyframes lds-ellipsis4 {
  0% {transform: scale(0);}
  100% {transform: scale(1);}
}
