@import url(./global.css);
@import url(./styles.css);

/* ── WRAPPER ── */
#eqlive-form {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-gray-light);
}

/* ── HEADER ── */
.form-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-green-light);
  padding: 18px 32px 0;
}

.form-header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-bottom: 12px;
}

.brand {
  max-width: 120px;
}

.step-counter {
  position: absolute;
  right: 0;
  font-family: var(--body);
  font-size: 0.8rem;
  color: var(--color-green-soft);
  font-weight: 500;
}

/* ── PROGRESS BAR ── */
.progress-bar {
  display: flex;
  gap: 4px;
}

.progress-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--color-green-pale);
  transition: background 0.22s ease;
}

.progress-seg.done   { background: var(--color-green-soft); }
.progress-seg.active { background: var(--color-green-dark); }

/* ── BODY ── */
.form-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px 24px;
}

.form-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 2vw;
}

@media (max-width: 900px) {
  .form-inner { padding: 0; }
}

/* ── STEPS ── */
.step {
  display: none;
  animation: stepIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.step.active { display: block; }

@keyframes stepIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.step-question {
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  align-items: center;
  text-align: center;
}

/* ── OPTION CARDS ── */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.option-card {
  width: 100%;
  background: var(--color-white);
  border: 1.5px solid var(--color-green-light);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  text-align: left;
  transition: all 0.22s ease;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--body);
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.option-card:hover {
  box-shadow: 0 2px 8px rgba(77, 77, 38, 0.1);
}

.option-card.selected {
  background: var(--color-green-pale);
  border-color: var(--color-green-soft);
}

.option-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--color-green-soft);
  border-radius: 50%;
  margin-top: 1px;
  transition: all 0.2s ease;
  position: relative;
}

.option-check.square {
  border-radius: 5px;
}

.option-card.selected .option-check {
  background: var(--color-green);
  border-color: var(--color-green);
}

.option-label {
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--text-dark);
}

@media (max-width: 600px) {
  .option-card { padding: 14px; }
  .option-label { font-size: 0.88rem; }
}

/* ── RANGE ── */
.range-wrap {
  margin-bottom: 40px;
}

.range-value {
  font-family: var(--heading);
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--text-darkest);
  line-height: 1;
  margin-bottom: 8px;
  text-align: center;
}

.range-track {
  position: relative;
  margin: 16px 0 24px;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.range-labels .p-small {
  opacity: 0.7;
  font-family: var(--body);
  font-size: 0.8rem;
  color: var(--text-dark);
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--color-green-dark) 0%,
    var(--color-green-dark) var(--val, 44%),
    var(--color-gray-mid) var(--val, 44%),
    var(--color-gray-mid) 100%
  );
  outline: none;
  cursor: pointer;
  border: none;
  padding: 0;
  box-shadow: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2.5px solid var(--color-green-dark);
  box-shadow: 0 2px 8px rgba(77, 77, 38, 0.18);
  transition: transform 0.15s;
}

input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }

input[type=range]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2.5px solid var(--color-green-dark);
  box-shadow: none;
}

.range-description {
  min-height: 52px;
  transition: all 0.22s ease;
}

.range-description .p-small {
  font-family: var(--body);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-dark);
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--color-green-pale);
  border-radius: 8px;
  border-left: 3px solid var(--color-green-soft);
}

/* ── FIELDS ── */
.fields-group {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 40px;
}

.field-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-wrap label {
  font-family: var(--body);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green-soft);
  font-weight: 600;
  line-height: 1.4;
}

.field-wrap input {
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--color-green-light);
  border-radius: 8px;
  background: var(--color-white);
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.93rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field-wrap input:focus {
  border-color: var(--color-green-soft);
  box-shadow: 0 0 0 3px rgba(102, 102, 52, 0.08);
}

.field-wrap input::placeholder {
  color: var(--color-green-soft);
  opacity: 0.6;
}

/* ── CONSENT ── */
.consent-box {
  border: 1px solid var(--color-green-light);
  border-radius: 8px;
  padding: 18px;
  background: var(--color-green-pale);
  margin-bottom: 28px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}

.consent-box input[type=checkbox] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--color-green-dark);
  cursor: pointer;
}

.consent-box .p-small {
  font-family: var(--body);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-dark);
}

/* ── REVIEW ── */
.review-section {
  margin-bottom: 32px;
}

.review-section h3 {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-green-light);
  padding-bottom: 10px;
  text-align: left;
}

.review-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--color-gray-mid);
  padding: 10px 0;
}

.review-item:last-of-type { border-bottom: none; }

.ri-label {
  font-family: var(--body);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-green-soft);
}

.ri-value {
  font-family: var(--body);
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.5;
}

.review-edit {
  font-family: var(--body);
  font-size: 0.78rem;
  color: var(--color-green);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-weight: 500;
  margin-top: 12px;
  align-self: flex-start;
}

.review-edit:hover { opacity: 0.6; }

/* ── CONFIRMATION ── */
.confirm-wrap {
  text-align: center;
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-md);
}

.confirm-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-green-pale);
  border: 2px solid var(--color-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.confirm-wrap h2 { text-align: center; }

.confirm-wrap p {
  max-width: 440px;
  text-align: center;
}

/* ── FOOTER / NAVIGATION ── */
.form-footer {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-green-light);
  padding: 20px 24px;
  z-index: 100;
}

.form-nav {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap-sm);
}

/* Botões do formulário estendem os do global.css */
.btn-primary {
  background-color: var(--color-green);
  color: var(--color-white);
  flex: 1;
  justify-content: center;
}

.btn-primary:hover {
  background-color: var(--color-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(51, 51, 26, 0.18);
  opacity: 1;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-dark);
  border: 1.5px solid var(--color-green-light);
  padding: 15px 24px;
}

.btn-ghost:hover {
  background-color: var(--color-green-pale);
  opacity: 1;
}

/* ── VALIDATION ── */
.error-msg {
  font-family: var(--body);
  font-size: 0.8rem;
  color: #a33;
  margin-top: -8px;
  display: none;
}

.error-msg.show { display: block; }

/* ── SCROLLBAR ── */
.form-body::-webkit-scrollbar { width: 4px; }
.form-body::-webkit-scrollbar-track { background: transparent; }
.form-body::-webkit-scrollbar-thumb {
  background: var(--color-green-light);
  border-radius: 2px;
}