/* === Modern responsive styles for lerndidaktiker.net === */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #1b2e83;
  --color-primary-dark: #141f5c;
  --color-primary-light: #eef0f8;
  --color-accent: #2e9abe;
  --color-accent-hover: #247d9b;
  --color-bg: #f0f2f5;
  --color-surface: #ffffff;
  --color-border: #e0e4e8;
  --color-text: #2c3e50;
  --color-text-muted: #7f8c9b;
  --color-text-light: #95a1ad;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* --- Fixed width wrapper --- */

.container-fluid {
  width: 1100px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

footer.footer .container {
  width: 1100px;
  max-width: 100%;
  margin: 0 auto;
}

/* --- Header / Logo --- */

#header {
  text-align: center;
  padding: 28px 20px;
  background: var(--color-surface);
  border-bottom: none;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

#header img.logo-img {
  max-width: 100%;
  height: auto;
  max-height: 120px;
  transition: transform 0.2s;
}

#header img.logo-img:hover {
  transform: scale(1.02);
}

/* --- Store Finder --- */

#clinic-finder {
  position: relative;
  background: var(--color-surface);
  padding: 0;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* --- Search Form --- */

#clinic-finder-form {
  padding: 28px 28px 24px;
  background: linear-gradient(135deg, #1b2e83 0%, #152468 50%, #101b50 100%);
  color: #fff;
  margin-bottom: 0;
}

#clinic-finder-form label {
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

#clinic-finder-form input#address {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.95);
  color: var(--color-text);
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#clinic-finder-form input#address:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

#clinic-finder-form #edit-submit {
  margin-top: 10px;
  padding: 12px 40px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: none;
  background: linear-gradient(135deg, #fff 0%, #f0f4f8 100%);
  color: var(--color-primary-dark);
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-block;
  float: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

#clinic-finder-form #edit-submit:hover {
  background: linear-gradient(135deg, #f0f4f8 0%, #e4eaf0 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

#clinic-finder-form #edit-submit:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* --- Map & Results Layout --- */

.finder-content {
  display: flex;
  flex-wrap: wrap;
  min-height: 520px;
}

#map_canvas {
  flex: 1 1 65%;
  min-height: 520px;
  border: none;
  float: none;
  width: auto;
  height: auto;
}

#results {
  flex: 1 1 35%;
  min-width: 280px;
  max-width: 100%;
  padding: 0;
  display: block;
  float: none;
  width: auto;
  min-height: auto;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
}

#results h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-primary-light);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

#results ol {
  margin: 0;
  padding: 0;
  overflow-y: auto;
  max-height: 465px;
  list-style: none;
}

/* Custom scrollbar */
#results ol::-webkit-scrollbar {
  width: 6px;
}
#results ol::-webkit-scrollbar-track {
  background: #f5f5f5;
}
#results ol::-webkit-scrollbar-thumb {
  background: #c0c8d0;
}
#results ol::-webkit-scrollbar-thumb:hover {
  background: #a0a8b0;
}

#results ol li {
  padding: 14px 14px 14px 52px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  cursor: pointer;
  transition: all 0.15s ease;
  list-style: none;
  background: url(../img/list-icon.png) no-repeat 12px 14px;
}

#results ol li:last-child {
  border-bottom: none;
}

#results ol li:hover {
  background-color: var(--color-primary-light);
}

#results ol li.active {
  background-color: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
  padding-left: 49px;
}

#results ol li span.number {
  font-size: 15px;
  display: block;
  position: absolute;
  top: 16px;
  left: 22px;
  color: #fff;
  font-weight: 700;
}

#results ol li.double-digit span.number {
  left: 17px;
  font-size: 13px;
}

#results ol li .distance {
  color: var(--color-text-muted);
  font-size: 12px;
  margin-top: 5px;
  font-weight: 500;
}

#results ol li strong {
  color: var(--color-primary-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

#results ol li span {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

#results ol li .products {
  position: absolute;
  bottom: 8px;
  right: 10px;
}

/* --- Direction Panel --- */

#direction {
  display: none;
  flex: 1 1 35%;
  min-width: 280px;
  padding: 18px;
  overflow-y: auto;
  max-height: 520px;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
}

#direction input.orides-txt {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: border-color 0.2s;
}

#direction input.orides-txt:focus {
  outline: none;
  border-color: var(--color-accent);
}

#direction .get-dir-button {
  margin-top: 12px;
}

