/* ============================
   back-link
   ============================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--color-cta);
}

.back-link__icon {
  width: 6px;
  height: 11px;
}

/* ============================
   cadastro-hero
   ============================ */
.cadastro-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-block: 24px 8px;
}

.cadastro-hero__title {
  font-size: 24px;
  font-weight: 500;
  color: #0c0c0d;
}

.cadastro-hero__subtitle {
  font-size: 15px;
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .cadastro-hero {
    padding-block: 30px 12px;
  }

  .cadastro-hero__title {
    font-size: 28px;
  }

  .cadastro-hero__subtitle {
    font-size: 16px;
  }
}

@media (min-width: 1440px) {
  .cadastro-hero__title {
    font-size: 32px;
  }
}

/* ============================
   cadastro-form layout
   ============================ */
.cadastro-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-block: 24px 60px;
}

.cadastro-form__success {
  padding: 16px 20px;
  background: rgba(0, 136, 99, 0.1);
  border: 1px solid var(--color-cta);
  border-radius: var(--radius-sm);
  color: var(--color-cta-active);
  font-size: 14px;
  font-weight: 500;
}

.cadastro-form__success[hidden] {
  display: none;
}

@media (min-width: 1024px) {
  .cadastro-form {
    gap: 32px;
    padding-block: 30px 80px;
  }
}

/* ============================
   form-section (card)
   ============================ */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding: 20px;
  background: var(--color-white);
  border: 1px solid var(--color-bg-muted);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.form-section__title {
  padding: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}

.form-section__subtitle {
  margin-top: -8px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

@media (min-width: 1024px) {
  .form-section {
    gap: 20px;
    padding: 30px;
  }

  .form-row {
    flex-direction: row;
    gap: 20px;
  }

  .form-row .input-text-group {
    flex: 1;
    min-width: 0;
  }
}

/* ============================
   select (input-text)
   ============================ */
select.input-text {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b5b5b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9L12 15L18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 40px;
  cursor: pointer;
}

/* ============================
   hours-row
   ============================ */
.hours-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding-block: 12px;
  border-bottom: 1px solid var(--color-bg-muted);
}

.hours-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hours-row__day {
  padding-inline: 0;
}

.hours-row__separator {
  display: none;
}

@media (min-width: 1024px) {
  .hours-row {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding-block: 10px;
  }

  .hours-row__day {
    flex-shrink: 0;
    width: 200px;
  }

  .hours-row .input-text-group {
    flex: 1;
    min-width: 0;
  }

  .hours-row__separator {
    display: block;
    flex-shrink: 0;
    font-size: 14px;
    color: #2d2d3a;
  }
}

/* ============================
   confirm-section
   ============================ */
.confirm-section {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  padding: 20px 0;
}

.confirm-section__checkbox {
  padding-inline: 0;
}

.confirm-section__submit {
  width: 100%;
}

@media (min-width: 1024px) {
  .confirm-section {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .confirm-section__submit {
    width: auto;
  }
}

/* ============================
   form-hint / form-status
   ============================ */
.form-hint {
  font-weight: 400;
  color: var(--color-text-secondary);
}

.confirm-section__hint {
  font-size: 13px;
}

@media (min-width: 1024px) {
  .confirm-section__hint {
    flex: 1;
    padding-right: 40px;
  }
}

.form-status {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.form-status[hidden] {
  display: none;
}

/* ============================
   upload-field
   ============================ */
.upload-field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  background: var(--color-white);
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition-base), background-color var(--transition-base),
    color var(--transition-base);
}

.upload-field:hover,
.upload-field:focus-within {
  border-color: var(--color-cta);
}

.upload-field__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.upload-field.is-filled {
  border-style: solid;
  border-color: var(--color-cta);
  background: rgba(0, 136, 99, 0.06);
  color: var(--color-cta-active);
}

.upload-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.upload-previews[hidden] {
  display: none;
}

.upload-preview-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
}

.upload-preview-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-item__actions {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(12, 13, 13, 0.45);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.upload-preview-item:hover .upload-preview-item__actions,
.upload-preview-item:focus-within .upload-preview-item__actions {
  opacity: 1;
}

.upload-preview-item__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-text);
  transition: background-color var(--transition-base), color var(--transition-base);
}

.upload-preview-item__btn svg {
  width: 15px;
  height: 15px;
}

.upload-preview-item__btn:hover,
.upload-preview-item__btn:focus-visible {
  background: var(--color-cta);
  color: var(--color-white);
}

.upload-preview-item__btn--delete:hover,
.upload-preview-item__btn--delete:focus-visible {
  background: var(--color-error);
}

/* ============================
   photo-preview-dialog
   ============================ */
