@font-face {
  font-family: "BureauVeritas";
  src: url("/assets/fonts/BureauVeritas-ExtBdUltraCond.ttf");
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background-color: #ffffff;
}

#imageViewerContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #ffffff;
  height: 100vh;
  width: 100vw;
  border-radius: 8px;
}

.header {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 10px 15px;
  border-bottom: 0.5px solid #DFDFDF;
}

.header-left {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

.imageName {
  font-weight: 400;
  font-family: BureauVeritas;
  font-size: 13px;
}

.text3.imageName {
  font-family: BureauVeritas;
}

.text3 {
  font-family: Arial;
  font-size: 12px;
  font-weight: 400;
}

.text4 {
  font-family: Arial;
  font-size: 12px;
  font-weight: 300;
  text-align: center;
}

.actionButton {
  display: flex;
  gap: 4px;
}

.actionButton button,
.actionButton label {
  background: none;
  border: none;
  cursor: pointer;
}

#previous, #next {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: fit-content;
  background: none;
  border: none;
  cursor: pointer;
}

#previous img, #next img {
  height: 14px;
}

.indexDiv {
  color: #41413f;
  display: flex;
  gap: 5px;
  background: #f3f3f3;
  padding: 3px 8px;
  border-radius: 4px;
}

.indexDiv span {
  width: max-content;
  font-weight: 600;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
}

.mySlides {
  display: flex;
  position: relative;
  overflow: visible;
  height: calc(100% - 50px);
  flex-direction: column;
  width: 100%;
  flex: 1;
}

#imageContainer {
  height: 100%;
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  flex: 1;
  position: relative;
}

.image-zoom-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

#imageContainer .slideshow-image {
  width: auto;
  height: auto;
  /* object-fit: cover; */
  /* transform-origin: center center; */
  cursor: grab;
  max-width: 100%;
  max-height: 100%;
  user-select: none;
  position: relative;
  transition: transform 0.2s ease-out;
}

#imageContainer .slideshow-image.panning {
  transition: none;
}

.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  border: 1px solid #e2e2e2;
  padding: 8px;
  position: absolute;
  z-index: 1;
  background-color: white;
  flex: 1;
}

.skeleton-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.skeleton-content {
  font-family: Arial;
  font-size: 14px;
  color: #666;
}

.zoom-container {
  position: absolute;
  bottom: 80px;
  right: 15px;
  display: flex;
  flex-direction: column;
  width: 24px;
  height: 60px;
  grid-gap: 6px;
  background: white;
  border-radius: 62px;
  padding: 8px 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.bottom-container {
  padding: 10px 15px;
  font-size: 14px;
  font-family: BureauVeritas;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  border-top: 0.5px solid #DFDFDF;
}

.bottom-content {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

#btn-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

#btn-container img {
  height: 26px;
  cursor: pointer;
}

#deleted-sphere {
  font-size: 10px;
  font-family: Arial;
  color: #BD112F;
  font-weight: 400;
  display: flex;
  align-items: center;
}

#deleted-sphere img {
  height: 16px;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(47, 47, 47, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Form Container */
.form-container {
  display: block;
  background-color: #fff;
  border-radius: 8px;
  width: 450px;
  box-shadow: 0 1px 6px 2px rgba(165, 165, 165, 0.25);
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0.5px solid #dfdfdf;
  padding: 8px 16px;
}

h2 {
  margin: 8px;
  font-family: BureauVeritas;
  font-size: 16px;
  font-weight: 800;
  line-height: 16px;
  text-align: left;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
}

.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
}

.form-seperator {
  width: 100%;
  padding-left: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0px 20px 0px 20px;
}

.form-seperator label {
  font-family: Arial;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: left;
}

input, textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #d2d2d2;
  border-radius: 4px;
  font-family: Arial;
  font-size: 12px;
}

input:focus, textarea:focus {
  border-color: #888;
  outline: none;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid #dfdfdf;
  padding: 10px 16px;
}

.button-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.comment-btn {
  width: 120px;
  height: 35px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

/* Add Image Modal */
.add-object-container {
  background-color: #fff;
  border-radius: 8px;
  width: 520px;
  box-shadow: 0 1px 6px 2px #a5a5a540;
}

.form-image {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.form-seperator-image {
  width: 100%;
  gap: 8px;
  display: flex;
  flex-direction: column;
}

.image-uploader {
  padding: 10px;
}

.uploader {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px dashed #dfdfdf;
  border-radius: 4px;
  padding: 20px;
  gap: 8px;
  cursor: pointer;
}

.uploader:hover {
  background-color: #fafafa;
}

#files-container {
  display: flex;
  align-items: center;
  overflow: auto;
  flex-wrap: wrap;
  flex-direction: row;
  width: 100%;
  padding-top: 10px;
  max-height: 171px;
  gap: 5px;
}

.each-file {
  display: flex;
  margin: 2px 0px;
  align-items: center;
  flex-direction: column;
  width: 69px;
}

.file-error {
  display: flex;
  margin: 8px 10px;
  align-items: center;
  flex-direction: column;
  border: 2px solid red;
  border-radius: 6px;
  color: red;
  padding: 5px 0;
  width: 69px;
}

#icon-div {
  position: relative;
}

.icon-div-span {
  font-weight: 700;
  font-family: Arial;
  font-size: 10px;
}

.icon-div-span2 {
  font-size: 9px;
  color: #9f9f9f;
  font-weight: 600;
  margin-top: 3px;
  font-family: Arial;
}

