.flab {
  --flab-accent: #5bc6c2;
  --flab-accent-dark: #00a8a3;
  --flab-text: #3f4147;
  --flab-muted: #6b7280;
  --flab-border: #b7c4c9;
  position: relative;
  width: 100%;
  padding: 34px 30px 42px;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--flab-text);
  font-family: "Open Sans", sans-serif;
  text-align: left;
}

.flab.flab-dropdown-open {
  z-index: 100;
  isolation: isolate;
}

.flab::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  background: linear-gradient(180deg, #effbfc 0%, #e9f8f8 100%);
  transform: translateX(-50%);
}

.flab > * {
  position: relative;
  z-index: 1;
}

.flab,
.flab * {
  box-sizing: border-box;
}

.flab-header {
  margin-bottom: 20px;
  text-align: center;
}

.flab-title {
  margin: 0 0 10px;
  color: #42434a;
  font-family: "Poppins", "Open Sans", sans-serif;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.flab-subtitle {
  margin: 0;
  color: #657079;
  font-size: 13px;
  line-height: 1.45;
}

.flab-form {
  display: grid;
  grid-template-columns:
    minmax(190px, 1.1fr)
    minmax(175px, 0.95fr)
    minmax(220px, 1.25fr)
    minmax(130px, 0.62fr)
    minmax(155px, 0.78fr);
  gap: 10px;
  width: 100%;
  margin: 0;
}

.flab-field {
  position: relative;
  min-width: 0;
}

.flab-field-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 18px;
  width: 24px;
  height: 24px;
  color: #8f98b0;
  pointer-events: none;
  transform: translateY(-50%);
}

.flab-field-icon svg,
.flab-submit svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flab input {
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0 20px 0 56px;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  outline: 0;
  background: #fff;
  color: #30343a;
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%);
  transition: 0.2s;
}

.flab input:focus-visible {
  border-color: var(--e-global-color-accent, var(--flab-accent-dark));
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%);
}

.flab input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.flab input::placeholder {
  color: #8c93b5;
  opacity: 1;
}

.flab-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  min-width: 155px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: #63c7c3;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  transition: 0.2s ease;
}

.flab-submit:hover {
  background: #63c7c3;
  color: #fff;
  opacity: 0.95;
  transform: translateY(-1px);
}

.flab-submit:active {
  transform: translateY(1px);
}

.flab-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.flab-submit svg {
  width: 18px;
  height: 18px;
}

.flab-dropdown {
  position: absolute;
  z-index: 99999;
  top: calc(100% + 7px);
  left: 0;
  display: grid;
  width: max(100%, 220px);
  max-width: min(350px, calc(100vw - 32px));
  max-height: min(260px, 45vh);
  margin: 0;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  gap: 4px;
  border: 1px solid #d8dde1;
  border-radius: 16px;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 30px rgb(0 0 0 / 8%);
}

.flab-dropdown[hidden] {
  display: none;
}

.flab-option {
  all: unset;
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 14px 18px;
  border-radius: 10px;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.flab-option:hover,
.flab-option:focus,
.flab-option[aria-selected="true"] {
  background: #f1f3f4;
  outline: 0;
}

.flab-dropdown-message {
  padding: 9px 10px;
  color: var(--flab-muted);
  font-size: 12px;
  line-height: 1.4;
}

.flab-feedback {
  margin: 12px 0 0;
  padding: 10px 13px;
  border: 1px solid #cfe8e8;
  border-radius: 9px;
  background: #f7ffff;
  color: #365b61;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.flab-feedback[data-kind="error"],
.flab-feedback[data-kind="temporary_error"],
.flab-feedback[data-kind="invalid_address"],
.flab-feedback[data-kind="invalid_building_number"],
.flab-feedback[data-kind="rate_limited"] {
  border-color: #efcccc;
  background: #fff7f7;
  color: #8e2f2f;
}

.flab-feedback[hidden],
.flab-selected-address[hidden],
.flab-services[hidden] {
  display: none;
}

.flab-selected-address {
  margin: 16px 0 10px;
  color: #68747c;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.flab-services {
  display: grid;
  gap: 7px;
  width: min(94%, 980px);
  margin: 0 auto;
}

.flab-service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 205px);
  align-items: center;
  min-height: 48px;
  padding: 5px 10px 5px 18px;
  gap: 16px;
  border: 1px solid rgb(216 229 232 / 70%);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgb(24 48 58 / 4%);
}

.flab-service p {
  margin: 0;
  color: #45474d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.flab-service strong {
  color: #00a8a3;
  font-weight: 800;
}

.flab-service-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--flab-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}

.flab-service-action:hover {
  background: var(--flab-accent-dark);
  color: #fff;
}

.flab-service.is-unavailable {
  border-color: #cdd9e0;
  background: #dfe8ee;
}

.flab-service.is-unavailable .flab-service-action {
  background: #858585;
  color: #fff;
  cursor: default;
  pointer-events: none;
}

.flab-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-top-color: #fff;
  border-radius: 50%;
  animation: flab-spin 0.7s linear infinite;
}

.flab-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes flab-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
  .flab-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flab-submit {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  .flab {
    padding: 32px 0 34px;
  }

  .flab-form {
    grid-template-columns: 1fr;
  }

  .flab-submit {
    grid-column: auto;
  }

  .flab-services {
    width: 100%;
  }

  .flab-service {
    grid-template-columns: 1fr;
    padding: 13px;
    gap: 10px;
  }

  .flab-service-action {
    width: 100%;
  }
}
