/* ===== ZÁKLAD ===== */

body {
  margin: 0;
  padding: 40px 20px;
  background: #f1f5f9;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.6;
  color: #1f2937;
}

body > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

h1 {
  margin-top: 20px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}

h2 {
  font-weight: 600;
}

#subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ===== KALENDÁŘ ===== */

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 2px;
  border-radius: 12px;
}

.day-header {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  color: #64748b;
  padding: 6px 0;
}

.day-cell {
  background: white;
  border-radius: 10px;
  min-height: 95px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.day-number {
  font-weight: 600;
  font-size: 0.9rem;
}

.day-cell.today {
  background: #8bcc81;
}

/* ===== ŠTÍTKY ODPADU ===== */

.collection {
  display: block;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: normal;
  margin-top: 6px;
  border-radius: 4px;
  padding: 4px 10px;

  font-size: 0.75rem;
  font-weight: 500;
}

.collection.bio {
  background: #7c3f00;
  color: white;
}

.collection.generic {
  background: #111827;
  color: white;
}

.collection.plastics {
  background: #fde047;
  color: #111;
}

.collection.paper {
  background: #2563eb;
  color: white;
}

.collection.override {
  opacity: 0.8;
  border-left: 3px solid rgba(0,0,0,0.4);
}

/* ===== OVLÁDÁNÍ ===== */

#controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 20px auto 30px auto;
  padding: 12px 16px;
  background: white;
  border-radius: 12px;
}

#date-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

#location-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* sjednocení výšky */
#date-picker button,
#monthSelect,
#yearSelect,
#locationSearch {
  height: 42px;
}

/* šipky */
#date-picker button {
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 16px;
}

#date-picker button:hover {
  background: #e5e7eb;
}

/* selecty */
select,
input {
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

/* input šířka */
#locationSearch {
  min-width: 180px;
  width: 220px;
}

/* tlačítko Všechny lokace */
#resetFilter {
  white-space: nowrap;
}

/* ===== DROPDOWN ===== */

.dropdown {
  position: relative;
}

.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  background: #fff;
  z-index: 10;
  display: none;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.dropdown-options div {
  padding: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.dropdown-options div:hover {
  background: #f3f4f6;
}

/* ===== TLAČÍTKA ===== */

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;

  padding: 0 14px;
  min-height: 38px;

  background: #2563eb;
  color: white;
  border-radius: 8px;
  font-size: 0.9rem;

  cursor: pointer;
  user-select: none;
  text-align: center;
  transition: 0.15s ease;
}

.button:hover {
  background: #1d4ed8;
}

#footerControls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

#calendarPrint,
#calendarDownloads {
    display: flex;
    gap: 10px;
}
/* ===== SEO FALLBACK ===== */

#seoFallback {
  display: block;
}

.js #seoFallback {
  display: none;
}

/* ===== RELATED + DISCLAIMER ===== */

.related-streets {
  text-align: center;
  margin-top: 40px;
  font-size: 0.85rem;
  color: #9ca3af;
}

.related-streets a {
  color: #6b7280;
  text-decoration: none;
}

.related-streets a:hover {
  text-decoration: underline;
}

.disclaimer {
  text-align: center;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 20px;
}

/* ===== HOMEPAGE LIST ===== */

#locationList, #introText {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 10px;
  font-size: 0.9em;
}

#locationList ul {
  column-width: 160px;
  column-gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}

#locationList li {
  margin-bottom: 6px;
}

#locationList a {
  text-decoration: none;
  color: inherit;
}

#locationList a:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 800px) {

  body {
    padding: 4px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .day-cell {
    min-height: 70px;
    padding: 6px;
  }

  .collection {
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.65rem;
  }

  #controls {
    flex-direction: column;
    background: transparent;
    padding: 0;
    gap: 14px;
  }

  #date-picker {
    display: grid;
    grid-template-columns: 38px 1fr auto 38px;
    gap: 8px;
  }


  #location-picker {
    display: flex;
    width: 100%;
    gap: 8px;
  }

  #locationSearch {
    flex: 1;          /* zabere všechen volný prostor */
    min-width: 0;     /* KRITICKÉ pro správné zmenšování */
    width: auto;      /* zruší pevnou šířku 220px */
  }

  #resetFilter {
    flex-shrink: 0;   /* tlačítko se nebude mačkat */
  }

  #footerControls {
    flex-direction: column;
    gap: 14px;
  }

  #calendarPrint {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  #calendarDownloads {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  #calendarDownloads .button {
    width: 100%;
    box-sizing: border-box;
  }

}
