﻿@import url('/common/styles/chosen.css');
@import url('/common/styles/layout.css');
@import url('/common/styles/sidebar.css');
@import url('/common/styles/jquery-ui.css');
@import url('/common/styles/datatables.css');
@import url('/common/styles/handsontable.full.min.css');
@import url('/common/scripts/trumbowyg/ui/trumbowyg.css');
@import url('/common/scripts/trumbowyg/plugins/table/ui/trumbowyg.table.css');
@import url('/common/scripts/trumbowyg/plugins/colors/ui/trumbowyg.colors.min.css');

/* Reset / base */
* { box-sizing: border-box; }

html {
  height: 100vh;
  font-family: var(--font-family);
  font-weight: normal;
  color: var(--default-color);
}

@media screen {
  body {
    background-color: white;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  div.header {
    padding-bottom: 0;
    display: table;
    width: 100%;
    border-spacing: 5px;
    table-layout: fixed;
    background-color: white;
  }
}

@media print {
  body {
    font-size: 70%;
    background-color: white;
    margin: 0;
  }
  div.header { display: none; }
}

form { margin: 0; }

select,
input,
textarea,
div.textarea,
.trumbowyg-editor {
  font-family: var(--font-family) !important;
}

select, input {
  font-size: 1.1em;
  padding: 2px;
}

input {
  color: black;
  background-color: var(--field-bg-color);
}

input::placeholder { opacity: .75; }

gmp-place-autocomplete { height: 1.9em; }

/* Autocomplete – sloučeno */
.ui-autocomplete {
  width: 300px;
  border: 1px solid var(--dark-bg-color);
  background: var(--field-bg-color);
  cursor: default;
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  margin: -6px 6px 6px -6px;
}

.ui-autocomplete .selected { background: #f0f0f0; }
.ui-autocomplete .disabled,
div.autocomplete:disabled {
  color: var(--field-disabled-color);
  background-color: transparent !important;
}

.ui-autocomplete div {
  padding: 2px 5px;
  white-space: nowrap;
}

.ui-autocomplete strong,
a.ui-menu-item-wrapper strong,
li.ui-state-disabled strong {
  font-weight: normal;
  color: #3399FF;
}

/*.ui-menu .ui-menu-item {
  padding:6px 10px;
  cursor:pointer;
  border-bottom:1px solid #eee;
}

  .ui-menu .ui-menu-item:hover {
    background-color: var(--table-hover-bg-color);
  }

.ui-menu .ui-state-active {
  border: initial !important;
  background: initial !important;
}
*/
.ui-menu .ui-menu-item-wrapper {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /*color: var(--field-color);*/
}


.ui-autocomplete-loading {
  background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat;
}

input.defaultText { color: gray; }

.striped input, .striped select {
  border-width: 0;
  margin: 5px;
  background-color: transparent;
}

.striped .toolbar {
  background-color: transparent;
}

.nowrap {
  white-space: nowrap;
}

input[type=radio],
input.radio {
  background-color: transparent !important;
  border: none !important;
  font-weight: bold;
  color: var(--button-text-color);
  padding-right: 10px;
}

input.required,
select.required,
div.required .chosen-choices {
  background-color: var(--field-required-color);
}

textarea,
div.textarea,
.trumbowyg-editor {
  background-color: var(--field-bg-color);
  padding: 3px;
  font-size: 1.1em;
}

input:disabled,
input.disabled,
select:disabled,
textarea:disabled,
div.textarea:disabled,
div.trumbowyg-editor.disabled {
  background-color: transparent !important;
  color: var(--field-disabled-color) !important;
}

input[type=checkbox],
input.checkbox {
  border: none;
  background-color: transparent;
}

label.disabled,
label:disabled { color: var(--field-disabled-color) !important; }

span.readonly {
  font-size: 1.1em;
  color: var(--default-color);
  font-weight: initial;
  background-color: rgba(0, 0, 0, 0.05);
  padding:2px 5px 2px 5px;
  border-radius: 5px;
}

@media screen {
  button,
  input.editor_ok_button,
  .list-control-toolbar-button > label {
    border: 1px solid var(--button-text-color);
    color: var(--button-text-color);
    background-color: var(--button-bg-color);
    border-radius: 5px;
    padding: 1px 7px;
    font-weight: bold;
    font-size: 1em;
    min-width: fit-content;
    cursor: pointer;
    user-select: none;
    font-family: var(--font-family) !important;
    display: inline-flex;
    align-items: center; 
    justify-content: center;
  }

  input.editor_ok_button,
  button.editor_cancel {
    font-size: 1em;
    padding: 2px 0;
    min-width: fit-content;
  }

  /* Ikonová tlačítka – sjednoceno patternem */
  button.search,
  button.edit,
  button.comment,
  button.service,
  button.add,
  .list-control-toolbar-button > label.add,
  button.filter,
  .list-control-toolbar-button > label.filter,
  button.delete,
  button.new,
  button.print,
  button.save,
  button.close,
  button.back,
  button.send,
  button.pdf,
  button.excel,
  button.confirm {
    padding-left: 25px;
    background-repeat: no-repeat;
    background-position: 5px center;
  }
  button.search { background-image: url(/images/buttons/search.png); }
  button.edit { background-image: url(/images/buttons/edit.png); }
  button.comment { background-image: url(/images/buttons/comment.png); }
  button.service { background-image: url(/images/buttons/service.png); }
  button.add,
  .list-control-toolbar-button > label.add { background-image: url(/images/buttons/add.png); }
  button.filter,
  .list-control-toolbar-button > label.filter {
    background-image: url(/images/buttons/filter.svg);
    background-size: 14px 14px;
  }
  button.delete { background-image: url(/images/buttons/delete.png); }
  button.new { background-image: url(/images/buttons/new.png); }
  button.print { background-image: url(/images/buttons/print.png); }
  button.save { background-image: url(/images/buttons/save.png); }
  button.close { background-image: url(/images/buttons/close.png); }
  button.back { background-image: url(/images/buttons/back.png); }
  button.info { background-image: url(/images/buttons/info.png); }
  button.send { background-image: url(/images/buttons/send.png); }
  button.pdf { background-image: url(/images/buttons/pdf.png); }
  button.excel { background-image: url(/images/buttons/excel.png); }
  button.confirm { background-image: url(/images/buttons/confirm.png); }
    button > svg.button-inline-icon,
    .list-control-toolbar-button > label > svg.button-inline-icon {
      position: absolute;
      left: 6px;
      top: 50%;
      transform: translateY(-50%);
      width: 1em;
      height: 1em;
      fill: currentColor;
      pointer-events: none;
    }

  svg.button-inline-icon use {
    transform-origin: 0px 0px;
  }

    button:disabled > svg.button-inline-icon,
    button.disabled > svg.button-inline-icon,
    .list-control-toolbar-button > label.disabled > svg.button-inline-icon {
      opacity: .6;
    }

  button:disabled {
    color: var(--field-disabled-color) !important;
    cursor: default;
    border-color: var(--field-disabled-color);
  }

  .icon-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: auto;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    color: white;
    background-color: rgb(from var(--dark-bg-color) r g b / 0.85);
    cursor: pointer;
    flex: 0 0 2em;
    margin-left: 2px;
    position: relative;
  }

    .icon-action-button:hover {
      filter: brightness(1.2);
    }

    .icon-action-button svg {
      width: 1em;
      height: 1em;
      display: block;
      fill: currentColor;
      pointer-events: none;
      display: block;
    }

  .icon-action-button-new {
    background-color: darkgreen;
  }

  .icon-action-button:disabled,
  .icon-action-button.disabled,
  .icon-action-button[aria-disabled=true] {
    opacity: .6;
    cursor: default;
  }
}

#tooltip {
  padding: 3px;
  background: #f9f9f9;
  border: 1px solid #eee;
  text-align: left;
  font-size: smaller;
}

