/* Поля форм: спільні для сторінки замовлення (order.html) і заявки на дзвінок (index.html) */

.field { display: grid; gap: 0.5rem; margin-top: 1.25rem; min-width: 0; }

.field__label {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
}

.field__opt { color: var(--ink-3); font-weight: 400; }

.field__input {
  width: 100%;
  min-height: 56px;
  padding: 0 1.25rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 1.0625rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field__input::placeholder { color: #8a8984; }
.field__input:hover { border-color: var(--ink-3); }
.field__input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 2px var(--ink); }

.field__input--area {
  font: inherit;
  font-size: 1.0625rem;
  min-height: 7.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--r-inner);
  line-height: 1.5;
  resize: vertical;
}

.field.is-invalid .field__input { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.field__error {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
}

.field__error svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }

/* Телефон: код країни і номер в одній пігулці; рамка й фокус — на обгортці */
.phone {
  display: flex;
  min-height: 56px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.phone:hover { border-color: var(--ink-3); }
.phone:focus-within { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.field.is-invalid .phone { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.phone__code {
  flex: 0 0 auto;
  width: 5.25rem;
  padding: 0 1rem 0 1.125rem;
  border: 0;
  border-right: 1.5px solid var(--line);
  border-radius: 0;
  /* Маленька стрілка-натяк, що код можна змінити */
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a5955' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.5rem center / 9px;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.phone__code:focus { outline: none; }
.phone__code:focus-visible { background-color: var(--surface-2); }

.phone .field__input,
.phone .field__input:focus,
.phone .field__input:hover,
.field.is-invalid .phone .field__input {
  flex: 1;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.field-row { display: grid; gap: 0 1rem; }
.field-row > .field { align-content: start; }

@media (min-width: 40rem) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row--postal { grid-template-columns: 9rem minmax(0, 1fr); }
}
