/* Administrace a log */
.admin-controls {
  margin-bottom: 1.5em;
  background: #f7f9fa;
  padding: 1em;
  border-radius: 8px;
}
#admin-controls .btn {
  margin-right: 0.5em;
  margin-bottom: 0.5em;
}
#searchInput {
  margin-right: 0.5em;
  width: 300px;
  font-size: 1.3rem;
}
#statusLog {
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.9rem;
}

/* Karty nemovitostí */

.bg-warning { background-color: #ffc107 !important; }
.bg-danger { background-color: #dc3545 !important; }
.card-body { padding: 1em; }
.list-group-item {
  margin-bottom: 0.2em;
}


/* Autocomplete list */
#nemovitostOptions {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  max-height: 150px;
  overflow-y: auto;
  width: 100%;
  z-index: 10;
}
/* === Karta (Card) === */
.card {
  margin-bottom: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  padding: unset;
  gap: unset;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.card-header {
  padding: 1rem;
  font-weight: bold;
  color: white;
  background-color: #198754; /* default zelená */
}
.card-body {
  padding: 1rem;
}
.text-white { color: #fff; }

/* === Seznam (List Group) === */
.list-group {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-group-item {
  padding: 0.75rem 1rem;
  background-color: #fff;
  border: 1px solid #dee2e6;
  margin-bottom: -1px;
}
.list-group-item:last-child {
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}


/* === Tlačítka === */
.btn {
  display: inline-block;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 4px;
  cursor: pointer;
}
.btn-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}
.btn-outline-primary {
  color: #0d6efd;
  background-color: transparent;
  border-color: #0d6efd;
}
.btn-outline-primary:hover {
  background-color: #0d6efd;
  color: #fff;
}
.btn-primary { background-color: #0d6efd; color: #fff; }
.btn-success { background-color: #198754; color: #fff; }
.btn-info { background-color: #0dcaf0; color: #000; }
.btn-warning { background-color: #ffc107; color: #000; }

/* === Pomocné === */
.mb-4 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }


/* základní stav + zobrazení */
#poplatnikModal[data-modal]{
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  background-color: #60606075;
}
#poplatnikModal.is-open{ display:block; }

/* overlay */
#poplatnikModal .poplatnikModal__overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.45);
  opacity:0;
  transition:opacity .16s ease;
}
#poplatnikModal.is-open .poplatnikModal__overlay{ opacity:1; }

/* dialog wrapper (centrování + animace) */
#poplatnikModal [data-modal-dialog]{
  position: absolute;
  left:50%;
  top:50%;
  transform: translate(-50%,-46%) scale(.98);
  transition: transform .16s ease;
  width: min(900px, 92vw);
  pointer-events: none; /* kliky chytá obsah, ne wrapper */
}
#poplatnikModal.is-open [data-modal-dialog]{
  transform: translate(-50%,-50%) scale(1);
}

/* obsah modalu */
#poplatnikModal .poplatnikModal-content{
  background:#fff;
  color:#111;
  border-radius:12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  display:flex;
  flex-direction:column;
  max-height: 88vh;
  pointer-events: auto; /* reaktivuj kliky uvnitř */
  overflow: hidden;
  padding: 1rem;
}

/* hlavička / patička */
#poplatnikModal .modal-header,
#poplatnikModal .modal-footer{
  padding:14px 18px;
  background:#f8f9fa;
}
#poplatnikModal .modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid #e9ecef;
}
#poplatnikModal .modal-footer{
  gap:10px;
  display:flex;
  justify-content:flex-end;
  border-top:1px solid #e9ecef;
}

/* titulek */
#poplatnikModal .modal-title{
  margin:0;
  font-size:1.05rem;
  font-weight:600;
}

/* close (fallback když není BS) */
#poplatnikModal .btn-close{
  --size: 28px;
  width:var(--size);
  height:var(--size);
  border:0;
  background:none;
  color:#6c757d;
  border-radius:6px;
  position:relative;
  cursor:pointer;
}
#poplatnikModal .btn-close::before,
#poplatnikModal .btn-close::after{
  content:"";
  position:absolute;
  top:50%; left:50%;
  width:14px; height:2px;
  background: currentColor;
  transform-origin: center;
}
#poplatnikModal .btn-close::before{ transform: translate(-50%,-50%) rotate(45deg); }
#poplatnikModal .btn-close::after { transform: translate(-50%,-50%) rotate(-45deg); }
#poplatnikModal .btn-close:hover{ color:#343a40; background:#e9ecef; }

/* tělo modalu (scrolluje jen obsah) */
#poplatnikModal .modal-body{
  padding:18px;
  overflow:auto;
}

/* === Mini grid fallback (když není Bootstrap) === */
#poplatnikModal .row{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}
@media (min-width: 768px){
  #poplatnikModal .row{ grid-template-columns: 1fr 1fr; }
}


