/* iPhone 14 Pro dimensions: 393px × 852px @3x */
/* :root {
  --iphone-width: 393px;
  --iphone-height: 852px;
  --iphone-notch: 30px;
  --iphone-foot: var(--safe-area-bottom, 80px);
  --iphone-radius: 20px;
} */
/* iPhone 14 dimensions: 390px × 844px @3x */
:root {
  --safe-area-bottom: env(safe-area-inset-bottom);
  --iphone-width: 390px;
  --iphone-height: 844px;
  --iphone-aspect: 390 / 844;
  --iphone-notch: 30px;
  --iphone-foot: env(safe-area-inset-bottom);
  --iphone-radius: 20px;
}
/* :root {
  --safe-area-bottom: 80px;
  --iphone-width: 390px;
  --iphone-height: 844px;
  --iphone-aspect: 390 / 844;
  --iphone-notch: 30px;
  --iphone-foot: 80px;
  --iphone-radius: 20px;
} */

/* Prevent pull-to-refresh */
html,
body {
  overscroll-behavior-y: contain; /* Disables pull-to-refresh */
  touch-action: pan-y; /* Allow vertical scrolling but prevent other touch gestures */
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  /* ios swipe-to-reload gesture fix */
  overflow-y: auto; /* Changed from hidden to auto to allow scrolling */
}

body.dashboard {
  overscroll-behavior-y: contain; /* Disables pull-to-refresh */
  touch-action: none; /* Optional: Disables browser handling of pan/zoom */
  width: 100%;
  height: 100%;
  position: fixed;
  overflow-x: hidden;
  /* ios swipe-to-reload gesture fix */
  overflow-y: hidden;
}

.container-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
}

.container-loading .spinner-border {
  color: #76dbb9;
  width: 3rem;
  height: 3rem;
}

body {
  background-color: black;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: smaller;
  padding-bottom: env(safe-area-inset-bottom);
  min-height: -webkit-fill-available;
}

/* Emulation mode for large landscape screens  (min-width: 1024px) and (orientation: landscape) */
@media (orientation: landscape) {
  body.iphone-emulation {
    position: relative;
    max-width: var(--iphone-height);
    height: var(--iphone-height);
    margin: 2rem auto;
    overflow: hidden;
    /* border-radius: var(--iphone-radius);
    box-shadow: 0 0 0 12px #0f0f18, 0 0 0 14px #999, 0 0 50px rgba(0, 0, 0, 0.5); */
  }

  body.iphone-emulation .container {
    height: 100%;
    /* padding-top: var(--iphone-notch); */
    padding-bottom: var(--iphone-foot);
    overflow-y: auto;
  }

  /* Hide scrollbar but allow scrolling */
  body.iphone-emulation ::-webkit-scrollbar {
    display: none;
  }

  /* Modal adjustments */
  body.iphone-emulation .modal {
    position: absolute !important;
  }

  body.iphone-emulation .modal-dialog {
    max-width: var(--iphone-width);
    margin: 20px auto;
  }
}

/* Default mobile styles, (max-width: 1023px), (orientation: portrait) */

@media (orientation: portrait) {
  body.iphone-emulation {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
  }

  body.iphone-emulation::before {
    display: none;
  }
}

.container {
  padding: 0;
  margin: 0;
}

