.nav-tabs .nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem;
}

#form-dish .nav-tabs .nav-link {
  width: 160px;
  border-color: transparent silver;
}

#form-dish .nav-tabs .nav-link.active,
#form-dish .nav-tabs .nav-link:hover {
  text-decoration: underline;
  background-color: white;
}

#form-dish .nav-tabs .ui-switch {
  margin: 0;
}

body .form-group {
  margin-bottom: 0.5rem;
}

/* form-switch wo bootstrap */
.ui-form-switch {
  display: block;
  margin: 0 auto;
  width: 40px;
  height: 20px;
  position: relative;
}

.ui-form-switch .form-check-input {
  width: 0;
  height: 0;
  opacity: 0;
}

.ui-form-switch .form-check-label {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ccc;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.ui-form-switch .form-check-label::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.ui-form-switch .form-check-input:checked + .form-check-label {
  background-color: #4caf50;
}

.ui-form-switch .form-check-input:checked + .form-check-label::before {
  transform: translateX(20px);
}

.form-control.datepicker {
  width: 7em;
}

/* boxed table */
main {
  display: flex;
  flex-direction: column;
  padding: 1em;
  align-items: center;
}

/* Планшети та мобільні до 1024px) */
@media screen and (max-width: 1024px) {}

/* Десктопи (1025px і більше) */
@media screen and (min-width: 1025px) {}

.table-wrapper {
  max-width: 100%;
  background: linear-gradient(to right, white 30%, rgba(255, 255, 255, 0)),
              linear-gradient(to right, rgba(255, 255, 255, 0), white 70%) 0 100%,
              radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)),
              radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)) 0 100%;
  background-repeat: no-repeat;
  background-size: 60px 100%, 60px 100%, 28px 100%, 28px 100%;
  background-position: 0 0, 100%, 0 0, 100%;
  background-attachment: local, local, scroll, scroll;
}

.pb-250 {
  padding-bottom: 250px;
}

table.boxed {
  width: 100%;
  background-color: white;
}

table.boxed tr.deleted td {
  background-color: #ddd;
}

table.boxed tr.deleted td:not(.flex-btns) {
  text-decoration: line-through;
}

table.boxed th {
  background-color: gainsboro;
  white-space: nowrap;
  cursor: pointer;
}

table.boxed th,
table.boxed td {
  text-align: center;
  padding: 0.2em;
}

table.boxed tr.group-item {
  background-color: lightgray;
  font-weight: bold;
}

table.boxed tr.group-item td {
  text-align: left;
  font-size: large;
}

table.boxed.pointer tr.selected {
  background-color: #28a745;
  font-weight: 500;
  color: white;
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.2), 
              inset -1px 0 0 rgba(255,255,255,0.2), 
              0 0 4px 0 rgba(95,99,104,.6), 
              0 0 6px 2px rgba(95,99,104,.6);
}

table.boxed.smaller input {
  max-width: 100%;
  font-size: small;
  padding: 0.15rem;
  height: 24px;
}

table.boxed td[onclick] {
  cursor: pointer;
}

table.boxed td.text > span.x-large {
  margin: 0 0.25rem;
}

table.boxed .form-control.is-valid,
table.boxed .was-validated .form-control:valid {
  background-position: right calc(0.1em + 0.2rem) center;
}

table.boxed:not(.smaller) tr td:last-child:not(:first-child),
table.boxed:not(.smaller) thead tr th:last-child:not(:first-child) {
  white-space: nowrap;
}

table.boxed:not(.smaller) tr td:last-child:not(:first-child) button,
table.boxed:not(.smaller) thead tr th:last-child:not(:first-child) button {
  padding: 0 5px;
}

.hidden {
  display: none;
}

.bold {
  font-weight: bold;
}

.center {
  text-align: center;
}

.flash-msg {
  color: crimson;
}

input.table-check-input {
  -ms-transform: scale(1.5);
  -moz-transform: scale(1.5);
  -webkit-transform: scale(1.5);
  -o-transform: scale(1.5);
  transform: scale(1.5);
  padding: 10px;
  cursor: pointer;
  margin: 0 8px;
}

.flex-row {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 0 -16px;
}

.col-25,
.col-50,
.col-75 {
  padding: 0 16px;
}

.col-50 {
  -ms-flex: 50%;
  flex: 50%;
}

.col-25 {
  -ms-flex: 25%;
  flex: 25%;
}

.col-75 {
  -ms-flex: 75%;
  flex: 75%;
}

.flex-row input[type='text'] {
  width: 100%;
  margin-bottom: 20px;
  padding: 12px;
}

div.p-0-35[class*='col-'] {
  padding: 0 35px;
}