/* List / files */
.list-container {
  padding-bottom: 3px;
  display: flex;
  flex-flow: row wrap;
  min-height: 10px;
}

.list-file-container {
  display: flex;
  flex-flow: row nowrap;
  max-width: 300px;
  overflow: hidden;
  margin: 2px;
}

.list-file-container input {
  display: inline-flex;
  align-self: center;
}

.list-file {
  display: flex;
  flex: 1 1 auto;
  flex-flow: row nowrap;
  column-gap: 2px;
  background-color: transparent;
  padding: 0.2em;
  min-height: 2em;
  border-radius: 15px;
  border: 1px var(--dark-bg-color) solid;
  max-width: 280px;
}

.list-file.expired { text-decoration: line-through; }

  .list-file:hover a,
  .list-file-container input:checked ~ .list-file a,
  .list-file:hover svg { 
    color: var(--dark-bg-text-color); 
  }
  .list-file:hover .icon-action-button {
    background-color: rgba(255, 255, 255, 0.3);
  }

.list-file svg {
  flex-shrink: 0;
  align-self: center;
  margin: 0 2px 0 3px;
}



  .list-file > a,
  .list-file > a:active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: normal;
    flex: 1 1 auto;
    white-space: nowrap;
    display: flex;
    min-width: 0;
    color: var(--default-color);
  }

