/**
 * intl-tel-input polish — shared across registration, profile, and admin phone fields.
 * Loaded after the library CSS. Scoped to .iti so other form controls are untouched.
 */

.iti {
  --iti-flag-height: 16px;
  --iti-flag-width: 24px;
  --iti-arrow-height: 5px;
  --iti-arrow-width: 8px;
  --iti-triangle-border: calc(var(--iti-arrow-width) / 2);
  --iti-arrow-padding: 8px;
  --iti-spacer-horizontal: 10px;
  --iti-input-padding: 12px;
  --iti-arrow-color: #6b7280;

  position: relative;
  display: block;
  width: 100%;
}

/* Bootstrap input-group: let .iti grow like a normal form-control */
.input-group > .iti {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group > .iti .form-control,
.input-group > .iti input.iti__tel-input {
  width: 100%;
}

.iti__country-container {
  display: flex;
  align-items: center;
  z-index: 2;
}

.iti__selected-country,
.iti__selected-country-primary {
  display: flex;
  align-items: center;
  height: 100%;
}

.iti__selected-country-primary {
  gap: 6px;
  padding: 0 10px 0 12px;
  border-right: 1px solid rgba(0, 0, 0, 0.12);
  background: transparent;
}

.iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly]))
  .iti__selected-country-primary:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.iti__flag-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--iti-flag-width);
  min-width: var(--iti-flag-width);
  height: var(--iti-flag-height);
  flex-shrink: 0;
  line-height: 0;
  margin-right: 0;
}

/* Keep flags clearly visible even when country-specific vars shrink them */
.iti__flag {
  display: inline-block;
  flex-shrink: 0;
  min-height: 14px;
  min-width: 20px;
  height: var(--iti-flag-height);
  width: var(--iti-flag-width);
  margin: 0;
  overflow: hidden;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-size: var(--iti-flag-sprite-width) var(--iti-flag-sprite-height);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  border-radius: 2px;
}

.iti__arrow {
  flex-shrink: 0;
  margin-left: 4px;
  width: 0;
  height: 0;
  border-left: var(--iti-triangle-border) solid transparent;
  border-right: var(--iti-triangle-border) solid transparent;
  border-top: var(--iti-arrow-height) solid var(--iti-arrow-color);
  opacity: 0.9;
}

.iti__arrow--up {
  border-top: none;
  border-bottom: var(--iti-arrow-height) solid var(--iti-arrow-color);
}

.iti .iti__selected-dial-code {
  margin-left: 2px;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 1;
  color: #374151;
  white-space: nowrap;
}

.iti__country-list .iti__country {
  display: flex;
  align-items: center;
  gap: 8px;
}

.iti__country-list .iti__flag-box {
  margin-right: 0;
}

.iti__dropdown-content {
  border-radius: 8px;
  overflow: hidden;
}

/* Tall form controls: keep selector vertically centered */
.form_sec .iti,
.inp_area .iti,
.inp_area2 .iti {
  width: 100%;
}

.form_sec .iti__selected-country-primary,
.inp_area .iti__selected-country-primary,
.inp_area2 .iti__selected-country-primary {
  min-height: 100%;
}