/* Prevent iOS viewport resize */
@supports (-webkit-touch-callout: none) {
  body.ios {
    height: 100%;
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}

/* Modal positioning fix */
.ios .modal {
  position: fixed;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.no-click {
  pointer-events: none;
}

.clickable {
  pointer-events: all !important;
  cursor: pointer !important;
}

.hidden,
.hide {
  display: none !important;
}

.hint {
  font-size: xx-small;
}

/* ================= nav-bar */
.navbar {
  background-color: #1e1e2f;
  border-bottom: 1px solid #666;
}

.navbar .nav-menu {
  display: flex;
  position: relative;
  margin: 0;
  left: 0;
}

.navbar .nav-menu .nav-link {
  text-align: center;
  cursor: pointer;
  padding: 0 0.2rem;
  margin: auto 0.7rem;
  color: #9bd2ff;
  max-width: 5rem;
  text-shadow: 1px 1px 3em white;
}

.navbar .nav-menu .nav-link.card-icon {
  opacity: 0.3;
}

.navbar .nav-menu .nav-link p {
  font-size: small;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.navbar .nav-menu .nav-link:hover,
.navbar .nav-menu .nav-link.active {
  color: #59a1e0;
}

.navbar .nav-menu .nav-link.card-icon:hover,
.navbar .nav-menu .nav-link.card-icon.active {
  opacity: 1;
}

.navbar .navbar-brand {
  display: inline-flex;
  position: absolute;
  right: 0;
  margin: 0;
}

.navbar .dropdown-menu {
  background-color: transparent;
  font-size: inherit;
}

.navbar .nav-logo {
  height: auto;
  width: auto;
  max-height: 2rem;
  max-width: 100px;
}

.dash-card.bordered {
  border: 1px solid #ccc;
  border-radius: 1rem;
  padding: 0.25rem;
  background-color: #034883;
}

.dash-card.edit {
  border: 1px solid #ccc;
  border-radius: 1rem;
  padding: 0.25rem;
  /* background-color: #03837d; */
}

.dash-card img {
  width: auto;
  height: 20vh;
}
.dash-card.smaller {
}
.dash-card.smaller img {
  width: 100%;
  height: auto;
  object-fit: contain;
  aspect-ratio: 2 / 3;
  box-shadow: 0px 0px 30px #a2e1ff;
}

.dash-card .title {
  /* font-size: x-small; */
}

.modal-content {
  background: linear-gradient(to bottom, #101d29, #000000);
  border-radius: 1rem;
  box-shadow: 0 0 40px #59a1e0;
}

.modal-header {
  border: 0;
}

.modal-header .wizard-logo {
  height: 2rem;
  width: auto;
  margin: 0 auto;
  text-align: center;
}

.modal-footer {
  position: static;
  border: 0;
}

.modal-footer.full {
  position: fixed;
  bottom: 0;
}

.form-select-dark {
  background: linear-gradient(to bottom, #001424, #00070c);
  border: none;
  border-radius: 0.5rem;
  color: #389eef;
  text-align: center;
}

.form-select-dark option {
  background-color: #00070c;
  text-align: center;
}

.form-select-sm,
.form-select-sm option {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.btn {
  background: linear-gradient(to bottom, #001424, #00070c);
  border: 1px solid #14598f;
  border-radius: 0.5rem;
  color: white;
  font-weight: bold;
  pointer-events: initial;
}

.btn.bottom-center {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 0%);
}

.btn.red {
  background: linear-gradient(to right, #830303, #e05959);
}

.btn:hover {
  border-color: #389eef;
  color: inherit;
}

.text-sm {
  font-size: x-small;
}

.btn.text-sm {
  padding: 0.25rem;
}

.form-control {
  background: #1e1e2f;
  border: 2px solid #59a1e0;
  color: white;
}

.form-control.white {
  background-color: white;
  font-size: small;
  padding: 0.5rem;
  color: black;
}

.form-check.public {
  font-size: smaller;
}

.label-button {
  color: #59a1e0;
  cursor: pointer;
}

#vcardForm {
  text-align: left;
}

#vcardForm label,
#vcardForm input {
  font-size: small;
}

#vcardForm.previewer {
  font-size: small;
  text-align: center;
}

#vcardForm.previewer label {
  font-weight: 400;
}

#vcardForm.previewer input,
#vcardForm.previewer a {
  padding: 0.125rem;
  font-size: small;
  border: 0;
  background-color: transparent;
}

#triggar-qr,
.qr-holder {
  width: initial;
  pointer-events: all;
  cursor: pointer;
}

#triggar-qr.zoom,
.qr-holder.zoom {
  position: absolute;
  width: 100%;
  top: 20vh;
}

.ios #triggar-qr.zoom,
.android #triggar-qr.zoom,
.ios .qr-holder.zoom,
.android .qr-holder.zoom {
  width: 100vw;
  top: calc(50% - 50vw);
}
.zoom img {
  position: absolute;
  width: 100%;
}

.field-row.centered {
  margin: 0 auto;
}

.preview {
  height: auto;
  width: calc(var(--iphone-width) * 0.65);
  padding: 0;
  margin: 0;
  border: 0;
  text-align: center;
  background: linear-gradient(to bottom, #389eef, #000000);
  cursor: pointer;
}

.android .preview,
.ios .preview {
  width: calc(100vw * 0.7);
}

.preview.full {
  height: 100vh;
  width: auto;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
}

.preview.full {
  left: 50%;
  transform: translateX(-50%);
}

.ios .preview.full {
  height: calc(100vh - 100px);
}
.android .preview.full {
  height: calc(100vh - 60px);
}

.scroll-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9000;
  animation: fadeIn 0.5s ease-out;
}

.arrow-icon {
  font-size: 20px;
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.fixed-icon {
  position: fixed;
  top: 30%;
  right: 0;
  transform: translate(0%, 50%);
  background: black;
  padding: 0.25rem;
  box-shadow: 0px 0px 30px #a2e1ff;
  border-radius: 0.5rem;
  z-index: 10;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fixed-icon img {
  width: 3rem;
  height: auto;
}

.fixed-icon.edit-vcard {
  top: 30%;
}
.fixed-icon.start-wizard {
  top: 60%;
}

.preview.focus {
  aspect-ratio: 1 / 1;
  height: 150px;
  width: auto;
}

.preview.active {
  /* height: auto; */
  /* max-height: 60vh; */
  background: transparent;
  border: 1px dashed #59a1e0;
}

.preview .active .image-wrapper {
  width: 100%;
  height: 100%;
}

.preview-text {
  position: relative;
  top: 50%;
  pointer-events: none;
}

.preview img,
.preview video {
  object-fit: cover !important;
  position: relative;
}
.preview.active img,
.preview.active video {
  /* top: calc(50%);
  transform: translateY(-50%); */
}

.preview.focus img,
.preview.focus video {
  top: unset;
  transform: unset;
  height: 100%;
}

.preview.full img,
.preview.full video {
  top: unset;
  transform: unset;
  height: 100%;
}

.preview .menu-label {
  font-size: small;
}

.step-visual {
  height: 4rem;
  width: auto;
}

.step-visual.background {
  position: absolute;
  top: -2rem;
  right: 3rem;
  box-shadow: 0px 0px 30px #a2e1ff;
}

.step-visual.background.title-icon {
  top: 6rem;
  width: 2rem;
  height: auto;
  right: 0.5rem;
  box-shadow: none;
}

#wizardModal .modal-dialog {
  max-width: max(var(--bs-modal-width), 90%);
}

#wizardContent h2 {
  position: absolute;
  top: -40px;
  pointer-events: none;
}

.wizard-footer {
  position: absolute;
  left: 0;
  padding-left: 1rem;
  padding-right: 5rem;
  text-align: left;
}

.wizard-title {
  font-size: large;
  color: #8bc9ff;
}

.white {
  color: white;
}

.copyButton,
.copyIndicator {
  border: 1px solid #aaa;
  font-size: x-small;
  padding: 0.2rem;
  margin: auto;
  height: 100%;
  width: fit-content;
}

/* ================= project list */

.project-card-holder.topic-page .paging-buttons {
  z-index: 10;
}
.project-card-holder.topic-page .paging-buttons .btn {
  position: absolute;
  background: transparent;
  border: 0;
  text-shadow: 1px 1px 0.5em black;
}

.project-card-holder.topic-page .paging-buttons .page-prev {
  left: 1rem;
}
.project-card-holder.topic-page .paging-buttons .page-next {
  right: 1rem;
}

.project-card-holder.col-12 {
  font-size: initial;
}

.project-card-holder.col-12 .card-icon {
  width: 3rem;
  height: 3rem;
}

.project-card-holder.col-12 .middle-button {
  line-height: 3rem;
  padding: 0 0.8rem;
  font-size: large;
}

.project-card-holder.col-12 .project-info {
  font-size: large;
}

.project-card-holder.col-12 .project-info .title {
  font-size: xx-large;
}

.project-card-holder.topic .project-info {
  font-size: smaller;
  padding: 1rem;
}

body.iphone-emulation .project-card-holder.topic .project-info {
  font-size: initial;
  padding: 1rem;
}

.project-card-holder.main.topic .project-info,
.project-card-holder.detail.topic .project-info {
  border-radius: 1rem;
}

.project-card-holder .topic .project-info .title {
  font-size: large;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-wrap; /* respect \n */
  text-shadow: 1px 1px 0.5em black, 1px 1px 0.5em black;
}

.tile-reader {
  position: absolute;
  width: 90%;
  transform: translate(-50%, -55%) scale(1) !important;
  pointer-events: all;
  opacity: 1;
}

.tile-reader .project-card-holder .topic .project-info .title,
.tile-share .project-card-holder.topic.summary .project-info .title {
  font-size: 3em;
}

.project-card-holder .topic .project-info .description {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  max-height: 6em;
  overflow-x: hidden;
  overflow-y: hidden;
  white-space: pre-wrap; /* respect \n */
  text-shadow: 1px 1px 0.5em black, 1px 1px 0.5em black;
  pointer-events: none;
}

.tile-reader .project-card-holder .topic .project-info .description,
.tile-share .project-card-holder.topic.summary .project-info .description {
  font-size: 1.7em;
  overflow-y: auto;
  pointer-events: initial;
}

body.iphone-emulation .tile-reader {
  transform: translate(-50%, -50%) scale(0.7) !important;
}

body.iphone-emulation .tile-reader .project-card-holder .topic .project-info .description,
body.iphone-emulation .tile-share .project-card-holder.topic.summary .project-info .description {
  font-size: x-large;
}

body.iphone-emulation .tile-reader .project-card-holder .topic .project-info .title,
body.iphone-emulation .tile-share .project-card-holder.topic.summary .project-info .title {
  font-size: xx-large;
}

.project-card-holder.topic.preview-card {
  border: 1px solid #0ef1f1;
  box-shadow: 0 0 10px #0ef1f1, 0 0 30px #075353;
}

.project-card-holder.topic.summary .project-info .description {
  max-height: 20em;
}

.tile-share .share-link {
  position: fixed;
  bottom: -3rem;
  font-size: smaller;
  text-decoration: none;
}

.tile-share .share-link a {
  color: #8bc9ff;
  text-decoration: none;
}

.project-card-holder.topic:not(.summary) .project-info .description {
  max-height: 6em;
}

.project-card-holder .topic a {
  text-decoration: none;
  color: #8bc9ff;
}

.project-card-holder .topic .project-card-media-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 0 10px #59a1e0;
  background-color: black;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
}

.project-card-holder .topic .project-card-media-background .media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-holder .topic .project-card-media-background video.media,
.project-card-holder .topic .project-card-media-background iframe {
  pointer-events: all;
}

.project-card-holder .topic .project-card-content-overlay {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  width: calc(100% - 2rem);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 1rem;
  /* background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.75) 30%, rgba(0, 0, 0, 0) 100%); */
  z-index: 1;
  /* Apply a backdrop filter to blur the content behind this element */
  -webkit-backdrop-filter: blur(2px); /* For Safari */
  backdrop-filter: blur(2px);
  /* A semi-transparent background is necessary for the blur effect to be visible */
  background-color: rgba(0, 0, 0, 0.3);
}

.project-card-holder .topic .card-img-container {
  aspect-ratio: unset;
  max-height: 200px;
}

.project-card-holder .topic .card-img-top {
  object-fit: cover;
}

.project-card .form-check-input:checked {
  background-color: #034883;
  border-color: #034883;
}

.project-card-holder {
  /* transform: translateZ(0);
  will-change: transform; */
}

.project-card {
  padding-top: 0.5rem;
  background: black;
  border-radius: 1rem;
  box-shadow: 0 0 10px #59a1e0;
  color: #cfeaff;
  overflow: hidden;
  font-size: smaller;
  /* transform: translateZ(0);
  will-change: transform; */
}

.triggar-project .project-card.topic,
.triggar-project .paging-buttons {
  display: none;
}

.tile-uninject-triggar-btn {
  display: none;
}

.triggar-project .tile-uninject-triggar-btn {
  display: initial;
}

.project-card.vcard-project {
  box-shadow: 0 0 10px #59e0b7;
  background: #012017;
}

.project-card .row > * {
  padding: 0;
}

.project-card .card-menu-item {
  pointer-events: all;
  cursor: pointer;
}

.card-icon {
  background-position: center, center;
  background-size: contain, contain;
  background-repeat: no-repeat;
}

.project-card .card-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 auto;
  background-image: var(--foreground-url), url('../images/wizard/ButtonGen.png');
}