.list-file .words-at-beginning {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.list-file .last-word {
  flex-shrink: 0;
  margin-left: 2px;
}

.list-file > span.relation { white-space: nowrap; margin-left: 3px; }
.list-file img { flex: 0 0 auto; align-self: center; margin-left: 3px; }

.list-control-toolbar { margin-top: 5px; }
.list-control-toolbar-button { display: inline-block; }
.list-control-toolbar button,
.list-control-toolbar label {
  margin-right: 5px;
  font-size: 12px;
}

.upload-hover {
  border: 5px dashed gray !important;
  cursor: copy !important;
}

svg[class^="icon-"],
svg[class*=" icon-"] {
  display: inline-block;
  width: 1em;
  height: auto;
  stroke: currentColor;
  fill: currentColor;
}

/* Ikony souborů – beze změny funkce */
a.icon-file-excel::before { content: url(/images/Excel.gif); margin: 0 3px; }
a.icon-file-word::before { content: url(/images/word.gif); margin: 0 3px; }
a.icon-file-txt::before { content: url(/images/txt.png); margin: 0 3px; }
a.icon-file-pdf::before { content: url(/images/adobe.gif); margin: 0 3px; }
a.icon-file-jpg::before { content: url(/images/jpg.png); margin: 0 3px; }
a.icon-file-html::before { content: url(/images/htm.png); margin: 0 3px; }
a.icon-file-url::before { content: url(/images/hyperlink.png); margin: 0 3px; }
a.icon-file-empty::before,
a.icon-file-libreoffice::before { content: url(/images/unknown.png); margin: 0 3px; }

@media print { 
  button { display: none; }
  div.dataTables_filter { display: none; }
}

@media screen {
  .two-lines {
    text-overflow: ellipsis;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

.ellipsis {
  text-overflow: ellipsis;
  overflow: hidden;
}

table { border: none; }

td {
  font-size: 1em;
  color: var(--default-color);
}

/* Sdílené styly pro ajax & striped tabulky */
table.ajax,
table.striped { border-collapse: separate; border-spacing: 0; }

table.ajax thead td,
table.striped thead td,
tr.thead td,
tr.thead th,
.thead > div {
  font-weight: bold;
  font-size: .95em;
  color: var(--dark-bg-text-color);
  padding: 2px;
  vertical-align: middle;
}

table.ajax thead a,
table.striped thead a,
tr.thead a,
.thead a {
  color: var(--dark-bg-text-color);
  text-decoration: none !important;
}

table.ajax thead input,
table.striped thead input,
.thead input { vertical-align: middle; }

table.ajax tfoot tr,
table.striped tfoot tr,
.tfoot > div { background-color: var(--dark-bg-color); }

table.ajax tfoot td,
table.striped tfoot td {
  vertical-align: text-bottom;
  font-weight: bold;
  color: var(--dark-bg-text-color);
}

/* Alternující řádky */
table.ajax > tbody > tr:nth-child(even),
table.striped > tbody > tr:nth-child(even),
div.striped > :nth-child(even) { background: var(--table-even-bg-color); }

table.ajax > tbody > tr:nth-child(odd),
table.striped > tbody > tr:nth-child(odd) > td,
div.striped > :nth-child(odd) { background: var(--table-odd-bg-color); }

table.ajax tr.selected td,
table.striped tr.selected td {
  background: var(--table-selected-bg-color) !important;
  /* PŮVODNÍ: color: var(--table-selected-bg-color); -> neviditelný text */
  color: var(--dark-bg-text-color); /* Doporučení – změna barvy může ovlivnit vzhled, ne layout */
}

table.ajax tr.selected a,
table.striped tr.selected a { color: var(--dark-bg-text-color); }

table.ajax .resize-handle-active,
table.striped .resize-handle-active { cursor: e-resize; }

table.ajax .sortcol,
table.striped .sortcol {
  cursor: pointer;
  padding-right: 20px;
  background-repeat: no-repeat;
  background-position: right center;
  user-select: none;
}

table.ajax .sortasc,
table.striped .sortasc,
table.ajax .sortdesc,
table.striped .sortdesc {
  background-color: #B9DDFF;
  color: #494646;
}

table.ajax .sortasc { background-image: url('/images/tablekit/descending.gif'); }
table.ajax .sortdesc { background-image: url('/images/tablekit/ascending.gif'); }
table.striped .sortasc { background-image: url('/images/tablekit/descending.gif'); }
table.striped .sortdesc { background-image: url('/images/tablekit/ascending.gif'); }

table.ajax .nosort,
table.striped .nosort { cursor: default; }

table.selectable tbody td {
  cursor: pointer;
  user-select: none;
}

table.display.scroll-y { table-layout: fixed; }

table.dataTable.display.select-single > tbody > tr:hover > * {
  cursor: pointer;
}

/* doplnění important */
table.dataTable.order-column > tbody tr > .sorting_1, table.dataTable.order-column > tbody tr > .sorting_2, table.dataTable.order-column > tbody tr > .sorting_3, table.dataTable.display > tbody tr > .sorting_1, table.dataTable.display > tbody tr > .sorting_2, table.dataTable.display > tbody tr > .sorting_3 {
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.019) !important;
}

@media screen {
  table.ajax td,
  table.striped td,
  div.striped > div {
    border-top: 1px solid #c4d0df !important;
    border-right: 1px solid white;
    border-bottom: 1px solid white;
    border-left: 1px solid white;
    vertical-align: top;
  }

  table.ajax tr.hover td,
  table.striped tr.hover td,
  table.striped tbody > tr:hover td, table.display tbody > tr:hover td {
    background: var(--table-hover-bg-color) !important;
    color: var(--table-hover-color) !important;
  }
}

@media print {
  tr { page-break-inside: avoid; }
  table.ajax td,
  table.striped td,
  div.striped div {
    border-right: 1px dotted gray;
    border-bottom: 1px dotted gray;
    border-left: none;
    border-top: none;
    padding: 1px;
  }
  table.ajax tr.hover td,
  table.striped tr.hover td,
  table.striped tbody > tr:hover td {
    background: inherit !important;
    color: inherit !important;
  }
}

table tr.expired td {
  color: gray;
  text-decoration: line-through;
}

table .toolbar {
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  padding: 0 !important;
  user-select: none;
}

  table .toolbar button.icon-action-button {
    width: 2em;
    height: 2em;  
  }

a,
td a { color: var(--default-color); }

div.edit,
table.edit {
  background-color: #f6f9fc;
}

div.edit {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  border-bottom: 2px solid white;
}

.input-wrapper { 
  display: contents 
}

.display-flex {
  display: flex;
  gap: 5px;
  align-items: center;
}
  .display-flex > span.readonly:empty {
    display: none !important;
  }
  .display-flex > input,
  .display-flex > textarea,
  .display-flex > span.readonly,
  .display-flex .input-wrapper {
    flex: 1 1 auto;
    max-width: 100%;
    min-width: 0;
  }
  .display-flex select {
    flex: 1 1 auto;
    white-space: nowrap;
    max-width: 100%;
  }
  .display-flex svg:not(:is(.trumbowyg-box svg, .trumbowyg-modal svg, svg.button-inline-icon)) {
    flex: 0 0 auto; /* SVG se nezvětšuje */
    width: auto; /* šířka podle obsahu */
    height: auto;
    min-width: 0; /* zabrání přetékání */
  }
table.edit {
  table-layout: fixed;
  width: 100%;
}

table.edit > tbody > tr > td { border-bottom: 1px solid white; }

div.edit > div:nth-child(1),
div.label {
  flex: 1 0 150px;
  font-size: .9em;
}

table.edit > tbody > tr > td:nth-child(1)[colspan] { background-color: initial; }

table.edit > tbody > tr > td:nth-child(1) {
  width: 150px;
  font-size: .9em;
  border: 0;
}

div.edit > div:nth-child(1) > label,
table.edit > tbody > tr > td:nth-child(1) > label,
div.file > label {
  display: flex;
  padding: 2px 0 0 2px;
}

div.edit > div:nth-child(2n) {
  flex: 5 1 700px;
  padding: 4px;
  min-width:0;
}

div.edit > div:nth-child(2n) p,
div.edit > div:nth-child(2n) ol,
div.edit > div:nth-child(2n) ul {
  margin: 0 0 .2em 0;
}

div.edit > div:nth-child(2n) p:last-child { margin: 0; }

div.edit div:nth-child(2n) input[type=checkbox],
div.edit div:nth-child(2n) input[type=radio],
table.edit > tbody > tr > td:nth-child(2n) input[type=checkbox],
table.edit > tbody > tr > td:nth-child(2n) input[type=radio] { width: initial; }

div.file {
  float: left;
  width: 250px;
  margin: 3px;
  background-color: #D3D8DE;
}

div.file table td { border: none; }

h1 {
  margin: 0;
  font-weight: bold;
  font-size: 1.3em;
  font-style: italic;
  letter-spacing: 2pt;
  padding: 0;
}

h2 {
  font-weight: bold;
  margin: 0;
  padding: 0 0 2px;
}

h3 {
  font-size: 1em;
  margin: 0;
  padding: 0 0 2px;
}

label {
  font-weight: bold;
  font-size: 1em;
}

.flag {
  display: inline-block;
  width: fit-content;
  padding: 0 5px;
  margin: 0 2px 0 0;
  background-color: var(--form-text-color);
  color: var(--form-bg-color);
  border-radius: 5px;
  font-size: .9em;
  white-space: nowrap;
}

a:link,
.link {
  cursor: pointer;
  user-select: none;
}

.detail {
  font-size: 1em;
  color: black;
  background-color: #d1dce6;
}

fieldset {
  border: 1px solid var(--dark-bg-color);
  margin-bottom: 10px;
}

legend {
  padding: 0 5px;
  color: var(--dark-bg-color);
  font-weight: bold;
}

ul {
  margin: 2px 0;
  padding: 0;
}

ul > li {
  list-style: circle outside;
  margin: 0 0 0 15px;
}

ul.dtr-details li { list-style: none; }

.projectTypeStyle { display: table-cell; font-weight: normal; text-align: left; }

@media screen {
  .projectTypeStyle b {
    font-weight: 900;
    color: white;
    background-color: navy;
  }
}

@media print {
  .projectTypeStyle b { text-decoration: underline; }
}

.projectTypeStyle i { font-weight: normal; }

/* Tabs */
.tab-container {
  margin: .5em 0 0;
  border: none !important;
}

.tab-container .tabs {
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: none;
  background: none;
}

.tab-container .tabs li {
  float: left;
  height: 25px;
  line-height: 23px;
  padding: 0 .5em;
  background: var(--tab-inactive-bg-color);
  margin-right: 2px;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.tab-container .tabs li img {
  position: relative;
  top: 3px;
  margin-right: 5px;
  float: left;
}

.tab-container .tabs li a {
  font-size: .9em;
  color: var(--tab-text-color);
  text-decoration: none;
  padding: 0 !important;
}

.tab-container .tabs li a:hover { text-decoration: underline; }

.tab-container .tabs li.current,
.tab-container .ui-tabs-active {
  font-weight: bold;
  background: var(--tab-bg-color) !important;
  border: 2px solid var(--tab-inactive-border-color);
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  border-bottom-width: 0;
}

.tab-container .tabs li.current a,
.tab-container .ui-tabs-active a {
  color: var(--tab-text-color) !important;
  text-decoration: none !important;
}

.tab-container .ui-tabs-red:not(.ui-tabs-active) {
  background-color: #a75757 !important;
}

.tab-container .ui-tabs-red:not(.ui-tabs-active) a {
  color: white !important;
}

.tab-container .tab {
  padding: 1em;
  border: 2px solid var(--tab-border-color);
  border-top-width: 0;
  background: var(--tab-bg-color);
}

.tab-container .loading { color: red; }
.tab-container .empty {
  padding: 1em;
  text-align: center;
  font-style: italic;
}

.tab-container .tab-navigation {
  text-align: right;
  padding-top: .5em;
  background: none !important;
  border: none !important;
}

.tab-container .tab-navigation a {
  color: var(--tab-text-color);
  padding: 0 .5em;
}

/* TableKit */
input.editor_ok_button {
  width: 23px;
  margin: 0 2px;
}

button.editor_cancel { width: 30px; }

form.tableKitForm { margin: 0; }

/* Dialogy */
.ui-dialog-custom-title { border: none; font-weight: bold; }
.ui-dialog-custom-no-close { display: none; }

.ui-dialog-content iframe {
  border: none;
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
}

/* Animace – zredukováno na potřebné prefixy */
@-webkit-keyframes blink {
  0% { opacity: 1; }
  50% { opacity: .5; }
  100% { opacity: 1; }
}
@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: .5; }
  100% { opacity: 1; }
}

@-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.overlay {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  inset: 0;
  background: #f6f9fc;
  opacity: .9;
  cursor: pointer;
  user-select: none;
}

.overlay div {
  border: 5px solid #f3f3f3;
  animation: spin 1s linear infinite;
  border-top: 5px solid #555;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  align-self: center;
}

div.progress {
  position: absolute;
  left: 10px;
  top: 10px;
  height: 25px;
  background-color: grey;
  color: white;
  font-weight: bold;
  padding: 5px;
  visibility: visible;
  vertical-align: middle;
  text-align: left;
  z-index: 102;
}

/* Kontextové menu */
#control_contextmenu {
  border: 1px solid #666;
  background-color: #eee;
  min-width: 150px;
}

