/* =========================================================
   AR BEAUTY LABS — VIRTUAL MAKEUP TRY-ON
   ========================================================= */

.vto-app {
  width: 100%;
  color: #f8f3f5;
}

/* =========================================================
   TOP
   ========================================================= */

.vto-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.vto-eyebrow {
  display: block;
  margin-bottom: 7px;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;

  color: #e84a8a;
}

.vto-heading h3 {
  margin: 0;

  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.045em;

  color: #fff;
}

.vto-heading h3 em {
  color: #f06c9f;
  font-family: Georgia, serif;
  font-weight: 400;
}

.vto-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 12px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.045);

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.vto-live span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e84a8a;
  box-shadow: 0 0 0 5px rgba(232, 74, 138, 0.12);
}

/* =========================================================
   CATEGORY NAVIGATION
   ========================================================= */

.vto-categories {
  position: relative;

  margin-bottom: 22px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding-left: 20px;
  padding-bottom: 15px;
}

.vto-category-scroll {
  display: flex;
  gap: 28px;

  overflow-x: auto;
  scrollbar-width: none;
}

.vto-category-scroll::-webkit-scrollbar {
  display: none;
}

.vto-category {
  position: relative;
  flex: 0 0 auto;

  padding: 0 0 15px;

  border: 0;
  background: transparent;

  color: rgba(255, 255, 255, 0.48);

  font: inherit;
  font-size: 12px;
  font-weight: 600;

  cursor: pointer;

  transition:
    color 0.25s ease,
    opacity 0.25s ease;
}

.vto-category:hover {
  color: rgba(255, 255, 255, 0.88);
}

.vto-category.is-active {
  color: #fff;
}

.vto-category.is-active::after {
  content: '';

  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;

  height: 2px;

  border-radius: 10px;

  background: #e84a8a;
}

/* =========================================================
   WORKSPACE
   ========================================================= */

.vto-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);

  gap: 18px;

  min-height: 480px;
}

/* =========================================================
   CAMERA / PREVIEW
   ========================================================= */

.vto-preview {
  display: flex;
  flex-direction: column;

  min-width: 0;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;

  background:
    radial-gradient(
      circle at 50% 15%,
      rgba(232, 74, 138, 0.12),
      transparent 38%
    ),
    linear-gradient(145deg, #4a3e45, #352f33);
}

.vto-camera {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 1;

  min-height: 410px;

  overflow: hidden;
}

/* SDK video/canvas can fill this later */

.vto-camera video,
.vto-camera canvas {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

/* =========================================================
   CAMERA PLACEHOLDER
   ========================================================= */

.vto-camera-placeholder {
  position: relative;
  z-index: 2;

  width: min(340px, 80%);

  text-align: center;
}

.vto-face-frame {
  position: relative;

  width: 100px;
  height: 130px;

  margin: 0 auto 24px;

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 48% 48% 44% 44%;

  background: radial-gradient(
    circle at 50% 35%,
    rgba(255, 255, 255, 0.07),
    transparent 55%
  );
}

.vto-face-frame::before,
.vto-face-frame::after,
.vto-face-frame span::before,
.vto-face-frame span::after {
  content: '';

  position: absolute;

  width: 18px;
  height: 18px;

  border-color: #e84a8a;
  border-style: solid;
}

.vto-face-frame::before {
  top: -1px;
  left: -1px;

  border-width: 2px 0 0 2px;
  border-radius: 8px 0 0 0;
}

.vto-face-frame::after {
  top: -1px;
  right: -1px;

  border-width: 2px 2px 0 0;
  border-radius: 0 8px 0 0;
}

.vto-face-frame span::before {
  bottom: -1px;
  left: -1px;

  border-width: 0 0 2px 2px;
  border-radius: 0 0 0 8px;
}

.vto-face-frame span::after {
  right: -1px;
  bottom: -1px;

  border-width: 0 2px 2px 0;
  border-radius: 0 0 8px 0;
}

.vto-camera-placeholder strong {
  display: block;

  margin-bottom: 8px;

  color: #fff;

  font-size: 17px;
  font-weight: 600;
}

.vto-camera-placeholder p {
  max-width: 290px;

  margin: 0 auto 20px;

  color: rgba(255, 255, 255, 0.53);

  font-size: 12px;
  line-height: 1.65;
}

.vto-camera-button {
  padding: 11px 18px;

  border: 1px solid rgba(232, 74, 138, 0.55);
  border-radius: 999px;

  background: rgba(232, 74, 138, 0.14);

  color: #fff;

  font: inherit;
  font-size: 11px;
  font-weight: 650;

  cursor: pointer;

  transition: 0.25s ease;
}

.vto-camera-button:hover {
  border-color: #e84a8a;
  background: #e84a8a;

  transform: translateY(-1px);
}

.vto-camera-button:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

/* =========================================================
   PREVIEW FOOTER
   ========================================================= */

.vto-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 13px 17px;

  border-top: 1px solid rgba(255, 255, 255, 0.07);

  background: rgba(20, 17, 19, 0.18);
}

.vto-preview-footer span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.vto-preview-footer button {
  padding: 0;

  border: 0;
  background: transparent;

  color: rgba(255, 255, 255, 0.65);

  font: inherit;
  font-size: 10px;
  font-weight: 650;

  cursor: pointer;
}

.vto-preview-footer button:hover {
  color: #f06c9f;
}

/* =========================================================
   SHADE PANEL
   ========================================================= */

.vto-panel {
  display: flex;
  flex-direction: column;

  padding: 24px;

  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;

  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.025)
  );
}