.project-card .card-icon.favorite-btn.active {
  background-image: url('../images/wizard/Heart-red.png'), url('../images/wizard/ButtonGen.png');
}

.project-card .middle-button {
  background: linear-gradient(to right, black, #062743);
  border: 1px solid #224564;
  border-radius: 0.25rem;
  /* font-size: smaller; */
  line-height: 1.4rem;
  padding: 0 0.4rem;
}

.card-img-container {
  /* pointer-events: none; */
  aspect-ratio: 2 / 3;
}

/* also used by product-card! */
.card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card.inactive .project-info {
  color: #666;
}

.project-card.inactive .card-img-container {
  opacity: 0.1;
}

.main-options {
  font-size: larger;
}

.content-section {
  scroll-margin-top: 120px;
  overflow-x: hidden;
  overflow-y: auto;
}

.content-section.has3d {
  width: 100%;
  position: absolute;
  left: 0;
  z-index: 10;
  min-height: calc(100% - 60px);
  pointer-events: none;
}

.content-section.disabled {
  opacity: 0.1;
}

.product-card {
  border: 1px solid #666;
  border-radius: 1rem;
  margin: 0.5rem 0.15rem;
  padding: 0.15rem;
  cursor: pointer;
}

.product-card:hover,
.product-card.selected {
  transition: box-shadow 0.3s ease-in-out;
  box-shadow: 0 0 15px 5px rgba(0, 123, 255, 0.5);
}

.product-card .card-title {
  font-weight: 600;
}
.product-card.view .card-title {
  font-weight: unset;
}

.product-card.view .card-text {
  font-size: x-small;
}

.product-card.view .card-img-top-container {
  height: 150px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background-color: #000;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.bullet-targets p {
  font-size: x-small;
}

.bullet-list li,
.bullet-targets .bullet-title {
  font-size: smaller;
  font-weight: 600;
}

/* ================= overlay focus buttons menu // */
.custom-ui {
  aspect-ratio: var(--iphone-aspect);
  overflow: hidden;
  position: relative;
  margin: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  box-shadow: 0px 0px 30px #a2e1ff;
}

.custom-ui .overlay {
  pointer-events: none;
  /* position: fixed; */
  /* width: 100%; */
  /* height: 100%; */
  margin: 0 auto;
  text-align: center;
  display: none;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 1);
}