#control_contextmenu ul { padding: 0; margin: 0; }

#control_contextmenu ul li {
  list-style: none;
  padding: 3px 10px 3px 5px;
  margin: 0;
  cursor: pointer;
  border: 1px solid #999;
  border-top-color: #fff;
  border-left-color: #fff;
}

#control_contextmenu ul li.selected,
#control_contextmenu ul li:hover { cursor: pointer; }

#control_contextmenu ul li.selected:hover {
  color: #333;
  background-color: #eee;
}

#control_contextmenu ul li.disabled,
#control_contextmenu ul li:hover.disabled {
  background-color: #eee;
  color: #999 !important;
}

/* Trumbowyg */
.trumbowyg-box {
  border: 1px solid var(--dark-bg-color);
  min-height: initial;
}

.trumbowyg-button-pane { display: none; }

.trumbowyg-editor[placeholder]:empty:not(:focus)::before {
  content: attr(placeholder);
  color: #999;
  pointer-events: none;
  white-space: break-spaces;
}

.trumbowyg-editor p { margin: 0 0 2px !important; }
.trumbowyg-editor p:last-child { margin: 0 !important; }

:root {
  --tbw-cell-vertical-padding: 4px;
  --tbw-cell-horizontal-padding: 8px;
  --tbw-cell-line-height: 1.5em;
}

