.ligeis-property-search {
  --immo-blue: var(--wp--preset--color--brand-primary, #3b61e7);
  --immo-blue-dark: var(--wp--preset--color--brand-primary-hover, #05207f);
  --immo-border: var(--wp--preset--color--brand-light-blue, #adc2fa);
  --immo-text: var(--wp--preset--color--text-primary, #1d1d1b);
  --immo-text-secondary: var(--wp--preset--color--text-secondary, #4b5563);
  --immo-text-muted: var(--wp--preset--color--text-muted, #6b7280);
  --immo-surface: var(--wp--preset--color--text-inverse, #fff);
  --immo-surface-secondary: var(--wp--preset--color--bg-secondary, #f4f6ff);
  --immo-surface-tertiary: var(--wp--preset--color--bg-tertiary, #f3f4f6);
  --immo-border-default: var(--wp--preset--color--border-default, #e5e7eb);
  --immo-error: var(--wp--preset--color--state-error, #dc2626);
  color: var(--immo-text);
  font-family: "Plus Jakarta Sans", sans-serif;
}

.ligeis-property-search__form {
  position: relative;
}

.ligeis-property-search__shell {
  padding: 8px;
  border: 1px solid var(--immo-border);
  border-radius: 16px;
  background: var(--immo-surface);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--immo-blue-dark) 8%, transparent);
}

.ligeis-property-search__primary {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr 1fr auto;
  gap: 8px;
}

.ligeis-property-search__form label {
  display: grid;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--immo-border) 55%, var(--immo-surface));
  border-radius: 8px;
  background: var(--immo-surface);
}

.ligeis-property-search__form label > span:first-child {
  color: var(--immo-text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ligeis-property-search__form select,
.ligeis-property-search__form input {
  width: 100%;
  min-height: 28px;
  padding: 2px 22px 0 0;
  border: 0;
  outline: 0;
  background-color: transparent;
  color: var(--immo-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.ligeis-property-search__budget {
  display: flex;
  align-items: center;
}

.ligeis-property-search__budget small {
  color: var(--immo-text-muted);
  font-weight: 700;
}

.ligeis-property-search__primary > button[type="submit"] {
  min-width: 128px;
  padding: 0 24px;
  border: 1px solid var(--immo-blue);
  border-radius: 8px;
  background: var(--immo-blue);
  color: var(--immo-surface);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.ligeis-property-search__primary > button[type="submit"]:hover {
  background: var(--immo-blue-dark);
  transform: translateY(-1px);
}

.ligeis-property-search__primary > button[type="submit"]:disabled {
  cursor: wait;
  opacity: .65;
}

.ligeis-property-search__advanced {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  opacity: 0;
  transition: grid-template-rows 280ms ease, opacity 200ms ease, visibility 280ms;
}

.ligeis-property-search__form.is-advanced-open .ligeis-property-search__advanced {
  grid-template-rows: 1fr;
  visibility: visible;
  opacity: 1;
}

.ligeis-property-search__advanced-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.ligeis-property-search__form.is-advanced-open .ligeis-property-search__advanced-inner {
  margin-top: 8px;
  padding-top: 8px;
}

.ligeis-property-search__advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  width: max-content;
  margin: -1px auto 0;
  padding: 8px 16px;
  border: 1px solid var(--immo-border);
  border-radius: 0 0 10px 10px;
  background: var(--immo-surface);
  color: var(--immo-blue-dark);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.ligeis-property-search__advanced-toggle:hover {
  border-color: var(--immo-blue);
  color: var(--immo-blue);
}

.ligeis-property-search__advanced-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 220ms ease;
}

.ligeis-property-search__form.is-advanced-open .ligeis-property-search__advanced-toggle svg {
  transform: rotate(180deg);
}

.ligeis-property-search__form.is-advanced-open .ligeis-property-search__advanced-toggle {
  border-radius: 0 0 10px 10px;
}

.ligeis-property-search__checks {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
}

.ligeis-property-search__checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding-inline: 16px;
  cursor: pointer;
}

.ligeis-property-search__checks input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--immo-blue);
}

.ligeis-property-search__checks label > span:first-child {
  font-size: 14px;
  text-transform: none;
}

.ligeis-property-search__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 44px 0 16px;
}

.ligeis-property-search__sortbar {
  display: flex;
  align-items: end;
  gap: 10px;
}

.ligeis-property-search__sortbar label {
  display: grid;
  width: 240px;
  gap: 4px;
}

.ligeis-property-search__sortbar label > span {
  color: var(--immo-text-secondary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ligeis-property-search__sortbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--immo-border);
  border-radius: 8px;
  background-color: var(--immo-surface);
  color: var(--immo-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
}

.ligeis-property-search__sortbar button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--immo-border);
  border-radius: 8px;
  background: var(--immo-surface);
  color: var(--immo-blue);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ligeis-property-search__sortbar button:hover {
  border-color: var(--immo-blue);
}

.ligeis-property-search__status {
  min-height: 24px;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.ligeis-property-search.is-loading .ligeis-property-card-grid {
  pointer-events: none;
}

.ligeis-property-card--skeleton:hover,
.ligeis-property-card--skeleton:focus-within {
  border-color: var(--immo-border);
  box-shadow: none;
  transform: none;
}

.ligeis-property-card--skeleton .ligeis-property-card__media {
  background-image: none;
}

.ligeis-skeleton {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  background: color-mix(in srgb, var(--immo-surface-secondary) 75%, var(--immo-border-default));
}

.ligeis-skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--immo-surface) 72%, transparent), transparent);
  content: "";
  transform: translateX(-100%);
  animation: ligeis-skeleton-shimmer 1.3s ease-in-out infinite;
}

.ligeis-skeleton--location {
  width: 38%;
  height: 12px;
}

.ligeis-skeleton--title {
  width: 44%;
  height: 18px;
}

.ligeis-skeleton--price {
  width: 30%;
  height: 24px;
}

.ligeis-skeleton--features {
  width: 100%;
  height: 14px;
  margin-top: 32px;
}

@keyframes ligeis-skeleton-shimmer {
  to { transform: translateX(100%); }
}

.ligeis-property-search__empty,
.ligeis-property-search__error {
  grid-column: 1 / -1;
  padding: 32px;
  border: 1px solid var(--immo-border);
  border-radius: 12px;
  text-align: center;
}

.ligeis-property-search__error {
  color: var(--immo-error);
}

.ligeis-property-search__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.ligeis-property-search__pagination button {
  padding: 11px 18px;
  border: 1px solid var(--immo-blue);
  border-radius: 8px;
  background: var(--immo-surface);
  color: var(--immo-blue);
  font-weight: 700;
  cursor: pointer;
}

.ligeis-property-search__pagination button:disabled {
  cursor: default;
  opacity: .4;
}

@media (max-width: 1100px) {
  .ligeis-property-search__primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ligeis-property-search__primary > button[type="submit"] {
    min-height: 58px;
  }

  .ligeis-property-search__advanced-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .ligeis-property-search__primary {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ligeis-property-search__primary > button[type="submit"] {
    min-height: 52px;
  }

  .ligeis-property-search__advanced-inner {
    grid-template-columns: 1fr;
  }

  .ligeis-property-search__advanced-toggle {
    width: calc(100% - 24px);
  }

  .ligeis-property-search__toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .ligeis-property-search__sortbar {
    order: -1;
  }

  .ligeis-property-search__sortbar label {
    flex: 1;
  }

  .ligeis-property-search__sortbar label,
  .ligeis-property-search__sortbar button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ligeis-property-search__advanced,
  .ligeis-property-search__advanced-toggle svg,
  .ligeis-skeleton::after {
    transition: none;
    animation: none;
  }
}
