body,
div,
h1,
h2,
h3,
h4,
h5,
h6,
p,
table,
th,
td {
  margin: 0;
  padding: 0;
  border: 0;
}

i {
  margin: 5px;
}

hr {
  border-top: none;
  border-bottom: 1px solid var(--color-5);
  border-right: 1px solid var(--color-5);
}

.hamburger-icon {
  cursor: pointer;
  font-size: 24px;
  color: var(--color-4);
}

a {
  text-decoration: none;
}

body {
  font-family: system-ui, sans-serif;
  background-color: var(--color-3);
  color: var(--color-4);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 12px;
  overflow-x: auto;
  box-sizing: border-box;
}

header {
  background-color: #cc5220;
  color: #fff;
  padding: 10px 0;
  text-align: center;
}

header h1 {
  font-size: 24px;
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  padding: 12px;
  border-radius: 8px;
  margin-top: 8px;
}

table th {
  background-color: var(--color-0);
  position: sticky;
  top: 0;
  z-index: 1;
  
}

table th,
table td {
  text-align: center;
  padding-right: 6px;
}
table tr {
  border-bottom: 1px solid var(--color-0);
}
table tr:hover {
  background-color: var(--color-2);
}

table th {
  font-weight: bold;
}
.sticky-cell {
  background-color: var(--color-0);
}
.clickable {
  color: var(--color-0);
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  justify-content: center;
}

.clickable a {
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  justify-content: center;
  transition: 0.3s ease-in-out;
}

.clickable a:hover {
  color: var(--color-6);
}


.delete a {
  text-align: center;
  text-decoration: none;
  color: #ff300c;
  font-weight: bold;
  justify-content: center;
  transition: 0.3s ease-in-out;
}

.delete a:hover {
  color: #fc6e55;
}

.edit a {
  text-align: center;
  text-decoration: none;
  color: #FF9800;
  font-weight: bold;
  justify-content: center;
  transition: 0.3s ease-in-out;
}

.popup-button {
  position: fixed;
  top: 70px;
  left: 96%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background-color: var(--color-7);
  color: var(--color-0);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  z-index: 2;
}
button.captured::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff99;
    pointer-events: none;
    border-radius: inherit;
}
button.captured {
    position: relative;
    cursor: not-allowed !important;
}
.edit a:hover {
  color: #ffb74c;
}
.delete {
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  justify-content: center;
}

.detail-section {
  background-color: var(--color-5);
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-image: linear-gradient(to bottom, #f4f4f4, #fff);
}

.form-section {
  background-color: var(--color-1);
  padding: 20px;
  border: none;
  border-radius: 8px;
  display: block;
  margin-left: 6px;
  margin-right: 6px;
}

.form-label {
  display: block;
  font-weight: bold;

}
select {
  outline: none;
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: auto; /* Nastavte velikost podle potřeby */
  background-color: var(--color-4);
  color: var(--color-0);
  text-align: center;
  padding: 3px;
  border-radius: 8px;
  position: absolute;
  right: 110%; /* Tooltip vlevo od ikonky */
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

textarea[disabled], input[disabled], select[disabled] {
  background-color: var(--color-1);
  cursor: not-allowed;
  position: relative;
}
input[type="radio"] {
  margin-top: 10px;
  margin-bottom: 10px;
}
.form-input,
.form-textarea {
  width: 500px;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: var(--color-0);
  color: var(--color-4);
  margin-top: 10px; 
  margin-bottom: 10px;
  box-sizing: border-box;
  outline: none; /* Odstraní defaultní outline */
}
/* Základní styl pro všechny požadované prvky */
input[required], 
textarea[required], 
select[required] {
    border: 1px solid #ffffff00; /* Normální ohraničení všech stran */
    border-left-width: 2px; /* Levý okraj je o něco širší */
    border-left-color: #ff300c; /* Levý okraj je červený */
    outline: none; /* Odstraní defaultní outline */
}



.form-textarea {
  resize: vertical;
}

.message-banner {
  display: none;
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
  margin-left: 16px;
  margin-right: 16px;
  z-index: 1000;
  font-family: system-ui, sans-serif;
  transition: opacity 0.5s;
  box-sizing: border-box;
  cursor: pointer;
}

.message-banner.show {
  display: block;
}

.error {
  background-color: #ff300c;
  color: white;
}

.success {
  background-color: #4CAF50;
  color: white;
}

.form-submit {
  padding: 8px 16px;
  background-color: #0075ff;
  color: #fafafa;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.form-submit:hover {
  background-color: #0058bd;
}

table-like .completed-column {
  text-decoration: line-through;
}

.navbar-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: bold;
}

.navbar-buttons a {
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid var(--color-4);
  border-radius: 8px;
  transition: background-color 0.3s, border-color 0.3s;
}

.hamburger-icon {
  display: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--color-4);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: #ffffff;
}

