:root {
  --als-red: #d61f2a;
  --als-red-hover: #b01821;

  --bg-body: #ffffff;
  --bg-sidebar: #f3f4f6;
  --bg-input: #f9fafb;

  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-white: #ffffff;

  --border-color: #e5e7eb;
  --border-focus: #d61f2a;
  --success-color: #059669;

  --radius-sm: 6px;
  --radius-md: 12px;
  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Figtree', sans-serif;
}

body,
html {
  min-height: 100vh;
  background-color: var(--bg-body);
  color: var(--text-primary);
}

/* --- Split Layout --- */
.layout-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
}

.sidebar-image {
  flex: 0.5;
  background-image: url('../../assets/imgs/orcamento.webp');
  background-size: cover;
  background-position: right bottom;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 4rem;
  opacity: 0.95;
}

.sidebar-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(17, 3, 5, 0.9), rgba(17, 3, 5, 0.1));
  z-index: 1;
}

.sidebar-content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 500px;
}

.sidebar-content h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  font-weight: 700;
}

.sidebar-content p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.form-side {
  flex: 1;
  max-width: 700px;
  background-color: var(--bg-body);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 3rem 4rem;
}

@media (max-width: 1024px) {
  .sidebar-image {
    display: none;
  }

  .form-side {
    max-width: 100%;
    padding: 2rem;
    flex: 1;
  }
}

/* --- Header --- */
.header {
  margin-bottom: 2.5rem;
}

.logo-area {
  max-width: 115px;
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
}

.logo-area img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.logo-area span {
  color: var(--als-red);
}

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

.step-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.step-indicator {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.progress-container {
  background-color: var(--bg-sidebar);
  height: 4px;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--als-red);
  width: 0%;
  transition: width 0.4s ease;
}

/* --- Steps --- */
.step-content {
  display: none;
  flex: 1;
  animation: fadeIn 0.3s ease-out;
  padding-bottom: 2rem;
}

.step-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

input[type='text'],
input[type='tel'],
select,
textarea {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: #fff;
}

/* --- Cards/Chips --- */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.radio-card {
  position: relative;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.card-visual {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  background-color: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  height: 100%;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.card-visual:hover {
  border-color: #a0a0a0;
}

.radio-card input:checked + .card-visual {
  background-color: #fff;
  border-color: var(--als-red);
  color: var(--als-red);
  border-width: 2px;
  padding: 15px;
}

/* --- Actions --- */
.actions {
  display: flex;
  /* Alterado para space-between para separar o Voltar dos botões de ação */
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 2rem;
  flex-wrap: wrap-reverse;
}

/* Grupo de botões da direita */
.actions-right {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  /* Evita quebra de linha no botão */
}

.btn-secondary {
  background-color: white;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-input);
  border-color: #d1d5db;
}

.btn-primary {
  background-color: var(--als-red);
  color: white;
}

.btn-primary:hover {
  background-color: var(--als-red-hover);
}

.btn-primary:disabled {
  background-color: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Ajustado para não ter margens/largura fixa, permitindo alinhamento flex */
.btn-whatsapp {
  background-color: #25d366;
  color: white;
  gap: 10px;
}

.btn-whatsapp:hover {
  background-color: #1ebc57;
}

/* --- Summary & Success --- */
.summary-card {
  background-color: var(--bg-input);
  padding: 2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.summary-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.summary-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.success-message {
  text-align: center;
  padding: 2rem 0;
}

.icon-success {
  font-size: 4rem;
  color: var(--success-color);
  margin-bottom: 1.5rem;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 1.5rem;
}

.hidden {
  display: none !important;
}

*:focus-visible {
  outline: 2px solid var(--als-red);
  outline-offset: 2px;
}
