/* ═══════════════════════════════════════════════════════════════════
   ASTRO 360 — css/sample.css
   Estilos do modal de coleta de dados + viewer integrado do dashboard
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   MODAL DE COLETA DE DADOS
   ═══════════════════════════════════════════════════════════════════ */

.sample-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 300ms ease;
  overflow-y: auto;
}

.sample-modal-overlay.open {
  opacity: 1;
}

.sample-modal {
  background: linear-gradient(180deg, #1d1138 0%, #110826 100%);
  border: 1px solid rgba(232, 198, 104, 0.2);
  border-radius: 20px;
  padding: 32px 36px;
  max-width: 480px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sample-modal-overlay.open .sample-modal {
  transform: scale(1) translateY(0);
}

.sample-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(232, 198, 104, 0.08);
  border: 1px solid rgba(232, 198, 104, 0.25);
  color: #e8c668;
  font-size: 1.4rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 200ms;
}

.sample-modal-close:hover {
  background: rgba(232, 198, 104, 0.18);
  transform: rotate(90deg);
}

.sample-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.sample-modal-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: #e8c668;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.sample-modal-title {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.sample-modal-title em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(135deg, #f0e2b8, #e8c668, #c9a449);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sample-modal-subtitle {
  font-size: 0.92rem;
  color: #d9d0f5;
  line-height: 1.6;
}

.sample-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sm-field.full {
  grid-column: 1 / -1;
}

.sm-field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #c9a449;
}

.sm-field input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(232, 198, 104, 0.04);
  border: 1px solid rgba(232, 198, 104, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  color: #e9e3ff;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.95rem;
  transition: all 200ms;
}

.sm-field input:focus {
  outline: none;
  border-color: rgba(232, 198, 104, 0.5);
  background: rgba(232, 198, 104, 0.08);
  box-shadow: 0 0 0 3px rgba(232, 198, 104, 0.1);
}

.sm-field input::placeholder {
  color: rgba(217, 208, 245, 0.35);
}

.sm-note {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: rgba(217, 208, 245, 0.6);
  text-align: center;
  font-style: italic;
  padding: 4px 8px;
}

.sm-submit {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #c9a449 0%, #e8c668 100%);
  color: #0a0419;
  font-family: 'Inter Tight', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 100px;
  padding: 16px 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 300ms;
  box-shadow: 0 0 30px rgba(232, 198, 104, 0.3);
  margin-top: 8px;
}

.sm-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(232, 198, 104, 0.5);
}

.sm-submit .arr {
  transition: transform 300ms;
}

.sm-submit:hover .arr {
  transform: translateX(4px);
}

.sm-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(232, 198, 104, 0.06);
  border: 1px solid rgba(232, 198, 104, 0.2);
  border-radius: 12px;
  margin-top: 8px;
}

.sm-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(232, 198, 104, 0.2);
  border-top-color: #e8c668;
  border-radius: 50%;
  animation: sm-spin 1s linear infinite;
  flex-shrink: 0;
}

@keyframes sm-spin {
  to { transform: rotate(360deg); }
}

.sm-loading-text p {
  color: #e8c668;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1rem;
  margin: 0 0 4px;
}

.sm-loading-text small {
  color: rgba(217, 208, 245, 0.6);
  font-size: 0.78rem;
}

@media (max-width: 600px) {
  .sample-modal-overlay {
    padding: 10px;
  }
  .sample-modal {
    padding: 24px 20px;
    border-radius: 16px;
    max-width: 100%;
  }
  .sample-modal-title {
    font-size: 1.4rem;
  }
  .sample-modal-body {
    grid-template-columns: 1fr;
  }
  .sm-field input {
    font-size: 16px; /* evita zoom em iOS */
  }
}

/* ═══════════════════════════════════════════════════════════════════
   CARD DA AMOSTRA NO DASHBOARD (3 ESTADOS)
   ═══════════════════════════════════════════════════════════════════ */

.amostra-card-dashboard {
  background: linear-gradient(135deg, rgba(54, 32, 90, 0.5), rgba(29, 17, 56, 0.7));
  border: 1px solid rgba(232, 198, 104, 0.25);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.amostra-card-dashboard::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e8c668, transparent);
}

.amostra-state {
  display: none;
}

.amostra-state.is-active {
  display: block;
}

/* ─── Header comum ─── */
.amostra-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.amostra-card-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #c9a449, #e8c668);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.amostra-card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #e8c668;
  margin-bottom: 4px;
}

.amostra-card-title {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  color: #fff;
  font-weight: 500;
  margin: 0;
}

/* ─── Estado A: ainda não tem ─── */
.amostra-state-empty .amostra-empty-text {
  color: #d9d0f5;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 16px 0 20px;
}

.amostra-state-empty .amostra-empty-text em {
  font-style: italic;
  color: #e8c668;
}

.btn-receive-sample {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #c9a449, #e8c668);
  color: #0a0419;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: 100px;
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: all 300ms;
  box-shadow: 0 0 24px rgba(232, 198, 104, 0.25);
}

.btn-receive-sample:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(232, 198, 104, 0.5);
}

/* ─── Estado B: gerando ─── */
.amostra-state-generating {
  text-align: center;
  padding: 20px 0;
}