.navbar-buttons a:hover {
  color: var(--color-0);
  background-color: var(--color-4);
  border-radius: 8px;
}


.hamburger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 9999;
}

.navbar-dropdown {
  display: none;
  background-color: var(--color-0);
  position: absolute;
  top: 100%;
  right: 0;
  box-shadow: 0px 8px 16px 0px var(--color-0);
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  z-index: 999;
  font-weight: bold;
}

.navbar-dropdown a {
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  color: var(--color-4);
  font-size: 16px;
  font-weight: bold;
}

.navbar-dropdown a.active {
  background-color: var(--color-4);
  color: var(--color-1);
  border-radius: 8px;
}

.navbar-dropdown a:hover {
  background-color: var(--color-4);
  color: var(--color-1);
  border-radius: 8px;
}

.red {
  color: #ff300c;
}

.green {
  color: #4CAF50;
}
.white {
  color: #ffffff;
}
.results-container {
  display: flex;
  overflow-x: auto;
}

.result {
  border: 1px solid var(--color-0);
  padding: 10px;
  margin: 5px 5px 5px 0px;
  border-radius: 8px;
  white-space: pre-wrap;
}

.form-submit {
  margin-top: 5px;
  margin-right: 2px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  white-space: inherit;
}

.form-submit[disabled] {
  background-color: #0075ff;
  cursor: not-allowed;
  position: relative;
}

.form-submit[disabled]::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff99;
  pointer-events: none;
  border-radius: 8px;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #00000080;
  backdrop-filter: blur(5px);
  display: none;
  z-index: 999;
}

#overlay.visible {
  display: block;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  max-width: 100%;
  height: 80%;
  background-color: white;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: var(--color-1);
}

.popup-header .title {
  font-size: 16px;
  font-weight: bold;
}

.popup-header .close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.popup-content {
  flex-grow: 1;
}

.popup-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

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

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: var(--invert-filter); 
}

@media (max-width: 768px) {
  .popup-button {
    left: 89%;
  }


  header h1 {
    font-size: 20px;
  }

  .container {
    padding: 10px;
  }

  .button-center {
    display: flex;
    justify-content: center;
  }

  .detail-section {
    padding: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    background-image: linear-gradient(to bottom, #f4f4f4, #fff);
  }

  .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .hamburger-icon {
    display: block;
  }

  .navbar-title {
    text-align: left;
    margin-right: 50px;
  }

  .navbar-buttons {
    display: none;
  }

  .navbar-toggle {
    display: block;
  }

  .navbar-buttons a {
    width: 100%;
    text-align: center;
    border: none;
    padding: 10px;
  }

  .navbar-dropdown {
    display: none;
    background-color: var(--color-1);
    position: absolute;
    top: 100%;
    right: 0;
  }

  .navbar-dropdown.active {
    display: block;
  }

  .navbar.active .navbar-buttons {
    display: flex;
  }

  .navbar.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  .navbar.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .navbar.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .form-input,
  .form-textarea {
    width: 100%;
  }

  .popup {
    width: 95%;
    height: 90%;
  }
}
/* === Sortable tables (upravené) === */
table thead th.sortable-th {
  cursor: pointer;
  user-select: none;
  position: sticky;
  color: inherit;
  padding-right: 50px;   /* rezerva, aby se text netlačil na šipku */
}

table thead th .sort-indicator {
  position: absolute;
  right: 8px;            /* odsazení od pravého okraje */
  top: 50%;
  transform: translateY(-50%);
  font-size: .9em;
  color: var(--color-4);           /* šipky bílé */
  opacity: .8;
  pointer-events: none;  /* klik funguje na celý th, ne na ikonu */
}

/* Defaultní neutrální šipka */
table thead th .sort-indicator::after {
  content: "⇅";
}

/* Aktivní směr */
table thead th.sorted-asc  .sort-indicator::after { content: "▲"; }
table thead th.sorted-desc .sort-indicator::after { content: "▼"; }