.file-icon {
  margin: 7px 0px;
  height: 32px;
}

.cancel_btn {
  padding: 1.1px;
  position: absolute;
  left: -6px;
  top: 2px;
  height: 16px;
  width: 16px;
  font-size: 12.5px;
  background: none;
  border: 0;
  cursor: pointer;
}

.cancel_btn:hover {
  filter: invert(25%);
}

.footer-image {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid #dfdfdf;
  padding: 10px 16px;
}

/* Delete Popup */
.popup {
  background: #FFFFFF;
  width: 450px;
  min-height: 140px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  border: 0.5px solid #DFDFDF;
}

.popup > div {
  padding: 11px 16px;
  font-family: Arial;
  font-size: 13px;
}

.popup .popup-header {
  border-bottom: 0.5px solid #DFDFDF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-family: BureauVeritas;
  font-size: 13px;
}

.heading5 {
  font-family: BureauVeritas;
  font-weight: 800;
  font-size: 14px;
}

.popup .popup-content {
  border-bottom: 0.5px solid #DFDFDF;
  display: flex;
  justify-content: flex-start;
  max-height: 175px;
}

.popup .popup-buttons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.popup .popup-buttons .button-container #cancelDelete,
.popup .popup-buttons .button-container #confirmDelete {
  height: 30px;
  width: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
}

/* Buttons */
.secondary-button-with-border {
  position: relative;
  font-family: Arial;
  font-weight: 400;
  background-color: transparent;
  border: none;
  cursor: pointer;
  z-index: 1;
  background-image: linear-gradient(90deg, #fc3650 0%, #1d1d1b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.secondary-button-with-border::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #fc3650 0%, #1d1d1b 100%);
  z-index: -1;
  border-radius: 4px;
  padding: 1.2px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
}

.secondary-button-with-border[disabled],
.secondary-button-with-border:disabled {
  color: #706f6f;
  border: 2px solid #706f6f;
  border-radius: 4px;
  cursor: not-allowed;
}

.secondary-button-with-border[disabled]::after,
.secondary-button-with-border:disabled::after {
  display: none;
}

.primary-button-with-background {
  font-family: Arial;
  font-weight: 400;
  color: white;
  background: linear-gradient(90deg, #fc3650 0%, #1d1d1b 100%);
  border-radius: 4px;
  border: none;
}

.primary-button-with-background[disabled],
.primary-button-with-background:disabled {
  background: #706f6f;
  cursor: not-allowed;
}

button[disabled] {
  cursor: not-allowed;
}

.btn-divider {
  width: 1px;
  height: 30px;
  background-color: #dfdfdf;
  margin: 0 4px;
}

.ascan-btn {
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(90deg, #1d1d1b 0%, #fc3650 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.ascan-btn:hover {
  opacity: 0.85;
}

/* Loading Overlay */
#loadingOverlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.loader-box {
  display: flex;
  justify-content: left;
  align-items: center;
  background-color: #fff;
  padding: 15px 25px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#spinnerLoader {
  height: 40px;
  width: 40px;
  position: relative;
  margin-right: 20px;
}

.message {
  text-align: left;
}

.title {
  font-family: BureauVeritas;
  font-weight: 900;
  color: #d7273e;
  margin-bottom: 4px;
}

.subTitle {
  font-family: BureauVeritas;
  font-weight: 600;
  color: #41413f;
  font-size: 11px;
}

[l] {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: loader 2s linear infinite;
}

[a] { left: 16px; }
[b] { right: 5px; top: 5px; animation-delay: 0.2s; }
[c] { top: 16px; right: 0; animation-delay: 0.4s; }
[d] { right: 5px; bottom: 5px; animation-delay: 0.6s; }
[e] { left: 16px; bottom: 0; animation-delay: 0.8s; }
[f] { left: 5px; bottom: 5px; animation-delay: 1s; }
[g] { top: 16px; left: 0; animation-delay: 1.2s; }
[h] { left: 5px; top: 5px; animation-delay: 1.4s; }

@keyframes loader {
  0% { background: #d7273e; }
  100% { background: #d2d2d2; }
}

.hidden {
  display: none !important;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: #F1F1F1;
}

::-webkit-scrollbar-thumb {
  background: #C1C1C1;
  border-radius: 10px;
}

textarea::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

textarea::-webkit-scrollbar-track {
  background: #F1F1F1;
}

textarea::-webkit-scrollbar-thumb {
  background: #C1C1C1;
  border-radius: 10px;
  border: 5px solid #C1C1C1;
}

#files-container::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

#files-container::-webkit-scrollbar-track {
  background: #F1F1F1;
}

#files-container::-webkit-scrollbar-thumb {
  background: #C1C1C1;
  border-radius: 10px;
}

/* A-Scan Overlay */
.ascan-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.ascan-overlay-container {
  background: #1e1e2e;
  border-radius: 8px;
  width: 90%;
  max-width: 900px;
  height: 80%;
  max-height: 550px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.ascan-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}

.ascan-overlay-title {
  color: #e0e0e0;
  font-family: BureauVeritas, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.ascan-overlay-header .close-btn {
  color: #aaa;
  font-size: 1.5em;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.ascan-overlay-header .close-btn:hover {
  color: #fff;
}

.ascan-chart-container {
  flex: 1;
  min-height: 0;
  position: relative;
}

.ascan-chart {
  width: 100%;
  height: 100%;
}

.ascan-loading,
.ascan-error {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: #aaa;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.ascan-error {
  color: #d7273e;
}