.custom-ui.edit .overlay.video,
.custom-ui.videohelper .overlay.video {
  display: block;
  position: absolute;
  font-size: large;
  width: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.custom-ui.videohelper.clicked .overlay.video {
  /* once clicked or edit mode, hide overlay.video */
  display: none;
}

.custom-ui.edit .overlay.launch,
.custom-ui.launchhelper .overlay.launch {
  position: absolute;
  pointer-events: initial;
  cursor: pointer;
  display: block;
  font-size: large;
  top: 80%;
  width: 100%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
}

.custom-ui.menuhelper {
  pointer-events: none;
}

.custom-ui.edit {
  pointer-events: all !important;
  box-shadow: none;
}

.custom-ui.menuhelper .overlay.menu {
  height: 100%;
  overflow: hidden;
  display: block;
}

.custom-ui .menu-toggle {
  display: none;
  font-size: larger;
  color: rgb(210, 244, 255);
  bottom: 80px;
  width: auto;
  left: 50%;
  transform: translate(-50%, -50%);
}

.custom-ui .menu-toggle.ios {
  /* bottom: 120px; */
}

.custom-ui .menu-toggle.active {
  pointer-events: initial;
  cursor: pointer;
  display: initial;
}

.custom-ui .icon {
  display: none;
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 1.5rem;
  height: 1.5rem;
  min-width: 1.5rem;
  max-height: 1.5rem;
  font-size: larger;
  /* opacity: 0.5; */
}

.custom-ui .icon.active {
  pointer-events: initial;
  cursor: pointer;
  display: initial;
}

.custom-ui .icon.disabled {
  pointer-events: initial;
  cursor: pointer;
  display: initial;
  opacity: 0.5;
}

.custom-ui .icon.assistent {
  background-image: url(../viewer/img/triggAR.png);
  margin-top: 0.5rem;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0%);
}

