﻿#parentDiv {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#erklaerung-box {
  width: 100%;
}

#direktSuche,
#filter,
#inspiration-box {
  width: calc(33.333% - 6.67px);
}

#direktSuche {
  position: relative;
  z-index: 30;
}

.box h2 {
  font-size: clamp(24px, 4vw, 34px);
  margin-bottom: 10px;
}

.search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.search-header h2 {
  margin-bottom: 0;
}

.search-header button {
  min-height: 34px;
  padding: 6px 10px;
}

.box p {
  color: var(--text);
}

#filter button,
#inspiration-box button {
  margin-top: 12px;
}

#slogan {
  margin-top: 10px;
  color: var(--muted);
}

#country-search {
  position: relative;
  width: 100%;
}

#countryInput {
  padding: 12px 48px 12px 14px;
  border-radius: 14px;
}

#searchButton {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  min-height: auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
}

#countryDropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: 0 10px 24px rgba(20, 28, 36, 0.12);
  text-align: left;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 20;
}

#countryDropdown li {
  padding: 10px 12px;
  cursor: pointer;
}

#countryDropdown li:hover,
#countryDropdown li.selected {
  background: var(--accent-soft);
}

#countryDropdown li.no-match {
  color: var(--muted);
  font-style: italic;
}

.country-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(16, 19, 22, 0.36);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.country-modal {
  width: min(520px, 100%);
  max-height: min(78vh, 680px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  box-shadow: 0 20px 40px rgba(16, 19, 22, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.country-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.country-modal-head h3 {
  font-size: 1.2rem;
}

.country-modal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}

.country-modal-list li button {
  width: 100%;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 500;
  padding: 10px 14px;
}

.country-modal-list li button:hover {
  background: var(--accent-soft);
  transform: none;
}

.button-inactive {
  opacity: 0.5;
  pointer-events: none;
}

.button-active {
  opacity: 1;
  pointer-events: auto;
}

.dropdown-visible {
  display: block !important;
}

.dropdown-hidden {
  display: none !important;
}

@media (max-width: 980px) {

  #direktSuche,
  #filter,
  #inspiration-box {
    width: calc(50% - 5px);
  }
}

@media (max-width: 660px) {

  #direktSuche,
  #filter,
  #inspiration-box {
    width: 100%;
  }
}
