:root {
  --gold: #e9c37bf1;
  --bg-dark: transparent;
  --card-bg: rgba(0, 0, 0, 0.4);
  --text-light: #131313;
}

/* Layout */
.container {
  display: flex;
  justify-content: center;
  width: 100%;
  background: var(--bg-dark);
  color: #f5f5f5;
  padding: 50px;
  position: relative;
}

/* Preview Card */
.preview-card {
  height: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
}

.main-image-wrapper {
  height: 100vh !important;
  width: auto !important;
  aspect-ratio: 2/3;
  border: 2px solid var(--gold);
  border-radius: 16px;
  background-color: #e4c999f1;
  overflow: hidden;
  position: relative;
}

.main-image-loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.loader-dot {
  width: 15px;
  height: 15px;
  background-color: black;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.loader-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loader-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.main-image {
  height: 100% !important;
  width: 100% !important;
  object-fit: cover;
}

/* Main image placeholder */
.main-image-placeholder {
  display: none;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  text-align: center;
  color: black;
  font-size: 5vw;
  font-weight: 400;
  font-style: normal;
  font-family: "Gravitas One", serif;
}

.main-image-placeholder.error-message {
  flex-direction: column;
}

.error-message-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.error-title {
  color: red;
  font-size: 30px;
  font-family: "Gravitas One", serif;
}

.error-subtitle {
  color: #ff6b6b;
  font-size: 20px;
  font-family: "Gravitas One", serif;
}

/* @media (max-width: 768px) { */
@media (max-width: 845px) {
  .preview-card {
    width: 75%;
    height: 100vw !important;
    padding: 0;
  }

  .thumbnail-panel {
    width: 25% !important;
    height: 75vw !important;
  }

  .thumbnail {
    height: auto;
    width: auto !important;
    aspect-ratio: 2/3;
  }

  .container {
    width: 100%;
    height: auto;
    padding: 10px;
  }

  .action-buttons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons button {
    width: 100%;
  }
}

/* Fabric badge */
.fabric-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.15);
  padding: 12px 16px;
  border-radius: 14px;
  backdrop-filter: blur(6px);
  font-size: 13px;
}

.fabric-swatch {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #eee, #bbb);
  border-radius: 6px;
}

/* Buttons */
.action-buttons {
  bottom: 24px;
  display: flex;
  align-items: start;
  gap: 5px;
  margin-top: 20px;
}

.action-buttons .upload-btn-wrapper {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  position: relative;
  padding: 0;
  margin: 0 !important;
}

.upload-btn-wrapper label {
  margin: 0 !important;
  line-height: normal;
}

.action-buttons input {
  display: none;
  position: absolute;
}

.btn {
  padding: 12px 28px;
  border-radius: 24px;
  border: 2px solid var(--gold);
  background: transparent;
  font-size: 15px;
  font-weight: 300 !important;
  font-family: "Poppins", sans-serif;
  color: var(--text-light);
  cursor: pointer;
  letter-spacing: 1px;
  line-height: normal !important;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--gold);
  color: #000;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: rgba(233, 195, 123, 0.5);
}

.btn:disabled:hover {
  background: transparent;
  color: var(--text-light);
}

/* Thumbnails */
.thumbnail-panel {
  height: 100vh; /*controls visible thumbnails */
  width: auto;
  padding: 0 10px !important;
  margin: 0 !important;
  overflow: hidden;
  position: relative;
}

.swiper-wrapper {
  display: flex;
  width: auto;
  flex-direction: column;
  align-items: center;
}

.thumbnail {
  width: auto;
  height: auto;
  aspect-ratio: 2/3;
  border: 2px solid var(--gold);
  border-radius: 16px;
  cursor: pointer;
  opacity: 0.3;
  transition: all 0.3s ease-in-out !important;
  overflow: hidden;
}

.thumbnail.selected,
.thumbnail:hover {
  opacity: 1;
}

.thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  display: block;
  background-color: red;
  border-radius: 12px;
}

/* Stylist Chat */
.stylist-chat {
  position: absolute;
  right: 64px;
  bottom: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.chat-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

/* Common styles for both buttons */
#thumbnail-panel-wrapper .swiper-button-next,
#thumbnail-panel-wrapper .swiper-button-prev {
  left: 50%;
  transform: translateX(-50%); /* rotate arrows for vertical UX */
  width: 28px;
  height: 28px;
  border: 2px solid black;
  border-radius: 50px;
}

#thumbnail-panel-wrapper .swiper-button-next:hover,
#thumbnail-panel-wrapper .swiper-button-prev:hover {
  background-color: #000;
}

/* Top button */
#thumbnail-panel-wrapper .swiper-button-prev {
  top: 30px;
  bottom: auto;
}

/* Bottom button */
#thumbnail-panel-wrapper .swiper-button-next {
  bottom: 8px;
  top: auto;
}

/* Remove default Swiper arrow */
#thumbnail-panel-wrapper .swiper-button-next::after,
#thumbnail-panel-wrapper .swiper-button-prev::after {
  content: "";
}

/* Top arrow */
#thumbnail-panel-wrapper .swiper-button-prev::before {
  content: "▲";
  font-size: 14px;
  color: black;
}

/* Bottom arrow */
#thumbnail-panel-wrapper .swiper-button-next::before {
  content: "▼";
  font-size: 14px;
  color: black;
}

#thumbnail-panel-wrapper .swiper-button-next:hover::before,
#thumbnail-panel-wrapper .swiper-button-prev:hover::before {
  color: white;
}
