/* Drag Area */
.drag-area {
  border: 2px dashed #1b3e90;
  background-color: #2e2e2e;
  border-radius: 5px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin: 20px 0;
}
.drag-area:hover {
  background-color: #cccccc;
}
.drag-area:hover p {
  color: #333;
}
.drag-area.dragover {
  background-color: #efefef;
  border-color: #777;
}
.drag-area p {
  color: #fff;
}
/* Hidden file input */
#fileInput {
  display: none;
}

/* Preview + Crop Section */
#cropContainer {
  display: none; /* hidden until user selects an image */
  text-align: center;
  margin-top: 20px;
}

#cropContainer button {
  background-color: #1b3e90;
  color: #fff;
  padding: 15px;
  max-width: 90%;
  min-width: 250px;
  font-size: 0.8em;
  letter-spacing: 1px;
  margin-top: 20px;
  margin-bottom: 10px;
  border: none;
}

#cropContainer button:hover {
  background-color: #fff;
  cursor: pointer;
  color: #1b3e90;
}

#previewImg {
  max-width: 100%;
  display: block;
  margin: 0 auto;
  border: 1px solid #ccc;
}

/* Cropped Result */
#resultContainer {
  display: none; /* hidden until user clicks "Crop" */
  text-align: center;
}
#croppedImage {
  border: 1px solid #ccc;
  display: block;
  margin: 0 auto;
}

/* Modal Root */
.ym-passkit {
  position: fixed;
  inset: 0;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  pointer-events: none;
}
.ym-passkit--active {
  pointer-events: auto;
}
/* Overlay */
.ym-passkit__overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.7);
  transition: all 0.3s ease-in-out;
  pointer-events: none;
}
.ym-passkit--active .ym-passkit__overlay {
  opacity: 1;
  pointer-events: auto;
}
/* Modal */
.ym-passkit__modal {
  max-height: calc(100% - 20px);
  width: calc(100% - 20px);
  max-width: 800px;
  background-color: #242424;
  border-radius: 3px;
  opacity: 0;
  transform: translateY(-100%);
  transition: all 0.5s ease-in-out;
}
.ym-passkit--active .ym-passkit__modal {
  opacity: 1;
  transform: translateY(0);
  overflow-y: auto;
}
/* Title */
.ym-passkit__modal-title {
  color: #fff;
  text-align: center;
  border-bottom: 1px solid #c2c2c2;
  padding: 25px 30px 20px;
  font-size: 22px;
}
@media (min-width: 992px) {
  .ym-passkit__modal-title {
    font-size: 26px;
  }
}

/* Close Button */
.ym-passkit__modal-close {
  color: #e0e0e0;
  font-weight: 600;
  font-size: 20px;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
}

/* Content */
.ym-passkit__modal-content {
  padding: 15px;
}
@media (min-width: 992px) {
  .ym-passkit__modal-content {
    padding: 20px;
  }
}

/* Results */
.ym-passkit__results img {
  width: 100%;
  max-width: 250px;
}
.ym-passkit__results-title {
  font-size: 18px;
  color: #fff;
  margin-bottom: 15px;
}

.ym-passkit__results-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 30px 0 0;
}
@media (min-width: 992px) {
  .ym-passkit__results-actions {
    flex-direction: row;
  }
}

.ym-passkit__results-actions button {
  background-color: #1b3e90;
  color: #fff;
  padding: 15px;
  width: 100%;
  max-width: 250px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}

.ym-passkit__results-actions button:hover {
  background-color: #fff;
  color: #1b3e90;
}

/* Loader Styling */
.ym-passkit__load-wrapper {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 30px 0;
}
.ym-passkit__load-wrapper--active {
  display: flex;
}
.ym-passkit__loader {
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-bottom-color: #1b3e90;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: passRotation 1s linear infinite;
}

@keyframes passRotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* API Results  */
.ym-passkit__api-results {
  display: none;
  text-align: center;
  padding: 30px 0;
}
.ym-passkit__api-results--active {
  display: block;
}
.ym-passkit__api-results h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 25px;
}
@media (min-width: 992px) {
  .ym-passkit__api-results h3 {
    font-size: 24px;
  }
}
.ym-passkit__api-results img {
  width: 50px;
  margin: 0 auto 15px;
}
@media (min-width: 992px) {
  .ym-passkit__api-results img {
    width: 70px;
  }
}

