/* PhotoSision Portal · SPRINT-354 · Franja y Hoja de Descarga para Navegadores Embebidos */

/* Franja discreta superior dentro de WhatsApp / WebView */
.dwv-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin: 0 auto 12px;
  max-width: 1120px;
  background: var(--el);
  border: 1px solid var(--ln);
  border-left: 3px solid var(--ac);
  border-radius: 12px;
  color: var(--tx);
  font-size: 13px;
  line-height: 1.4;
}

.dwv-banner-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.dwv-banner-copy strong {
  font-weight: 600;
  color: var(--tx);
  margin-right: 4px;
}

.dwv-banner-copy span {
  color: var(--t2);
}

.dwv-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dwv-banner-open {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--ac);
  color: var(--on-ac);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.dwv-banner-close {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--ln);
  background: var(--sf);
  color: var(--t2);
  font-size: 18px;
  line-height: 1;
}

.dwv-banner-close:hover,
.dwv-banner-close:focus-visible {
  color: var(--tx);
  border-color: var(--fb);
}

/* Toast con enlace permanente "¿No se descargó? Toca aquí" */
.toast.toast-interactive {
  pointer-events: auto;
  white-space: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(92vw, 480px);
  text-align: center;
  border-radius: 16px;
  padding: 10px 16px;
}

.toast-link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-ln);
  color: var(--accent-t);
  font-weight: 600;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Hoja interactiva de guardado */
.dwv-sheet {
  max-width: 500px;
  padding: 18px 18px 24px;
}

.dwv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ln);
}

.dwv-title {
  font-family: var(--font-title);
  font-size: 19px;
  line-height: 1.25;
  color: var(--tx);
  margin: 0 0 4px;
}

.dwv-subtitle {
  font-size: 13px;
  line-height: 1.45;
  color: var(--t2);
  margin: 0;
}

.dwv-close-btn {
  min-width: 44px;
  min-height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--ln);
  background: var(--sf);
  color: var(--tx);
  font-size: 20px;
}

.dwv-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
}

/* Foto limpia habilitada para pulsación larga */
.dwv-photo-card {
  background: var(--sf);
  border: 1px solid var(--ln);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dwv-photo-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--stage);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dwv-clean-img {
  display: block;
  width: 100%;
  max-height: 42vh;
  object-fit: contain;
  -webkit-touch-callout: default !important;
  -webkit-user-select: auto !important;
  user-select: auto !important;
  pointer-events: auto !important;
}

.dwv-photo-status {
  font-size: 13px;
  color: var(--t2);
  text-align: center;
  padding: 16px 12px;
}

.dwv-photo-hint {
  font-size: 13px;
  line-height: 1.4;
  color: var(--tx);
  margin: 0;
}

.dwv-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dwv-btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  border: 1px solid var(--ln);
  background: var(--el);
  color: var(--tx);
}

.dwv-btn-primary {
  background: var(--ac);
  border-color: var(--ac);
  color: var(--on-ac);
}

.dwv-btn-secondary {
  background: var(--sf);
  border-color: var(--ln);
  color: var(--tx);
}

.dwv-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dwv-feedback {
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--ln);
  background: var(--sf);
  color: var(--tx);
}

.dwv-feedback[data-tone="ok"] {
  border-color: var(--ok);
  color: var(--ok);
}

.dwv-feedback[data-tone="warn"] {
  border-color: var(--warn);
  color: var(--warn);
}

.dwv-feedback[data-tone="err"] {
  border-color: var(--err);
  color: var(--err);
}

.dwv-copy-fallback {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--ln);
  background: var(--sf);
}

.dwv-copy-fallback p {
  font-size: 12px;
  color: var(--t2);
  margin: 0;
}

.dwv-copy-input {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--fb);
  background: var(--bg);
  color: var(--tx);
  font-size: 12px;
}

.dwv-steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: var(--sf);
  border: 1px solid var(--ln);
  font-size: 13px;
  line-height: 1.45;
  color: var(--tx);
}

.dwv-steps-list p {
  margin: 0;
}

/* Visor limpio a pantalla completa para pulsación larga */
.dwv-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: #000000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 12px) 12px env(safe-area-inset-bottom, 16px);
}

.dwv-fullscreen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 4px;
}

.dwv-fullscreen-hint {
  font-size: 13px;
  color: #EEF1F6;
  margin: 0;
}

.dwv-fullscreen-back {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
}

.dwv-fullscreen-stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 8px 0;
}

.dwv-fullscreen-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  -webkit-touch-callout: default !important;
  -webkit-user-select: auto !important;
  user-select: auto !important;
  pointer-events: auto !important;
}

@media (max-width: 540px) {
  .dwv-banner {
    flex-wrap: wrap;
    margin: 0 12px 12px;
  }
  .dwv-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