.trumbowyg-editor table { margin-bottom: var(--tbw-cell-line-height); }

.trumbowyg-editor th,
.trumbowyg-editor td {
  height: calc(var(--tbw-cell-vertical-padding) * 2 + var(--tbw-cell-line-height));
  min-width: calc(var(--tbw-cell-horizontal-padding) * 2);
  padding: var(--tbw-cell-vertical-padding) var(--tbw-cell-horizontal-padding);
  border: 1px solid #e7eaec;
}

/* Handsontable */
table.htCore.striped td {
  border-right: 1px solid #ccc;
  border-bottom: inherit;
  border-left: inherit;
}

.custom-tooltip {
  position: fixed;
  z-index: 9999;
  background: #333;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 1em;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  max-width: 300px;
  display: none;
  white-space: pre-line;
}

@media screen {
  table.htCore td.highlight-error { background-color: #FFCCCC !important; }

  table.htCore.showEditable tbody td:not(.htDimmed) { position: relative; }

  table.htCore.showEditable tbody td:not(.htDimmed)::before {
    background: #808080;
    content: "";
    position: absolute;
    inset: 0;
    opacity: .2;
  }
}


details {
  margin: 5px 0 5px 0;
}

details summary, .summary {
  cursor: pointer;
  background-color: var(--dark-bg-color);
  color: var(--dark-bg-text-color);
  padding: 5px;
}

table.sheet-table.compact thead th,
table.sheet-table.compact thead td,
table.sheet-table.compact tfoot th,
table.sheet-table.compact tfoot td,
table.sheet-table.compact tbody th,
table.sheet-table.compact tbody td,
table.sheet-table.dataTable.compact thead th,
table.sheet-table.dataTable.compact thead td,
table.sheet-table.dataTable.compact tfoot th,
table.sheet-table.dataTable.compact tfoot td,
table.sheet-table.dataTable.compact tbody th,
table.sheet-table.dataTable.compact tbody td {
  padding: 1px;
}

.sheet-cell-input,
.sheet-cell-textarea,
.sheet-cell-select,
.sheet-bulk-edit-input,
.sheet-bulk-edit-textarea,
.sheet-bulk-edit-select {
  box-sizing: border-box;
  width: 100%;
  /* border: none;*/
  background: transparent;
}


.sheet-cell-input[data-type="int"],
.sheet-cell-input[data-type="intgezero"],
.sheet-cell-input[data-type="intgtzero"],
.sheet-cell-input[data-type="float"],
.sheet-cell-input[data-type="floatgtzero"],
.sheet-cell-input[data-type="floatgezero"],
.sheet-bulk-edit-input[data-type="int"],
.sheet-bulk-edit-input[data-type="intgezero"],
.sheet-bulk-edit-input[data-type="intgtzero"],
.sheet-bulk-edit-input[data-type="float"],
.sheet-bulk-edit-input[data-type="floatgtzero"],
.sheet-bulk-edit-input[data-type="floatgezero"] {
  text-align: right;
}

.sheet-cell-textarea,
.sheet-bulk-edit-textarea {
  min-height: 60px;
  resize: vertical;
}

.sheet-cell-mena {
  white-space: nowrap;
  font-size: 0.9em;
  color: var(--default-color);
}

.sheet-position {
  text-align: center;
}

.sheet-summary-cell {
  text-align: right !important;
  font-weight: bold;  
}


.sheet-cell.toolbar {
  white-space: nowrap;
}

.sheet-actions {
  width: 1%;
  white-space: nowrap;
}


.display-flex .input-wrapper {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
}

  .display-flex .input-wrapper input,
  .display-flex .input-wrapper span {
    white-space: nowrap;
  }

.sheet-table .input-wrapper {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
}

  .sheet-table .input-wrapper > input {
    flex: 1 1 auto;
    min-width: 0;
  }

.sheet-table .sheet-cell-mena {
  flex: 0 0 auto;
  padding-left: 2px;
  white-space: nowrap;
}

.sheet-table td {
  overflow: visible !important;
  padding: 2px !important;
}
/* redukce horní a spodní mezery na dt */
div.dt-container div.dt-layout-row:not(:has(> .dt-layout-cell:not(:empty))) {
  display: none;
}
