/* ==========================================================================
   ADEPS VIRTUAL TRY-ON WIDGET (v2.0 — Clean Minimalist Edition)
   ========================================================================== */

.adeps-tryon-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.adeps-tryon-backdrop.is-open {
  opacity: 1;
}

.adeps-tryon-modal {
  background: #ffffff;
  color: #1f2022;
  border-radius: 16px;
  width: 100%;
  max-width: 430px;
  max-height: 94vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
}

.adeps-tryon-modal::-webkit-scrollbar {
  width: 5px;
}

.adeps-tryon-modal::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 999px;
}

/* Header */
.adeps-tryon-header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}

.adeps-tryon-header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #1f2022;
}

.adeps-tryon-header-icon-btn {
  background: transparent;
  border: none;
  padding: 4px;
  color: #1f2022;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.15s ease;
}

.adeps-tryon-header-icon-btn:hover {
  background: #f3f4f6;
}

.adeps-tryon-header-title {
  font-size: 16px;
  font-weight: 500;
  color: #111827;
  text-align: center;
  margin: 0;
  letter-spacing: -0.01em;
}

.adeps-tryon-close {
  background: transparent;
  border: none;
  color: #374151;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
  margin-left: auto;
}

.adeps-tryon-close:hover {
  background: #f3f4f6;
  color: #111827;
}

/* Body */
.adeps-tryon-body {
  padding: 16px 18px 14px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  box-sizing: border-box;
}

/* Error Notice */
.adeps-tryon-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.4;
  margin-bottom: 12px;
}

/* ==========================================================================
   TELA 1: INTRO ("Experimente este produto em voce agora mesmo")
   ========================================================================== */
.adeps-tryon-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 12px 20px 12px;
  min-height: 440px;
  box-sizing: border-box;
}

.adeps-tryon-intro-illustration {
  width: 220px;
  height: 220px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adeps-tryon-intro-illustration svg {
  width: 100%;
  height: 100%;
  display: block;
}

.adeps-tryon-intro-title {
  font-size: 20px;
  font-weight: 700;
  color: #262729;
  line-height: 1.32;
  margin: 0 0 12px 0;
  max-width: 290px;
}

.adeps-tryon-intro-desc {
  font-size: 14px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 36px 0;
  max-width: 285px;
}

/* ==========================================================================
   STAGE PRINCIPAL (Dropzone, Camera, Preview, Analise, Processamento)
   ========================================================================== */
.adeps-tryon-stage {
  position: relative;
  width: 100%;
  height: 360px;
  background: #efefef;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: height 0.25s ease, background-color 0.2s ease;
}

.adeps-tryon-stage.is-tall {
  height: 420px;
}

.adeps-tryon-stage.is-dragover {
  background: #e5e7eb;
  outline: 2px dashed #6b7280;
  outline-offset: -6px;
}

/* Dropzone Upload */
.adeps-tryon-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 18px;
  cursor: pointer;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  user-select: none;
}

.adeps-tryon-camera-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.adeps-tryon-upload-zone:hover .adeps-tryon-camera-circle {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.adeps-tryon-upload-title {
  font-size: 16px;
  font-weight: 400;
  color: #1f2022;
  margin: 0 0 6px 0;
  line-height: 1.35;
}

.adeps-tryon-upload-formats {
  font-size: 12.5px;
  color: #6b7280;
  margin: 0;
}

.adeps-tryon-use-webcam-btn {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #d1d5db;
  color: #374151;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.adeps-tryon-use-webcam-btn:hover {
  background: #ffffff;
  color: #111827;
  border-color: #9ca3af;
}

/* Imagens no Stage (Fundo Borrado + Frente Nitida) */
.adeps-tryon-stage-blur-bg {
  position: absolute;
  inset: -16px;
  width: calc(100% + 32px);
  height: calc(100% + 32px);
  object-fit: cover;
  filter: blur(22px);
  -webkit-filter: blur(22px);
  transform: scale(1.06);
  opacity: 0.92;
  pointer-events: none;
  z-index: 1;
}

.adeps-tryon-stage-main-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.adeps-tryon-video {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: block;
}

/* Cantoneiras de Scan ("Analisando sua foto...") */
.adeps-tryon-scan-brackets {
  position: absolute;
  inset: 22px;
  z-index: 4;
  pointer-events: none;
}

.adeps-tryon-bracket {
  position: absolute;
  width: 44px;
  height: 44px;
  border-color: #ffffff;
  border-style: solid;
  border-width: 0;
  opacity: 0.95;
}

.adeps-tryon-bracket.tl {
  top: 0;
  left: 0;
  border-top-width: 3.5px;
  border-left-width: 3.5px;
  border-top-left-radius: 8px;
}

.adeps-tryon-bracket.tr {
  top: 0;
  right: 0;
  border-top-width: 3.5px;
  border-right-width: 3.5px;
  border-top-right-radius: 8px;
}

.adeps-tryon-bracket.bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 3.5px;
  border-left-width: 3.5px;
  border-bottom-left-radius: 8px;
}