#direction .get-dir-button input {
  padding: 8px 20px;
  font-family: 'Inter', sans-serif;
}

#direction table {
  width: 100%;
  border-collapse: collapse;
}

#direction table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

/* --- Info Section --- */

.info-section {
  width: 1100px;
  max-width: 100%;
  margin: 24px auto;
  padding: 36px 40px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  line-height: 1.8;
  color: #5a6577;
}

.info-section h6 {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
}

.info-section a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.info-section a:hover {
  border-bottom-color: var(--color-primary);
}

/* --- Map Info Window / Popup --- */

.maps_popup {
  width: 320px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.maps_popup h1 {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0 0 6px 0;
  padding: 0;
}

.maps_popup h2 {
  font-size: 14px;
  margin: 0 0 6px 0;
  padding: 0;
}

.maps_popup .img {
  float: right;
  padding: 3px;
  border: 1px solid #e0e4e8;
  margin: 0 0 8px 10px;
  background: #fff;
  max-width: 80px;
  height: auto;
}

.maps_popup p {
  margin: 6px 0;
}

/* --- Footer --- */

footer.footer {
  text-align: center;
  padding: 36px 20px;
  margin-top: 24px;
  border-top: none;
  background: var(--color-surface);
  box-shadow: 0 -1px 3px rgba(0,0,0,0.04);
}

footer.footer p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
}

footer.footer .org-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 16px;
}

footer.footer .org-logos a img {
  height: 46px;
  width: auto;
  opacity: 0.5;
  transition: all 0.3s ease;
  filter: grayscale(30%);
}

footer.footer .org-logos a img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.08);
}

/* --- Responsive --- */

@media (max-width: 991px) {
  .finder-content {
    flex-direction: column;
  }

  #map_canvas {
    min-height: 380px;
    flex: 1 1 auto;
  }

  #results {
    flex: 1 1 auto;
    border-left: none;
    border-top: 1px solid var(--color-border);
  }

  #results ol {
    max-height: 320px;
  }

  #direction {
    flex: 1 1 auto;
    border-left: none;
    border-top: 1px solid var(--color-border);
    max-height: 400px;
  }
}

@media (max-width: 576px) {
  .container-fluid {
    padding: 0 12px;
  }

  #header {
    padding: 16px 12px;
    margin-bottom: 12px;
  }

  #header img.logo-img {
    max-height: 75px;
  }

  #clinic-finder-form {
    padding: 18px 16px 16px;
  }

  #clinic-finder-form label {
    font-size: 12px;
  }

  #clinic-finder-form input#address {
    font-size: 15px;
    padding: 10px 12px;
  }

  #clinic-finder-form #edit-submit {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
  }

  #map_canvas {
    min-height: 280px;
  }

  #results h3 {
    padding: 12px 14px;
    font-size: 13px;
  }

  #results ol li {
    padding: 12px 10px 12px 46px;
    font-size: 13px;
  }

  #results ol li strong {
    font-size: 13px;
  }

  .info-section {
    margin: 12px auto;
    padding: 24px 18px;
    font-size: 14px;
  }

  .maps_popup {
    width: 260px;
    font-size: 13px;
  }

  footer.footer {
    padding: 24px 12px;
    margin-top: 12px;
  }

  footer.footer .org-logos {
    gap: 16px;
  }

  footer.footer .org-logos a img {
    height: 36px;
  }
}

/* --- Misc / Overrides --- */

.clear-block::after {
  content: "";
  display: table;
  clear: both;
}

#wrapper2 { display: none; }

.alert-error { }
.flash_good { color: #198754; font-weight: 600; }

/* Google Maps InfoWindow — remove rounded corners */
.gm-style-iw,
.gm-style-iw-c,
.gm-style-iw-d,
.gm-style-iw-t,
.gm-style .gm-style-iw-c,
.gm-style .gm-style-iw-tc,
.gm-style .gm-style-iw-tc::after {
  border-radius: 0 !important;
}

.gm-style-iw-chr button {
  border-radius: 0 !important;
}

/* All images — no rounded corners anywhere */
img,
.maps_popup img,
.maps_popup .img {
  border-radius: 0 !important;
}

/* Google Maps autocomplete dropdown */
.pac-container {
  font-family: 'Inter', sans-serif;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  margin-top: 4px;
  border-radius: 0;
}

.pac-item {
  padding: 8px 14px;
  font-size: 14px;
  border-bottom: 1px solid #f0f2f5;
}

.pac-item:hover {
  background: var(--color-primary-light);
}