/* formulář – decentní UI (fallback pro .form-control/.form-label) */
#poplatnikModal .form-label{
  display:block;
  margin:0 0 6px;
  font-size:.92rem;
  color:#444;
}
#poplatnikModal .form-control{
  width:90%;
  display:block;
  padding:10px 12px;
  border:1px solid #ced4da;
  border-radius:8px;
  background:#fff;
  font-size: .95rem;
  transition: border-color .12s ease, box-shadow .12s ease;
}
#poplatnikModal .form-control:focus{
  outline:0;
  border-color:#0d6efd;
  box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

/* tlačítka (fallback – pokud nemáš BS) */
#poplatnikModal .btn{
  appearance:none;
  border:1px solid transparent;
  border-radius:8px;
  padding:9px 14px;
  font-size:.95rem;
  cursor:pointer;
}
#poplatnikModal .btn-success{
  background:#198754; 
  color:#fff;
}
#poplatnikModal .btn-success:hover{ background:#157347; }
#poplatnikModal .btn-secondary{
  background:#e9ecef; color:#212529; border-color:#ced4da;
}
#poplatnikModal .btn-secondary:hover{ background:#dee2e6; }

/* === Autocomplete (Nemovitost) === */
#poplatnikModal .col-12{ position: relative; } /* ukotvení dropdownu */
#poplatnikModal #nemovitostOptions{
  position:absolute;
  left:0; right:0;
  top: calc(100% + 4px);
  background:#fff;
  border:1px solid #ced4da;
  border-radius:8px;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
  max-height: 220px;
  overflow:auto;
  padding:4px 0;
  z-index: 5;
}
#poplatnikModal #nemovitostOptions .list-group-item{
  list-style:none;
  padding:10px 12px;
  cursor:pointer;
  border:0;
}
#poplatnikModal #nemovitostOptions .list-group-item:hover,
#poplatnikModal #nemovitostOptions .list-group-item:focus{
  background:#f1f3f5;
}

/* přístupnost */
#poplatnikModal .btn:focus-visible,
#poplatnikModal .form-control:focus-visible,
#poplatnikModal #nemovitostOptions .list-group-item:focus-visible{
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}
#nemovitostOptions .is-active { background:#e9ecef; }
#poplatnikModal .poplatnikModal-content { overflow: visible; }
#poplatnikModal .modal-body { overflow: visible; } /* pokud chceš, může zůstat scroll na obsahu, ale pak musí být dropdown uvnitř body */

/* c) samotný dropdown nahoře nad footerem */
#poplatnikModal #nemovitostOptions{
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 4px);   /* default: padá dolů pod input */
  max-height: 240px;
  overflow: auto;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  z-index: 4000;           /* vyšší než footer */
}

/* d) když není místo, přepneme na drop-up */
#poplatnikModal #nemovitostOptions.drop-up{
  top: auto;
  bottom: calc(100% + 4px);
}
/* redukce pohybu */
@media (prefers-reduced-motion: reduce){
  #poplatnikModal .poplatnikModal__overlay,
  #poplatnikModal [data-modal-dialog]{ transition:none !important; }
}

/* volitelně: tmavý režim */
@media (prefers-color-scheme: dark){
  #poplatnikModal .poplatnikModal-content{ background:#1e1f24; color:#e9ecef; }
  #poplatnikModal .modal-header,
  #poplatnikModal .modal-footer{ background:#2a2c33; border-color:#3a3d45; }
  #poplatnikModal .form-control{
    background:#14151a; color:#e9ecef; border-color:#343a40;
  }
  #poplatnikModal #nemovitostOptions{ background:#1e1f24; border-color:#343a40; }
  #poplatnikModal #nemovitostOptions .list-group-item:hover{ background:#2a2c33; }
}
/* === Přehledový Dashboard === */
.odpady-dashboard {

}
.odpady-dashboard__control,
.odpady-dashboard__history {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* === Flex Skupiny === */
.odpady-dashboard__group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* === Tlačítka === */
.btn {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background-color: #0073aa;
  border: none;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn:hover {
  background-color: #005d8f;
}
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
}

/* === Panely s grafy === */
.chart-panel {
  background: #fff;
  border-radius: 8px;
  padding: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.chart-panel.full-width {
  width: 100%;
}

.chart-wrapper {
  max-height: 600px;
  min-height: 500px;
}
.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}
.menuOdpady {
  display: flex;
  justify-content: center;   /* Zarovnání vodorovně na střed */
  flex-wrap: wrap;           /* Zalomí na menších obrazovkách */
  gap: 1rem;                 /* Mezera mezi tlačítky */

}
.searchOdpady {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
}

.searchOdpady input[type="text"] {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  width: 220px;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.searchOdpady input[type="text"]:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
  outline: none;
}

.searchOdpady button {
  padding: 0.6rem 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.menuOdpady button:hover {
  background-color: #005d8f;
}