/* .custom-ui .assistent.ios {
  bottom: 100px;
} */

.custom-ui .vcard {
  width: 4rem;
  height: 4rem;
  max-height: unset;
  background-image: url(../viewer/img/business-card.webp);
  top: 30%;
  right: 0;
  left: unset;
}

.custom-ui .overlay .corner-image {
  display: none;
  position: absolute;
  width: 25%;
  max-width: 200px;
  background-color: black;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  z-index: 100;
  /* pointer-events: initial; */
  cursor: pointer;
  box-shadow: 0px 0px 30px #a2e1ff;
  border-radius: 0.5rem;
  margin: 0.25rem;
  /* transition: all 0.1s ease; */
}

.custom-ui .overlay .corner-image.active.labeled {
  border-radius: 0.5rem 0.5rem 0 0;
}

.custom-ui .overlay .corner-image.active.zoom.messaged .image-wrapper {
  display: none;
}

.custom-ui .overlay .corner-image.active.labeled.zoom {
  border-radius: 0.5rem;
}

.custom-ui .overlay .corner-image.active.labeled.zoom.messaged {
  background-color: rgb(0 0 0 / 90%);
}

.custom-ui .overlay .corner-image.active.labeled.zoom.messaged .menu-label {
  background-color: rgb(0 0 0 / 80%);
  width: 100%;
  border-radius: inherit;
}

.custom-ui .overlay .corner-image .image-wrapper {
  pointer-events: none;
  position: relative;
  width: 100%;
  padding-top: 100%; /* Maintains a square aspect ratio */
  overflow: hidden;
  border-radius: 0.5rem;
}

.custom-ui .overlay .corner-image.labeled .image-wrapper {
  border-radius: 0.5rem 0.5rem 0 0;
  border-bottom: solid 1px #666;
}

.custom-ui .overlay .corner-image img,
.custom-ui .overlay .corner-image video {
  pointer-events: initial;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  margin: 0;
}

.custom-ui .overlay .corner-image .menu-label {
  font-size: x-small;
  line-height: 1.4;
  max-width: 100%;
  color: white;
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.custom-ui .overlay .corner-image.active,
.custom-ui.edit .overlay.menu .corner-image {
  display: flex;
  pointer-events: initial;
  cursor: pointer;
  /* display: initial;
  box-shadow: 0px 0px 30px #a2e1ff;
  border-radius: 1rem; */
}

.custom-ui.edit .overlay .image-wrapper {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-image: none;
}

.custom-ui.edit .overlay.menu .corner-image .image-wrapper {
  background-image: url(../images/icon-plus-lila.webp);
}

.custom-ui.edit .overlay.menu .corner-image.active .image-wrapper {
  background-image: none;
  opacity: 1;
}

.custom-ui .overlay .corner-image.active.hidden {
  display: none !important;
}

.custom-ui .overlay .corner-image.labeled .menu-label {
  padding: 0.1rem 0.25rem 0.1rem 0.25rem;
}

.custom-ui .overlay .corner-image.active.zoom {
  position: fixed;
  max-width: unset;
  margin: 0;
  background-color: black;
  z-index: 1000;
  justify-content: center;
}

.custom-ui .overlay .corner-image.active.zoom .image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding-top: initial;
}

/* .custom-ui .overlay .corner-image.active.labeled img,
.custom-ui .overlay .corner-image.active.labeled video {
  border-bottom-left-radius: initial;
  border-bottom-right-radius: initial;
} */

/* .custom-ui .overlay .corner-image.active img {
  border-radius: 1rem;
} */

.custom-ui .overlay .corner-image.center-center {
  position: absolute;
  max-height: unset;
  max-width: unset;
  margin: 0;
  box-shadow: none;
  background-color: transparent;
  z-index: 0;
  cursor: initial;
}

.custom-ui .overlay .corner-image.center-center img,
.custom-ui .overlay .corner-image.center-center video {
  pointer-events: none;
  cursor: initial;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
}

.custom-ui .overlay .corner-image.center-center .image-wrapper {
  position: absolute;
  aspect-ratio: unset !important;
  padding: 0;
  margin: 0;
}

.custom-ui .overlay .corner-image.center-center .image-wrapper.mirror {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  overflow: initial;
}