.vto-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  gap: 15px;

  margin-bottom: 25px;
}

.vto-panel-kicker,
.vto-selected-label {
  display: block;

  margin-bottom: 7px;

  color: #e84a8a;

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.vto-panel-head h4 {
  margin: 0;

  color: #fff;

  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.vto-shade-count {
  flex: 0 0 auto;

  padding: 6px 9px;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.06);

  color: rgba(255, 255, 255, 0.48);

  font-size: 9px;
}

/* =========================================================
   SHADE GRID
   ========================================================= */

.vto-shades {
  display: grid;
  grid-template-columns: repeat(4, 1fr);

  gap: 12px;

  margin-bottom: 28px;
}

.vto-shade {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  aspect-ratio: 1;

  padding: 5px;

  border: 1px solid transparent;
  border-radius: 50%;

  background: transparent;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.vto-shade:hover {
  transform: scale(1.08);
}

.vto-shade.is-active {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.055);
}

.vto-shade-color {
  display: block;

  width: 100%;
  height: 100%;

  min-width: 31px;
  min-height: 31px;

  border-radius: 50%;

  background: var(--shade-color);

  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 5px 12px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   SHADE TOOLTIP
   ========================================================= */

.vto-shade-tooltip {
  position: absolute;

  left: 50%;
  bottom: calc(100% + 8px);

  z-index: 10;

  padding: 5px 8px;

  border-radius: 6px;

  background: #201c1f;

  color: #fff;

  font-size: 9px;
  white-space: nowrap;

  opacity: 0;
  visibility: hidden;

  transform: translate(-50%, 4px);

  transition: 0.18s ease;

  pointer-events: none;
}

.vto-shade:hover .vto-shade-tooltip {
  opacity: 1;
  visibility: visible;

  transform: translate(-50%, 0);
}

/* =========================================================
   SELECTED SHADE
   ========================================================= */

.vto-selected {
  margin-top: auto;
  padding-top: 21px;

  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.vto-selected-info {
  display: flex;
  align-items: center;

  gap: 12px;
}

.vto-selected-color {
  display: block;

  width: 37px;
  height: 37px;

  flex: 0 0 auto;

  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.vto-selected-info strong {
  display: block;

  margin-bottom: 3px;

  color: #fff;

  font-size: 12px;
  font-weight: 600;
}

.vto-selected-info div span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  text-transform: uppercase;
}

/* =========================================================
   INTENSITY
   ========================================================= */

.vto-intensity {
  margin-top: 23px;
}

.vto-intensity-head {
  display: flex;
  justify-content: space-between;

  margin-bottom: 11px;

  color: rgba(255, 255, 255, 0.55);

  font-size: 10px;
}

.vto-intensity input {
  width: 100%;

  accent-color: #e84a8a;

  cursor: pointer;
}

/* =========================================================
   CAMERA ACTIVE
   ========================================================= */

.vto-camera.is-camera-active .vto-face-frame {
  border-color: rgba(232, 74, 138, 0.55);
}

.vto-camera.is-camera-active .vto-face-frame::before,
.vto-camera.is-camera-active .vto-face-frame::after,
.vto-camera.is-camera-active .vto-face-frame span::before,
.vto-camera.is-camera-active .vto-face-frame span::after {
  border-color: #f06c9f;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {
  .vto-workspace {
    grid-template-columns: 1fr;
  }

  .vto-camera {
    min-height: 430px;
  }

  .vto-panel {
    min-height: 320px;
  }

  .vto-shades {
    grid-template-columns: repeat(8, 1fr);
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {
  .vto-top {
    align-items: flex-start;
  }

  .vto-heading h3 {
    font-size: 30px;
  }

  .vto-live {
    padding: 6px 9px;
  }

  .vto-category-scroll {
    gap: 22px;
  }

  .vto-category {
    font-size: 11px;
  }

  .vto-camera {
    min-height: 390px;
  }

  .vto-panel {
    padding: 20px;
  }

  .vto-shades {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {
  .vto-shades {
    grid-template-columns: repeat(4, 1fr);
  }

  .vto-preview-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

/* =========================================================
   INPUT MODES
   ========================================================= */

.vto-input-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 10px;

  margin-bottom: 24px;
}

.vto-input-mode {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 12px;

  padding: 14px 15px;

  text-align: left;

  border: 1px solid rgba(255, 255, 255, 0.09);

  border-radius: 15px;

  background: rgba(255, 255, 255, 0.035);

  color: #fff;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.vto-input-mode:hover {
  transform: translateY(-2px);

  border-color: rgba(232, 74, 138, 0.32);

  background: rgba(255, 255, 255, 0.06);
}

.vto-input-mode.is-active {
  border-color: rgba(232, 74, 138, 0.55);

  background: linear-gradient(
    135deg,
    rgba(232, 74, 138, 0.17),
    rgba(232, 74, 138, 0.07)
  );
}

.vto-input-icon {
  width: 42px;
  height: 42px;

  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background: rgba(232, 74, 138, 0.1);

  color: #f06c9f;

  font-size: 18px;
}

.vto-input-copy {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 3px;
}

.vto-input-copy strong {
  color: #fff;

  font-size: 12px;
  font-weight: 650;
}

.vto-input-copy small {
  color: rgba(255, 255, 255, 0.43);

  font-size: 9.5px;
}

/* =========================================================
   SOURCE VIEWS
   ========================================================= */

.vto-source-view {
  width: 100%;
  height: 100%;

  min-height: 410px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.vto-source-view[hidden] {
  display: none;
}

/* =========================================================
   MODEL MODE
   ========================================================= */

.vto-model-view {
  width: 100%;

  padding: 32px;
}

.vto-source-heading {
  margin-bottom: 22px;
}

.vto-source-heading span {
  display: block;

  margin-bottom: 6px;

  color: #e84a8a;

  font-size: 9px;
  font-weight: 700;

  letter-spacing: 0.14em;
}

.vto-source-heading strong {
  color: #fff;

  font-size: 16px;
  font-weight: 500;
}

.vto-model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 12px;
}

.vto-model {
  position: relative;

  aspect-ratio: 4 / 5;

  padding: 0;

  overflow: hidden;

  border: 2px solid transparent;

  border-radius: 16px;

  background: #2e292d;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}

.vto-model:hover {
  transform: translateY(-3px);
}

.vto-model.is-active {
  border-color: #e84a8a;
}

.vto-model img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

/* selected indicator */

.vto-model.is-active::after {
  content: '✓';

  position: absolute;

  top: 9px;
  right: 9px;

  width: 25px;
  height: 25px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #e84a8a;

  color: #fff;

  font-size: 11px;
  font-weight: 700;
}

/* =========================================================
   UPLOAD MODE
   ========================================================= */

.vto-upload-view {
  width: min(500px, 85%);

  margin: auto;
}

.vto-upload-zone {
  width: 100%;
  min-height: 280px;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 8px;

  padding: 30px;

  border: 1px dashed rgba(232, 74, 138, 0.45);

  border-radius: 20px;

  background: rgba(232, 74, 138, 0.055);

  color: #fff;

  cursor: pointer;

  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.vto-upload-zone:hover {
  transform: translateY(-2px);

  border-color: #e84a8a;

  background: rgba(232, 74, 138, 0.09);
}

.vto-upload-icon {
  width: 52px;
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 8px;

  border-radius: 50%;

  background: rgba(232, 74, 138, 0.14);

  color: #f06c9f;

  font-size: 23px;
}

.vto-upload-zone strong {
  font-size: 15px;
}

.vto-upload-zone > span:not(.vto-upload-icon) {
  color: rgba(255, 255, 255, 0.55);

  font-size: 11px;
}

.vto-upload-zone small {
  max-width: 300px;

  margin-top: 4px;

  text-align: center;

  color: rgba(255, 255, 255, 0.35);

  font-size: 9.5px;
  line-height: 1.5;
}

/* uploaded image */

.vto-upload-preview {
  position: relative;

  width: 100%;

  overflow: hidden;

  border-radius: 18px;
}

.vto-upload-preview img {
  display: block;

  width: 100%;
  max-height: 430px;

  object-fit: contain;

  border-radius: 18px;
}

.vto-upload-preview button {
  position: absolute;

  right: 12px;
  bottom: 12px;

  padding: 9px 13px;

  border: 1px solid rgba(255, 255, 255, 0.18);

  border-radius: 999px;

  background: rgba(25, 21, 24, 0.72);

  color: #fff;

  font: inherit;
  font-size: 10px;

  backdrop-filter: blur(8px);

  cursor: pointer;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {
  .vto-input-modes {
    grid-template-columns: 1fr;
  }

  .vto-input-mode {
    padding: 12px 14px;
  }

  .vto-model-grid {
    grid-template-columns: repeat(3, 1fr);

    gap: 8px;
  }

  .vto-model-view {
    padding: 20px;
  }

  .vto-source-view {
    min-height: 360px;
  }
}
.canvas-container {
  width: 100%;
  display: inline-block;
  height: 500px;
}