.photo-preview-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(92vw, 640px);
  max-height: 88vh;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-collage);
}

.photo-preview-dialog::backdrop {
  background: rgba(12, 13, 13, 0.6);
}

.photo-preview-dialog__image {
  display: block;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  background: #0c0d0d;
}

.photo-preview-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

.photo-preview-dialog__close svg {
  width: 18px;
  height: 18px;
}

.photo-preview-dialog__close:hover,
.photo-preview-dialog__close:focus-visible {
  background: var(--color-bg-muted);
}

/* ============================
   success-dialog
   ============================ */
.success-dialog {
  position: relative;
  margin: auto;
  width: min(440px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 32px;
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  text-align: center;
}

.success-dialog::backdrop {
  background: rgba(12, 13, 13, 0.5);
}

.success-dialog__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--color-text-secondary);
  transition: background-color var(--transition-base);
}

.success-dialog__close:hover,
.success-dialog__close:focus-visible {
  background: var(--color-bg-muted);
}

.success-dialog__close svg {
  width: 18px;
  height: 18px;
}

.success-dialog__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--color-cta);
  border-radius: 50%;
}

.success-dialog__icon svg {
  width: 26px;
  height: 26px;
}

.success-dialog__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.success-dialog__description {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.success-dialog__callout {
  margin-top: 20px;
  padding: 16px;
  background: rgba(0, 136, 99, 0.08);
  border: 1px solid rgba(0, 136, 99, 0.25);
  border-radius: 12px;
  text-align: left;
}

.success-dialog__callout-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-cta-active);
}

.success-dialog__callout-text {
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.success-dialog__summary {
  margin-top: 16px;
  padding: 16px;
  background: var(--color-bg-muted);
  border-radius: 12px;
  text-align: left;
}

.success-dialog__summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-block: 6px;
  font-size: 13px;
}

.success-dialog__summary-row span:first-child {
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.success-dialog__summary-row span:last-child {
  color: var(--color-text);
  font-weight: 600;
  text-align: right;
}

.success-dialog__cta {
  display: flex;
  width: 100%;
  margin-top: 24px;
}

/* ============================
   stepper
   ============================ */
.stepper {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: var(--color-white);
  border: 1px solid var(--color-bg-muted);
  border-radius: 16px;
}

.stepper__step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.stepper__circle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.stepper__circle svg {
  width: 14px;
  height: 14px;
}

.stepper__label {
  display: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.stepper__line {
  flex: 1;
  height: 1px;
  margin-inline: 8px;
  background: var(--color-bg-muted);
}

.stepper__step.is-active .stepper__circle {
  background: rgba(0, 136, 99, 0.15);
  color: var(--color-cta-active);
  box-shadow: 0 0 0 2px var(--color-cta);
}

.stepper__step.is-active .stepper__label {
  color: var(--color-cta-active);
  font-weight: 700;
}

.stepper__step.is-done .stepper__circle {
  background: var(--color-cta);
  color: var(--color-white);
}

.stepper__step.is-done .stepper__label {
  color: var(--color-text);
}

@media (min-width: 640px) {
  .stepper__label {
    display: inline;
  }
}

/* ============================
   proposal-card
   ============================ */
.proposal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.proposal-card {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-base), background-color var(--transition-base);
}

.proposal-card:hover {
  border-color: var(--color-cta);
}

.proposal-card[aria-pressed="true"] {
  border-color: var(--color-cta);
  background: rgba(0, 136, 99, 0.06);
  box-shadow: 0 0 0 1px var(--color-cta);
}

.proposal-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.proposal-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.proposal-card__value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-cta-active);
}

.proposal-card__detail {
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* ============================
   summary-box
   ============================ */
.summary-box {
  padding: 16px;
  background: var(--color-bg-muted);
  border-radius: 12px;
}

.summary-box__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-block: 6px;
  font-size: 13px;
}

.summary-box__row + .summary-box__row {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.summary-box__row span:first-child {
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.summary-box__row span:last-child {
  color: var(--color-text);
  font-weight: 600;
  text-align: right;
}

/* ============================
   result-panel (aceite / coleta-agendada / semmatch)
   ============================ */
.result-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  max-width: 560px;
  padding: 32px;
  background: var(--color-white);
  border: 1px solid var(--color-bg-muted);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.result-panel--compact {
  max-width: none;
  padding: 24px;
}

@media (min-width: 1024px) {
  .result-panel--compact {
    padding: 30px;
  }
}

.result-panel__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--color-cta);
  border-radius: 50%;
}

.result-panel__icon svg {
  width: 26px;
  height: 26px;
}

.result-panel__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
}

.result-panel__text {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.result-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

.result-panel__actions--end {
  justify-content: flex-end;
}