.adeps-tryon-bracket.br {
  bottom: 0;
  right: 0;
  border-bottom-width: 3.5px;
  border-right-width: 3.5px;
  border-bottom-right-radius: 8px;
}

/* Botao/Pilula Flutuante Inferior no Stage ("Analisando sua foto..." / "Alterar foto") */
.adeps-tryon-stage-pill {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: rgba(58, 50, 50, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: background-color 0.18s ease, transform 0.18s ease;
}

button.adeps-tryon-stage-pill {
  cursor: pointer;
}

button.adeps-tryon-stage-pill:hover {
  background: rgba(35, 30, 30, 0.94);
  transform: translateX(-50%) scale(1.03);
}

/* ==========================================================================
   REQUISITOS PARA FOTOS (Checklist de Validacao)
   ========================================================================== */
.adeps-tryon-reqs {
  margin: 14px 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adeps-tryon-reqs-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #1f2022;
  margin-bottom: 2px;
}

.adeps-tryon-reqs-header svg {
  width: 16px;
  height: 16px;
  color: #1f2022;
  flex-shrink: 0;
}

.adeps-tryon-req-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #374151;
  line-height: 1.35;
}

.adeps-tryon-req-item.is-warn {
  color: #b78a28;
}

.adeps-tryon-req-icon {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adeps-tryon-req-circle {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid #d1d5db;
  box-sizing: border-box;
}

.adeps-tryon-req-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.8px solid #d1d5db;
  border-bottom-color: #1f2022;
  box-sizing: border-box;
  animation: adepsTryonSpin 0.7s linear infinite;
}

/* ==========================================================================
   TELA 5: PROCESSANDO ("Experimentando" + Barra de Progresso)
   ========================================================================== */
.adeps-tryon-processing-info {
  padding: 20px 10px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.adeps-tryon-processing-title {
  font-size: 18px;
  font-weight: 500;
  color: #111827;
  margin: 0 0 12px 0;
}

.adeps-tryon-progress-track {
  width: 86%;
  height: 4px;
  background: #efefef;
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto 18px auto;
}

.adeps-tryon-progress-fill {
  height: 100%;
  width: 8%;
  background: #141517;
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.adeps-tryon-processing-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin: 0 0 5px 0;
}

.adeps-tryon-processing-note {
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.45;
  max-width: 320px;
  margin: 0;
}

/* ==========================================================================
   COMPARADOR RESULTADO (Com Oculos / Original)
   ========================================================================== */
.adeps-tryon-compare-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 3px;
  z-index: 6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.adeps-tryon-compare-btn {
  background: transparent;
  border: none;
  color: #4b5563;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.adeps-tryon-compare-btn.is-active {
  background: #1f2022;
  color: #ffffff;
}

/* ==========================================================================
   BOTOES DE ACAO INFERIORES & RODAPE PRIVACIDADE
   ========================================================================== */
.adeps-tryon-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: auto;
}

.adeps-tryon-btn-primary {
  width: 100%;
  height: 48px;
  background: #1f2022;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0 20px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background-color 0.18s ease, transform 0.15s ease;
  box-sizing: border-box;
}

.adeps-tryon-btn-primary:hover:not(:disabled) {
  background: #000000;
}

.adeps-tryon-btn-primary:disabled {
  background: #eceeef;
  color: #ffffff;
  cursor: not-allowed;
}

.adeps-tryon-btn-secondary {
  height: 48px;
  background: #f3f4f6;
  color: #1f2022;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
  box-sizing: border-box;
}

.adeps-tryon-btn-secondary:hover {
  background: #e5e7eb;
}

.adeps-tryon-footer {
  margin-top: 12px;
  text-align: center;
}

.adeps-tryon-footer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.adeps-tryon-footer-sep {
  width: 1px;
  height: 16px;
  background: #e5e7eb;
  flex-shrink: 0;
}

.adeps-tryon-dev-by {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
  opacity: 0.88;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.adeps-tryon-dev-by:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.adeps-tryon-dev-label {
  font-size: 11px;
  font-weight: 400;
  color: #8c95a2;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.adeps-tryon-dev-logo {
  height: 18px !important;
  max-height: 18px !important;
  width: 27px !important;
  max-width: 27px !important;
  display: inline-block !important;
  object-fit: contain !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

.adeps-tryon-privacy-link {
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  padding: 2px 6px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.adeps-tryon-privacy-link:hover {
  color: #111827;
  text-decoration: underline;
}

.adeps-tryon-privacy-box {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 11.5px;
  color: #4b5563;
  line-height: 1.45;
  text-align: left;
}

@keyframes adepsTryonSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .adeps-tryon-backdrop {
    padding: 10px;
  }
  .adeps-tryon-modal {
    max-width: 100%;
    border-radius: 14px;
  }
  .adeps-tryon-stage {
    height: 330px;
  }
  .adeps-tryon-stage.is-tall {
    height: 380px;
  }
}