.custom-ui .overlay .corner-image.center-center .image-wrapper.mirror img,
.custom-ui .overlay .corner-image.center-center .image-wrapper.mirror video {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.custom-ui .overlay .corner-image.center-center .image-wrapper img.no-mirror,
.custom-ui .overlay .corner-image.center-center .image-wrapper.video.no-mirror {
  /* when effect is rendering hero asset, hide the img/video */
  display: none;
}

.custom-ui .overlay .corner-image.center-center .image-wrapper.contain img,
.custom-ui .overlay .corner-image.center-center .image-wrapper.contain video {
  object-fit: contain;
}

.custom-ui .overlay .corner-image.center-center .image-wrapper .effect-canvas {
  position: absolute;
  pointer-events: none;
  top: 0;
  left: 0;
  border-radius: 1rem;
}

.custom-ui .overlay .corner-image.center-center .image-wrapper.mirror .effect-canvas {
  top: 100%;
  left: 0;
  transform: scaleY(-1);
  border-radius: 1rem;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.custom-ui .message-container {
  width: 100%;
  height: 100%;
  text-align: left;
  font-size: initial;
  white-space: pre-line;
  line-height: 2;
  padding: 2rem;
  overflow: auto;
}

.custom-ui .message-container.large-font {
  font-size: xx-large;
}

.custom-ui .overlay .top-left {
  top: 0;
  left: 0;
}
.custom-ui .overlay .top-right {
  top: 0;
  right: 0;
}
.custom-ui .overlay .bottom-left {
  /* bottom: 80px; */
  bottom: 1rem;
  left: 0;
}
.custom-ui .overlay .bottom-right {
  /* bottom: 80px; */
  bottom: 1rem;
  right: 0;
}
.custom-ui .overlay .bottom-center {
  /* bottom: 80px; */
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
}

.custom-ui .overlay .bottom-left.ios {
  /* bottom: 120px; */
  left: 0;
}
.custom-ui .overlay .bottom-right.ios {
  /* bottom: 120px; */
  right: 0;
}

.custom-ui .overlay .corner-image.active.zoom {
  position: relative;
  width: calc(100% - 2rem);
  max-height: 70%;
  height: 100%;
  overflow: hidden;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  bottom: unset;
  right: unset;
}

.custom-ui .overlay.dbg {
  display: block;
  pointer-events: initial;
  bottom: 1%;
  right: 0.1rem;
  width: fit-content;
}

.custom-ui .overlay.tools {
  display: block;
  /* pointer-events: initial; */
  bottom: 1%;
}

.custom-ui .btn {
  pointer-events: initial;
}

.bottom-ui-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  height: 20%;
  width: 100%;
  bottom: 0;
  z-index: 2;
}

.unmute-button {
  border: none;
  background-color: purple;
  color: white;
  padding: 10px 20px;
  font-size: 16px;
}

.button-container {
  display: flex;
  flex-direction: column;
  text-align: center;
  width: 368px;
  max-width: 100%;
  margin-top: 1rem;
  padding: 0 24px;
  font-size: 18px;
}

.button-container button {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 24px;
  font-weight: 500;
  line-height: 133%;
  border-radius: 48px;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.button-container button.small {
  padding: 0.5rem 0.7rem;
  font-weight: 400;
  line-height: 100%;
  border-radius: 1rem;
  width: fit-content;
  margin: auto;
}

.card.ais {
  margin: 0.5rem;
  padding: 0.5rem;
  background-color: #0f1524;
  color: white;
  border-color: #8bc9ff;
}

.card.ais .ais-property {
  text-align: center;
}
.card.ais .title {
  font-size: initial;
  color: #8bc9ff;
  padding-bottom: 0.5rem;
}

.card.ais .ais-property img,
.card.ais .ais-property video {
  width: 100%;
  height: auto;
}
.card.ais .ais-property a {
  text-decoration: none;
  color: #8bc9ff;
}

.ais-link span,
.ais-prop span {
  color: #9fd0f8;
}

#sphere-container {
  overscroll-behavior-y: auto;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  /* transition: transform 0.1s linear; */
  perspective: 1000px;
  overflow: hidden;
  background: transparent;
}

#sphere-container-share,
#sphere-container-reader {
  overscroll-behavior-y: auto;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
}

#sphere-container .project-card.triggar-project iframe {
  pointer-events: none;
}

.tile {
  aspect-ratio: 2 / 3;
  display: flex;
  justify-content: center;
  align-items: center;
  /* backface-visibility: hidden; */
  transition: all 0.3s ease-out;

  /* Prevent text selection */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;

  /* Prevent long-tap selection on mobile */
  -webkit-touch-callout: none;

  transform: translateZ(0);
  will-change: transform;
}

/* Media loading state for 3D tiles to prevent rendering artifacts */
.tile.media-loading {
  /* Reduce opacity during media loading to minimize visual artifacts */
  opacity: 0.7 !important;
  /* Disable hardware acceleration temporarily to prevent texture conflicts */
  transform: translateZ(0) !important;
}

