/**
 * Pole — unified form control (text / number / date).
 * Default size same as vybor/poisk: 210×38, radius 8px.
 */

:root {
  --pole-font-family: var(--poisk-font-family, Arial, sans-serif);
  --pole-font-size: var(--poisk-font-size, 14px);
  --pole-padding-y: var(--poisk-padding-y, 9px);
  --pole-padding-x: var(--poisk-padding-x, 12px);
  --pole-radius: var(--poisk-radius, 8px);
  --pole-border: var(--poisk-border, #cbd5e1);
  --pole-border-focus: var(--poisk-border-focus, #93c5fd);
  --pole-bg: var(--poisk-bg, #ffffff);
  --pole-color: var(--poisk-color, #0f172a);
  --pole-placeholder: var(--poisk-placeholder, #94a3b8);
  --pole-min-height: var(--poisk-min-height, 38px);
  --pole-preferred-width: 210px;
}

.pole,
input.pole,
select.pole,
.stroka-field > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not(.pole-skip),
.stroka-field > select:not(.pole-skip),
.zr-specka-fields input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not(.pole-skip),
.zr-specka-fields select:not(.pole-skip),
.fp-filter-input:not(select):not(.pole-skip),
#fpFilterSupplier,
#fpFilterCulture,
#contractorSearch,
.contractor-search,
.contractor-transit-input {
  box-sizing: border-box;
  min-height: var(--pole-min-height);
  height: var(--pole-min-height);
  padding: var(--pole-padding-y) var(--pole-padding-x);
  border: 1px solid var(--pole-border);
  border-radius: var(--pole-radius);
  background: var(--pole-bg);
  color: var(--pole-color);
  font-family: var(--pole-font-family);
  font-size: var(--pole-font-size);
  font-weight: 400;
  line-height: 1.3;
}

textarea.pole,
.stroka-field > textarea:not(.pole-skip) {
  box-sizing: border-box;
  min-height: calc(var(--pole-min-height) * 2);
  height: auto;
  padding: var(--pole-padding-y) var(--pole-padding-x);
  border: 1px solid var(--pole-border);
  border-radius: var(--pole-radius);
  background: var(--pole-bg);
  color: var(--pole-color);
  font-family: var(--pole-font-family);
  font-size: var(--pole-font-size);
  font-weight: 400;
  line-height: 1.3;
}

/* Fill labeled cell (width = cell; cell default ~210 via stroka) */
.stroka-field > .pole,
.stroka-field > input.pole,
.stroka-field > select.pole,
.stroka-field > textarea.pole,
.stroka-field .sl-search-wrap > .pole,
.stroka-field .stroka-control > .pole,
.stroka-field .zr-search-wrap > .pole {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Date pair: each input is etalon 210×38 (not stretch) */
.stroka-date-range,
.zr-specka-date-range {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
}

.stroka-date-range > input[type="date"],
.stroka-date-range > input.pole[type="date"],
.zr-specka-date-range > input[type="date"],
.zr-specka-date-range > input.pole[type="date"] {
  flex: 0 0 var(--pole-preferred-width);
  width: var(--pole-preferred-width);
  min-width: var(--pole-preferred-width);
  max-width: var(--pole-preferred-width);
  height: var(--pole-min-height);
}

.pole::placeholder,
input.pole::placeholder,
.stroka-field > input::placeholder,
.zr-specka-fields input::placeholder {
  color: var(--pole-placeholder);
  opacity: 1;
}

.pole:focus,
input.pole:focus,
select.pole:focus,
.stroka-field > input:focus,
.stroka-field > select:focus,
.zr-specka-fields input:focus,
.zr-specka-fields select:focus {
  outline: none;
  border-color: var(--pole-border-focus);
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.pole:disabled,
.stroka-field > input:disabled,
.stroka-field > select:disabled,
.zr-specka-fields input:disabled,
.zr-specka-fields select:disabled,
.zr-specka-fields input[readonly] {
  background: #f8fafc;
  color: #334155;
}
