/* Calculadora de Geradores - Design Minimalista e Tecnológico */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* Reset e Base */
* {
  box-sizing: border-box;
}

.generator-calculator-wrapper {
  font-family: "Roboto Condensed", -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  color: #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
}

/* Container Principal */
.calculator-container {
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Seção de Entrada */
.input-section {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 32px;
  transition: all 0.2s ease;
}

.input-section:hover {
  border-color: #ffbe0b;
  box-shadow: 0 2px 12px rgba(0, 122, 255, 0.08);
}

.input-group {
  margin-bottom: 24px;
}

.input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.label-icon {
  font-size: 1rem;
  color: #ffbe0b;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s ease;
  overflow: hidden;
}

.input-container:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.input-container.focused {
  border-color: #000000;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.calc-input {
  flex: 1;
  padding: 16px 80px 16px 16px;
  font-size: 1.125rem;
  font-weight: 400;
  border: none;
  background: transparent;
  font-family: "Inter", sans-serif;
  color: #1a1a1a;
  outline: none;
}

.calc-input::placeholder {
  color: #9ca3af;
}

.input-unit {
  position: absolute;
  right: 16px;
  font-weight: 500;
  color: #6b7280;
  font-size: 0.875rem;
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 4px;
}

/* Botão Principal */
.calc-button {
  width: 100%;
  padding: 16px 24px;
  background: #ffbe0b;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Roboto Condensed", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.calc-button:hover {
  background: #ffbe0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.calc-button:active {
  transform: translateY(0);
}

.calc-button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

/* Loading State */
.button-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button-loader {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.loader-dot {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  animation: loadingDots 1.4s infinite ease-in-out both;
}

.loader-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.loader-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loadingDots {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Seção de Resultado */
.result-section {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 32px;
  animation: slideInUp 0.4s ease-out;
  position: relative;
  overflow: hidden;
}

.result-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #59a600 0%, #34d399 100%);
}

.result-section:hover {
  border-color: #ffbe0b;
  box-shadow: 0 2px 12px rgba(0, 122, 255, 0.08);
}

.result-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  text-align: center;
}

.result-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  background: #f0f9ff;
  border-radius: 50%;
}

.result-icon .icon-emoji {
  font-size: 24px;
  color: #ffbe0b;
}

.result-title h3 {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.result-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 400;
  line-height: 1.4;
}

.result-display {
  text-align: center;
}

.result-main {
  margin-bottom: 24px;
}

.result-value-wrapper {
  margin-bottom: 16px;
  position: relative;
}

.result-value {
  font-size: 3rem;
  font-weight: 700;
  color: #1a1a1a;
  display: inline-block;
  line-height: 1;
}

.result-unit {
  font-size: 1.5rem;
  font-weight: 500;
  color: #6b7280;
  margin-left: 8px;
}

.result-badge {
  display: inline-block;
  background: #f0f9ff;
  color: #000000;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid #bae6fd;
}

/* Seção de Erro */
.error-section {
  background: #ffffff;
  border: 1px solid #fbbf24;
  border-radius: 12px;
  padding: 24px;
  animation: slideInUp 0.4s ease-out;
}

.error-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.error-icon {
  width: 40px;
  height: 40px;
  background: #fef3c7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d97706;
  flex-shrink: 0;
}

.error-content h3 {
  margin: 0 0 4px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.error-content p {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 400;
}

/* Animações */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Estados de Validação */
.input-container.valid {
  border-color: #34d399;
  background: #f0fdf4;
}

.input-container.valid::after {
  content: "✓";
  position: absolute;
  right: 90px;
  color: #34d399;
  font-weight: 600;
  font-size: 1rem;
}

.input-container.invalid {
  border-color: #fbbf24;
  background: #fffbeb;
  animation: shake 0.6s ease-in-out;
}

.input-container.invalid::after {
  content: "⚠";
  position: absolute;
  right: 90px;
  color: #fbbf24;
  font-weight: 600;
  font-size: 1rem;
}

/* Estados de Sucesso */
.result-section.success {
  border-color: #34d399;
}

/* Animações Adicionais */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .generator-calculator-wrapper {
    margin: 16px;
    border-radius: 12px;
  }

  .calculator-container {
    padding: 24px;
    gap: 24px;
  }

  .input-section,
  .result-section,
  .error-section {
    padding: 24px;
  }

  .result-value {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .calculator-container {
    padding: 20px;
    gap: 20px;
  }

  .input-section,
  .result-section,
  .error-section {
    padding: 20px;
  }

  .result-value {
    font-size: 2rem;
  }

  .result-header,
  .error-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* Melhorias de Acessibilidade */
.calc-button:focus {
  outline: none;
    box-shadow: 0 0 0 3px rgba(255, 190, 11, 0.3);
}

.calc-input:focus {
  outline: none;
}

/* Transições Suaves */
* {
  transition: all 0.2s ease;
}

/* Estados de Loading */
.calc-button.loading .button-content {
  opacity: 0;
}

.calc-button.loading .button-loader {
  display: flex !important;
}

/* Efeitos de Hover Suaves */
.input-section:hover,
.result-section:hover {
  transform: translateY(-1px);
}

/* Melhorias de Espaçamento */
.calc-input-group:last-child {
  margin-bottom: 0;
}

/* Estilos para Campos de Entrada */
.calc-input:focus {
  background: #ffffff;
}

/* Estilos para Botões Secundários */
.secondary-button {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-button:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* Estilos para Informações Adicionais */
.additional-info {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

/* Estilos para Mensagens de Status */
.status-message {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.status-message.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.status-message.info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