.ym-passkit__api-results button,
.ym-passkit__error-message button {
  background-color: #1b3e90;
  color: #fff;
  padding: 15px;
  width: 100%;
  max-width: 500px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}

/* Error Message */
.ym-passkit__error-message {
  display: none;
  text-align: center;
  padding: 30px 0;
}
.ym-passkit__error-message h4 {
  line-height: 1.5;
  font-size: 20px;
  padding: 0 30px;
  margin-bottom: 35px;
}
.ym-passkit__error-message--active {
  display: block;
}

#ym-passkit-qr-display .modal-content {
  background-color: #2e2e2e;
}

#ym-passkit-qr-display .close {
  font-weight: 400;
  font-size: 30px;
  color: #fff;
}

#ym-passkit-qr-display .ym-passkit-qr-display__usage-title,
#ym-passkit-qr-display .ym-passkit-qr-display__mobile-prompt-title {
  display: block;
  font-weight: 500;
  margin-bottom: 10px;
}
#ym-passkit-qr-display .ym-passkit-qr-display__mobile-prompt-title {
  font-size: 16px;
}

#ym-passkit-qr-display p:last-of-type {
  font-size: 12px;
}

#ym-passkit-qr-display .ym-passkit-qr-display__mobile-prompt {
  margin-top: 15px;
}

/* Auth Modal Prompt */
.ym-modal-auth-prompt {
  position: fixed;
  z-index: 999;
  top: 50%;
  right: 50%;
  width: calc(100% - 30px);
  margin: 0 auto;
  background-color: #122d6e;
  max-width: 850px;
  border-radius: 2px;
  padding: 30px 15px;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  transform: translate(200%, -50%);
  transition: all 0.5s ease-in-out;
  overflow: hidden;
}

.ym-modal-auth-prompt--active {
  transform: translate(0, -50%);
}

@media (min-width: 992px) {
  .ym-modal-auth-prompt {
    position: fixed;
    padding: 40px;
    right: 0;
  }
}

.ym-modal-auth-prompt--active {
  transform: translate(50%, -50%);
}

@media (min-width: 992px) {
  .ym-modal-auth-prompt--active {
    transform: translate(0, -50%);
  }
}

.ym-modal-auth-prompt::after {
  content: "";
  position: absolute;
  top: -94px;
  right: -145px;
  opacity: 0.15;
  background-image: url("../media/images/icons/yms-scanner-bg-icon.png");
  background-size: contain;
  background-repeat: no-repeat;
  transform: rotate(33deg);
  width: 600px;
  height: 600px;
  z-index: -1;
  display: none;
}
@media (min-width: 992px) {
  .ym-modal-auth-prompt::after {
    display: block;
  }
}

.ym-modal-auth-prompt__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

@media (min-width: 992px) {
  .ym-modal-auth-prompt__content {
    flex-direction: row;
    gap: 40px;
  }
}

.ym-modal-auth-instructions,
.ym-modal-auth-prompt__qr-container {
  flex: 1;
}

@media (min-width: 992px) {
  .ym-modal-auth-prompt__qr-container {
    flex: 0 0 auto;
  }
  .ym-modal-auth-instructions {
    flex: 1 1 auto;
  }
}

.ym-modal-auth-prompt__qr-wrapper {
  min-height: 250px;
  width: 100%;
  max-width: 250px;
  background-color: #fff;
  padding: 20px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 992px) {
  .ym-modal-auth-prompt__qr-wrapper {
    width: 250px;
  }
}

.ym-modal-auth-instructions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media (min-width: 992px) {
  .ym-modal-auth-instructions {
    align-items: flex-start;
  }
}

.ym-modal-auth-instructions .ym-modal-auth-instructions__title {
  font-size: 18px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 30px;
  text-align: center;
}

@media (min-width: 992px) {
  .ym-modal-auth-instructions .ym-modal-auth-instructions__title {
    font-size: 20px;
    text-align: left;
  }
}

.ym-modal-auth-instructions .ym-modal-auth-instructions__url {
  font-size: 14px;
  color: #d1d1d1;
  font-weight: 300;
  margin-bottom: 30px;
  text-align: center;
}

@media (min-width: 992px) {
  .ym-modal-auth-instructions .ym-modal-auth-instructions__url {
    text-align: left;
  }
}