.amostra-state-generating .sm-spinner {
  margin: 0 auto 16px;
}

.amostra-generating-text {
  color: #e8c668;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.amostra-generating-sub {
  color: rgba(217, 208, 245, 0.6);
  font-size: 0.82rem;
}

/* ─── Estado C: pronta ─── */
.amostra-ready-info {
  background: rgba(232, 198, 104, 0.06);
  border: 1px solid rgba(232, 198, 104, 0.15);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.amostra-ready-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.amostra-ready-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c9a449;
}

.amostra-ready-name {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: #e8c668;
}

.amostra-ready-date {
  font-size: 0.78rem;
  color: rgba(217, 208, 245, 0.55);
}

.amostra-ready-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-view-sample,
.btn-download-sample,
.btn-regenerate-sample {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 100px;
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: all 250ms;
  border: 1px solid transparent;
}

.btn-view-sample {
  background: linear-gradient(135deg, #c9a449, #e8c668);
  color: #0a0419;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(232, 198, 104, 0.25);
}

.btn-view-sample:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(232, 198, 104, 0.5);
}

.btn-download-sample {
  background: rgba(232, 198, 104, 0.08);
  border-color: rgba(232, 198, 104, 0.35);
  color: #e8c668;
}

.btn-download-sample:hover {
  background: rgba(232, 198, 104, 0.16);
  border-color: #e8c668;
}

.btn-regenerate-sample {
  background: rgba(167, 139, 250, 0.08);
  border-color: rgba(167, 139, 250, 0.3);
  color: #a78bfa;
}

.btn-regenerate-sample:hover {
  background: rgba(167, 139, 250, 0.15);
}

.amostra-locked-note {
  font-size: 0.78rem;
  color: rgba(217, 208, 245, 0.55);
  font-style: italic;
  margin-top: 12px;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════
   VIEWER INTEGRADO DO PDF (modal full-screen)
   ═══════════════════════════════════════════════════════════════════ */

.pdf-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 25, 0.96);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 300ms;
}

.pdf-viewer-overlay.open {
  opacity: 1;
}

.pdf-viewer-header {
  padding: 16px 24px;
  background: rgba(17, 8, 38, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(232, 198, 104, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pdf-viewer-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pdf-viewer-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #e8c668;
}

.pdf-viewer-name {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: #fff;
}

.pdf-viewer-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pdf-viewer-close {
  width: 38px;
  height: 38px;
  background: rgba(232, 198, 104, 0.08);
  border: 1px solid rgba(232, 198, 104, 0.25);
  color: #e8c668;
  font-size: 1.4rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 200ms;
}

.pdf-viewer-close:hover {
  background: rgba(232, 198, 104, 0.18);
  transform: rotate(90deg);
}

.pdf-viewer-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #1d1138;
}

@media (max-width: 540px) {
  .pdf-viewer-name {
    font-size: 0.92rem;
  }
  .pdf-viewer-actions .btn-download-sample span:not(.arr) {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   BOTÃO FLUTUANTE — Amostra Grátis (lateral durante o scroll)
   ═══════════════════════════════════════════════════════════════════ */

.amostra-float {
  position: fixed;
  top: 354px;
  right: 28px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #e8c668 0%, #c9a449 100%);
  color: #0a0419;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow:
    0 8px 24px rgba(232, 198, 104, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  animation: amostraFloatPulse 3s ease-in-out infinite;
}

/* Mostra apenas após scrolar do hero (controlado via JS opcional, mas
   por padrão sempre visível a partir de quando o body for scrollado) */
.amostra-float.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.amostra-float:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 12px 32px rgba(232, 198, 104, 0.5),
    0 6px 16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.amostra-float-icon {
  font-size: 1.2rem;
  color: #0a0419;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.amostra-float-text {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
}

@keyframes amostraFloatPulse {
  0%, 100% {
    box-shadow:
      0 8px 24px rgba(232, 198, 104, 0.35),
      0 4px 12px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow:
      0 8px 28px rgba(232, 198, 104, 0.55),
      0 4px 16px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

@media (max-width: 600px) {
  .amostra-float {
    top: 280px;
    right: 16px;
    padding: 12px 18px;
    font-size: 0.88rem;
  }
  .amostra-float-icon {
    font-size: 1.05rem;
  }
}
/* ═══════════════════════════════════════════════════════════════════
   SELECT DE IDIOMA NO MODAL DE COLETA
   ═══════════════════════════════════════════════════════════════════ */
.sm-language-select {
  width: 100%;
  background: rgba(232,198,104,0.04);
  border: 1px solid rgba(232,198,104,0.2);
  border-radius: 10px;
  padding: 12px 14px;
  color: #e9e3ff;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.95rem;
  transition: all 200ms;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2010%206%22%3E%3Cpath%20fill%3D%22%23e8c668%22%20d%3D%22M0%200l5%206%205-6z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px;
  padding-right: 36px;
}
.sm-language-select:focus {
  outline: 0;
  border-color: rgba(232,198,104,0.5);
  background-color: rgba(232,198,104,0.08);
}
.sm-language-select option {
  background: #1d1138;
  color: #e9e3ff;
}
.sm-language-help {
  display: block;
  margin-top: 6px;
  color: rgba(217,208,245,0.5);
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.78rem;
  font-style: italic;
}