/* Mobile-specific optimizations for 3D rendering */
@media (hover: none) and (pointer: coarse) {
  .tile {
    /* Force GPU layer but avoid excessive layer creation */
    will-change: transform, opacity;
    /* Ensure crisp rendering on mobile */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .tile .media {
    /* Prevent lazy loading artifacts in 3D space on mobile */
    content-visibility: visible !important;
    /* Ensure media elements are render-ready */
    contain: layout style paint;
  }
}

.tile.placeholder {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2rem;
}

.sphere-bg-media {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  height: auto;
  width: 100%;
  /* opacity: 0.5; */
  z-index: -1;
  object-fit: contain;
}

.sphere-bg-media.share {
  object-fit: cover;
}

/* For mobile compatibility */
@media (max-aspect-ratio: 16/9) {
  .sphere-bg-media {
    height: auto;
    width: 100%;
  }
}

.line-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  pointer-events: none;
}

.glow-line {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(100, 200, 255, 0.8) 0%, rgba(100, 200, 255, 0.2) 100%);
  box-shadow: 0 0 10px rgba(100, 200, 255, 0.3);
  filter: blur(1px);
  pointer-events: none;
  /* transition: all 0.3s ease-out; */
}

.orb-menu-holder {
  position: absolute;
  bottom: 5rem;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 1040;
}

.orb-menu {
  pointer-events: initial;
  display: flex;
  list-style-type: none;
  padding: 0;
  margin: 0;
  overflow: auto;
}

.orb-menu.feedback-menu {
  z-index: 1060;
  pointer-events: none;
}

.orb-menu.focus-menu {
  background-color: black;
  border: 1px solid rgb(45, 45, 45);
  border-radius: 0.25rem;
}

.feedback-link {
  pointer-events: none;
  padding: 0.2rem 0.5rem;
  font-weight: initial;
  color: #76dbb9;
  text-shadow: 0 0 8px #6cac96, 0 0 10px #76dbb9;
}

.orb-link {
  pointer-events: initial;
  cursor: pointer;
  padding: 0.2rem 0.2rem;
  margin: auto;
  font-weight: initial;
  color: #6d95a8;
  text-shadow: 0 0 5px white;
}

.orb-menu.focus-menu .orb-link {
  text-shadow: 0 0 5px white;
  font-size: 0.7rem;
}

.orb-link.active {
  color: #0ef1f1;
  text-shadow: 0 0 10px white;
}

.orb-link.active.editing {
  color: #f1870e;
}

#prompt-panel-toggle {
  height: 4rem;
}

#prompt-panel-toggle.active {
  opacity: 0.3;
}

.prompt-panel {
  display: none;
  position: absolute;
  left: 0;
  width: 100%;
  background-color: black;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 1rem;
  box-sizing: border-box;
  z-index: 1050;
  color: white;
  font-weight: 100;
}

.prompt-panel.assistant {
  bottom: 4rem;
}

.prompt-panel.edit-tile {
  bottom: 5rem;
  height: 30vh;
}

.prompt-panel textarea {
  flex-grow: 1;
  width: 100%;
  background-color: #001424;
  color: white;
  border: 1px solid #555;
  padding: 0.5rem;
  margin-bottom: 0.25rem;
  resize: vertical;
  border-radius: 0.25rem;
}

.prompt-panel .chat-box {
  position: relative;
  width: -webkit-fill-available;
  height: calc(100svh - 22rem);
  overflow-y: auto;
  padding: 0;
  border: none;
  background-color: black;
}

.prompt-panel textarea,
.prompt-panel .response-text,
.prompt-panel .chat-box span {
  font-size: 1.2rem;
}

.prompt-panel .chat-box span {
  width: -webkit-fill-available;
  word-break: break-word;
  overflow: hidden;
}

.prompt-panel .chat-you {
  color: rgb(174, 212, 255);
}

.prompt-panel .chat-bot {
  color: rgb(238, 245, 147);
}

.prompt-panel.assistant .user-chat {
  background-color: #161a25;
  padding: 0.25rem;
  margin-bottom: 0.25rem;
  border: 1px solid #333;
  border-radius: 1rem;
}

.prompt-panel.assistant .bot-chat,
.prompt-panel.assistant .bot-chat-container {
  padding: 0.25rem;
  margin-bottom: 0.25rem;
  /* border: 1px solid #333;
  border-radius: 1rem;
  background-color: #0e1118; */
}

.prompt-panel.assistant .bot-chat.progress-response,
.prompt-panel.assistant .bot-chat.progress-response .btn,
.prompt-panel.assistant .bot-chat.progress-response .panel-title {
  color: #666 !important;
}

/* topics inside chat */
.prompt-panel.assistant .bot-chat-container .article-item {
  border: 1px solid #666;
  border-radius: 0.5rem;
  color: white;
}

.prompt-panel.assistant .bot-chat-container .article-title {
  font-size: larger;
}

.prompt-panel.assistant .bot-chat-container .article-link {
  color: #9bd2ff;
  text-decoration: none;
}

.prompt-panel.assistant .bot-chat-container .article-age {
  color: #888;
}