.ym-modal-auth-instructions .ym-modal-auth-instructions__url a {
  display: block;
  color: #fff;
  text-decoration: none;
  word-break: break-all;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  margin-top: 10px;
}

@media (min-width: 992px) {
  .ym-modal-auth-instructions .ym-modal-auth-instructions__url a {
    margin-top: 0;
  }
}

.ym-modal-auth-instructions__auth-code {
  font-size: 14px;
  color: #d1d1d1;
  font-weight: 300;
  margin-bottom: 0;
  text-align: center;
  margin-bottom: 10px;
}

@media (min-width: 992px) {
  .ym-modal-auth-instructions__auth-code {
    text-align: left;
    margin-bottom: 0;
  }
}

.ym-modal-auth__auth-container {
  display: block;
  color: #fff;
  font-size: 48px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 6px;
  line-height: 1;
}

@media (min-width: 992px) {
  .ym-modal-auth__auth-container {
    font-size: 64px;
    letter-spacing: 8px;
  }
}

.ym-modal-auth-prompt .ym-modal-auth-prompt__close {
  font-size: 24px;
  font-weight: 500;
  position: absolute;
  top: 15px;
  right: 25px;
  transition: all 0.25s ease;
}

.ym-modal-auth-prompt .ym-modal-auth-prompt__close:hover,
.ym-modal-auth-prompt .ym-modal-auth-prompt__close:focus {
  cursor: pointer;
  transform: scale(0.95);
}

/* Bootstrap Overrides For Digital Services Dropdown */
.btn-group > .dropdown-menu {
  border-radius: 0;
  width: 100%;
}
.btn-group .dropdown-menu .dropdown-item {
  cursor: pointer;
}

/* Confirm Modal */
.ym-modal-confirm-wrapper {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ym-modal-confirm-wrapper--active {
  pointer-events: auto;
}

.ym-modal-confirm__load-wrapper {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 30px 0;
}

.ym-modal-confirm__load-wrapper--active {
  display: flex;
}

.ym-modal-confirm__close {
  font-size: 18px;
  font-weight: 500;
  position: absolute;
  top: 10px;
  right: 15px;
  transition: all 0.25s ease;
}

.ym-modal-confirm__close:hover,
.ym-modal-confirm__close:focus {
  cursor: pointer;
  transform: scale(0.95);
}

.ym-modal-confirm__loader {
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-bottom-color: #1b3e90;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: passRotation 1s linear infinite;
}
.ym-modal-confirm-wrapper__overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.7);
  transition: all 0.3s ease-in-out;
  pointer-events: none;
}

.ym-modal-confirm-wrapper--active .ym-modal-confirm-wrapper__overlay {
  opacity: 1;
  pointer-events: auto;
}

.ym-modal-confirm {
  position: relative;
  background-color: #242424;
  border-radius: 3px;
  width: calc(100% - 30px);
  max-width: 450px;
  padding: 40px 20px 20px;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

.ym-modal-confirm-wrapper--active .ym-modal-confirm {
  transform: translateY(0);
  opacity: 1;
}

.ym-modal-confirm__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.ym-modal-confirm__title {
  color: #fff;
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 500;
}

.ym-modal-confirm__message {
  color: #d1d1d1;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 30px;
}

.ym-modal-confirm__actions {
  display: flex;
  gap: 15px;
  width: 100%;
}

.ym-modal-confirm__button {
  flex: 1;
  padding: 10px 20px;
  border: none;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.ym-modal-confirm__button--primary {
  background-color: #1b3e90;
  color: #fff;
}

.ym-modal-confirm__button--primary:hover {
  background-color: #fff;
  color: #1b3e90;
}

.ym-modal-confirm__button--secondary {
  background-color: #2e2e2e;
  color: #fff;
}

.ym-modal-confirm__button--secondary:hover {
  background-color: #fff;
  color: #2e2e2e;
}

@media (min-width: 992px) {
  .ym-modal-confirm {
    padding: 50px 30px 30px;
  }

  .ym-modal-confirm__title {
    font-size: 20px;
  }

  .ym-modal-confirm__message {
    font-size: 16px;
  }

  .ym-modal-confirm__button {
    padding: 10px 20px;
    font-size: 14px;
  }
}
