/**
 * YuiaNF - Componentes de Interface
 * Dropzone, Botões em Pílula, Progresso, Alertas e Cards
 */

/* Dropzone (Área de Arrastar e Soltar) */
.dropzone-container {
  margin-bottom: 2rem;
}

.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 3.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.dropzone:hover,
.dropzone.drag-active {
  border-color: var(--primary);
  background: var(--card-hover);
  box-shadow: 0 0 35px var(--primary-glow);
  transform: translateY(-1px);
}

.dropzone:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 46, 64, 0.4);
}

.dropzone-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 1.25rem;
  background: rgba(229, 46, 64, 0.12);
  border: 1px solid rgba(229, 46, 64, 0.28);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff3b50;
  transition: transform 0.25s ease;
}

.dropzone:hover .dropzone-icon,
.dropzone.drag-active .dropzone-icon {
  transform: scale(1.08);
  color: #ff556b;
}

.dropzone-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.dropzone-desc {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-bottom: 1.6rem;
}

.dropzone-hint {
  display: block;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Botões Estilo Yuia (Pill-shaped) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff3b50 0%, #d91b30 100%);
  box-shadow: 0 6px 24px rgba(229, 46, 64, 0.6);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Barra de Progresso */
.progress-section {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.progress-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.progress-percentage {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ff4d6d;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e52e40 0%, #ff4d6d 100%);
  border-radius: var(--radius-pill);
  transition: width 0.15s ease-out;
  box-shadow: 0 0 12px rgba(229, 46, 64, 0.5);
}

.progress-filename {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Alertas */
.alert-box {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.alert-box.alert-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: #fca5a5;
}

.alert-box.alert-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: #fde68a;
}

.alert-box.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: #6ee7b7;
}

.alert-box svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Cartões de Resumo */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.2s;
}

.summary-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.summary-card-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-card-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: #ff4d6d;
}

.card-renamed .summary-card-value { color: var(--success); }
.card-duplicates .summary-card-value { color: var(--info); }
.card-unidentified .summary-card-value { color: var(--warning); }

/* Card de Opção de Conversão para PDF */
.conversion-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.6rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.conversion-card.is-active {
  border-color: rgba(229, 46, 64, 0.4);
  box-shadow: 0 0 25px rgba(229, 46, 64, 0.25);
  background: linear-gradient(135deg, rgba(229, 46, 64, 0.08) 0%, var(--card) 60%);
}

.conversion-card-body {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex: 1;
}

.conversion-badge-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(229, 46, 64, 0.12);
  border: 1px solid rgba(229, 46, 64, 0.3);
  color: #ff4d6d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.conversion-card.is-active .conversion-badge-icon {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 0 15px var(--primary-glow);
  transform: scale(1.05);
}

.conversion-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.conversion-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.conversion-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.conversion-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}

.conversion-pill.pill-off {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

.conversion-pill.pill-on {
  background: rgba(229, 46, 64, 0.2);
  border: 1px solid rgba(229, 46, 64, 0.45);
  color: #ff6578;
  box-shadow: 0 0 10px rgba(229, 46, 64, 0.3);
}

.conversion-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.conversion-desc strong {
  color: #f3f4f6;
}

/* Switch Toggle Yuia */
.conversion-card-toggle {
  flex-shrink: 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 28px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  transition: all 0.25s ease;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary-gradient);
  border-color: rgba(229, 46, 64, 0.6);
  box-shadow: 0 0 14px var(--primary-glow);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(26px);
  background-color: #ffffff;
}

.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .conversion-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .conversion-card-toggle {
    align-self: flex-end;
  }
}