.absolute {
  position: absolute;
}

#fd-tehnology {
  min-height: 11em;
  background-color: white;
}

#fd-tehnology,
#fd-dish_source {
  font-size: small;
}

#fieldContainer-fond_relation .form-group {
  max-width: 485px;
}

/* inline form */
.simple-form-inline {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  border: 1px solid #eee;
  background-color: white;
  padding: 10px;
}

.simple-form-inline:not(:first-child) {
  margin-top: 5px;
}

.simple-form-inline textarea {
  min-height: 4rem;
  width: 100% !important;
  min-width: auto;
  max-width: unset;
}

.simple-form-inline label {
  margin: 2px 10px 2px 0;
  min-width: auto;
}

.simple-form-inline input {
  vertical-align: middle;
  margin: 2px 10px 2px 0;
  padding: 2px;
  background-color: #fff;
  border: 1px solid #ddd;
}

.simple-form-inline button {
  padding: 10px 20px;
  background-color: dodgerblue;
  border: 1px solid #ddd;
  color: white;
  cursor: pointer;
}

.simple-form-inline button:hover {
  background-color: royalblue;
}

@media (max-width: 800px) {
  .simple-form-inline input {
    margin: 10px 0;
  }
  .simple-form-inline {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 850px) {
  table.table-sm {
    font-size: small;
    padding: 0.15rem;
  }
  .flex-row {
    flex-direction: column-reverse;
  }
  .custom-select,
  .form-control {
    max-width: 100%;
  }
  #table_products th {
    white-space: unset;
  }
  .table-wrapper.fixed {
    height: 100%;
  }
  table.boxed th {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
  }
  table.boxed.smaller {
    font-size: smaller;
  }
  table.boxed.smaller th,
  table.boxed.smaller td {
    text-align: center;
    padding: 0.1em;
  }
  table.boxed th,
  table.boxed td {
    padding: 0.2em;
  }
}

form button[type='submit'] {
    margin: 0.5rem;
  }
  
  form .checkbox-editor {
    padding-left: 10.5rem;
  }
  
  form .checkbox,
  form .checkbox label,
  form .checkbox input {
    cursor: pointer;
  }
  
  form .checkbox label {
    padding-left: 6px;
  }
  
  form .checkbox label:hover {
    color: #28a745;
  }
  
  form .checkbox input {
    width: 1.2rem;
    height: 1.2rem;
    vertical-align: middle;
  }
  
  form textarea {
    width: 100%;
    min-height: 5rem;
  }
  
  form fieldset legend {
    margin: 0 0 0 0.5rem;
    font-size: 1rem;
    font-style: italic;
  }
  
  form fieldset.collapse legend {
    cursor: pointer;
  }
  
  form fieldset.collapse legend:hover {
    text-decoration: underline;
    color: #28a745;
  }
  
  form fieldset.collapse legend::after {
    width: 0;
    height: 0;
    font-size: 0;
    line-height: 0;
    content: '';
    transition: all linear 0.2s;
    display: inline-block;
    top: 50%;
    margin-left: 3px;
    border-right: 6px solid #28a745;
    border-left: 6px dashed transparent;
    border-bottom: 6px solid transparent;
    border-top: 6px solid transparent;
  }
  
  form fieldset.collapse legend.open::after {
    border-top: 6px solid #28a745;
    border-left: 6px dashed transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid transparent;
  }
  
  form fieldset.parentFieldset select.custom-select {
    padding-left: 0.5rem;
  }
  
  form .fieldType-buttons {
    display: flex;
  }
  
  form .fieldType-buttons .options div.option {
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    padding: 3px 8px;
    margin-right: 10px;
    border-radius: 4px;
  }
  
  form .fieldType-buttons .options div.option span.title {
    color: #28a745;
  }
  
  form .fieldType-buttons .options div.option span.value {
    display: none;
  }
  
  form .fieldType-buttons .options .option.selected {
    background: #28a745;
    color: white;
  }
  
  form .fieldType-buttons .options .option.selected span.title {
    color: white;
  }
  
  .form-group label {
    margin: 0 0.5rem 0 0;
    min-width: 11rem;
    padding: 3px 0;
  }
  
  .form-group .form-control {
    display: inline;
  }
  
  .custom-select,
  .form-control {
    max-width: 20rem;
  }
  
  @media (max-width: 599px) {
    form .form-group .form-control,
    form .form-group .custom-select {
      max-width: 100%;
      font-size: small;
      padding: 0.125rem 0.375rem;
    }
    form .checkbox-editor {
      padding-left: 0;
    }
  }
  
  .insert_btn:hover {
    cursor: pointer;
  }
  
  .user-form-container {
    padding: 0.3em;
  }