.prompt-panel.assistant .bot-chat-container .topic-button.active {
  background: linear-gradient(to bottom, #001424, #4388b9);
}

.prompt-panel.assistant .bot-chat-container .topic-button.final {
  color: #9bd2ff;
}

.prompt-panel.assistant .bot-chat-container .topic-comment {
  color: #678297;
  font-style: italic;
}

.prompt-panel .form-control:focus {
  background-color: #05102d;
  color: white;
}

.prompt-panel .form-control::placeholder {
  color: #818181;
  opacity: 1;
  font-size: small;
}

/* For better cross-browser support: */
.prompt-panel .form-control::-webkit-input-placeholder {
  color: #b0b0b0;
  font-size: small;
}
.prompt-panel .form-control::-moz-placeholder {
  color: #b0b0b0;
  font-size: small;
}
.prompt-panel .form-control:-ms-input-placeholder {
  color: #b0b0b0;
  font-size: small;
}
.prompt-panel .form-control::-ms-input-placeholder {
  color: #b0b0b0;
  font-size: small;
}

.prompt-panel textarea.tile-text {
  color: yellow;
}

.prompt-panel.active {
  display: flex;
  flex-direction: column;
  border: 1px solid rgb(45, 45, 45);
}

.tag-checkbox-label {
  font-weight: 100;
}

.tag-checkbox-label.selected {
  background: linear-gradient(to bottom, #008cff, #00528d);
}

.tag-checkbox-label:hover {
  color: yellow !important;
  border-color: yellow !important;
  /* text-decoration: none; */
}

.nested-form {
  background-color: #000;
  border: 1px solid #213153;
  border-radius: 1rem;
  padding: 0.5rem;
}

#debugTabs.nav-tabs .nav-link {
  background-color: transparent;
  color: #4c5055;
  border-color: #191b1c;
  border-bottom: none;
}

#debugTabs.nav-tabs .nav-link:not(.active):hover {
  color: #f8f9fa;
  background-color: #000;
  border-color: #495057;
}

#debugTabs.nav-tabs .nav-link.active {
  color: #58a6ff;
  background-color: #000;
  border-color: #495057;
  border-bottom-color: #000;
}

/* Example: element with visible scrollbar */
.scrollbar-visible {
  overflow-y: auto;
  max-height: 200px;
}

/* Example: element with no visible scrollbar (but still scrollable) */
.scrollbar-hidden {
  overflow-y: auto;
  max-height: 200px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}
.scrollbar-hidden::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Example: pointer-events based on scrollability */
.scrollable-pointer {
  overflow: auto;
  max-height: 200px;
  max-width: 300px;
  /* Default: allow pointer events if scrollable */
  pointer-events: all;
}

/* If you want to disable pointer events when not scrollable, use a modifier class */
.scrollable-pointer.no-scroll {
  overflow: hidden;
  pointer-events: none;
}

/* Usage:
<div class="scrollable-pointer">...</div> // scrollable, pointer-events: all
<div class="scrollable-pointer no-scroll">...</div> // not scrollable, pointer-events: none
*/

.tile-icon {
  position: absolute;
  bottom: 0.4rem;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #003078;
  background-color: #9bd2ff;
}

.tile-icon.share-btn {
  left: 0.4rem;
}

.unsaved .tile-icon.share-btn {
  display: none;
}

.tile-icon.tile-save-btn {
  right: 0.4rem;
}

.tile-icon.tile-save-btn .saved {
  display: initial;
}

.tile-icon.tile-save-btn .unsaved {
  display: none;
}

.unsaved .tile-icon.tile-save-btn .saved {
  display: none;
}
.unsaved .tile-icon.tile-save-btn .unsaved {
  display: initial;
}

.tile-icon i {
  font-size: 0.5em !important;
}

#sphere-container-reader .tile-reader .tile-icon i {
  font-size: 1em !important;
}

#sphere-container-share .tile-share .tile-icon {
  display: none !important;
}

.tile-close-reader-btn {
  position: relative;
  left: 50%;
  transform: translate(-50%, 60px);
  z-index: 10;
  height: 2.5rem;
  width: 2.5rem;
  border: 0;
}

#sphere-container-reader .tile-edit-form {
  display: none;
  position: relative;
  width: 100%;
  height: calc(100svh - 4rem);
  transform: translate(-50%, -40%);
  pointer-events: all;
  opacity: 1;
  background: rgba(20, 20, 20, 0.7);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1050;
}

@media only screen and (min-width: 769px) {
  #sphere-container-reader .tile-edit-form {
    position: fixed;
    width: 50%;
  }

  .prompt-panel textarea,
  .prompt-panel .chat-box span {
    font-size: 0.8rem;
  }
}

#sphere-container-reader textarea {
  resize: vertical;
  background: rgb(40, 40, 40);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 0.85rem;
  padding: 0.4rem;
  font-family: monospace;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: auto;
  word-wrap: normal;
}

#sphere-container-reader .tile-edit-info {
  white-space: initial;
  color: #999;
  font-size: small;
}

#sphere-container-reader .tile-edit-prompt {
  color: #ffff87;
}

#sphere-container-reader .tile-edit-system-prompt {
  color: #daeeff;
}
