/* Bootstrap - modyfikacje */
:root {
  --bs-success-rgb: 0, 132, 0;
}

@media (min-width: 960px) {
  #offcanvas-container .offcanvas-end {
    width: 860px;
    right: auto;
    left: calc(100% - 860px);
  }
}

@media ((min-width: 540px) and (max-width: 959px)) {
  #offcanvas-container .offcanvas-end {
    width: 480px;
    right: auto;
    left: calc(100% - 480px);
  }
}

@media (max-width: 539px) {
  #offcanvas-container .offcanvas-end {
    width: 100%;
    max-width: 100vw;
    right: auto;
    left: 0;
  }
}

.btn-label {
  position: relative;
  left: -12px;
  display: inline-block;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px 0 0 3px;
}

.btn-labeled {
  padding-top: 0;
  padding-bottom: 0;
}

.with-inside-icon {
 padding-right: 26px;
}

.inside {
  color:  #6c757d;
  position: absolute;
  background: transparent;
  border: none;
  top: 50%;
  right: 45px;
  transform: translateY(-50%);
  z-index: 111;
}

.inside:focus {
  outline: 0px solid var(--bs-focus-ring-color);
  box-shadow: 0 0 0 .15rem var(--bs-focus-ring-color);
}

/* prevent alpine blink efect */
[x-cloak] { display: none !important; }



/* single-select widget */
.single-select-dropdown  {
  width: 100%;
  top: 40px;
  height: 300px;
  overflow-x: hidden;
  overflow-y: scroll;
  display: block;
  --bs-dropdown-zindex: 1000;
  --bs-dropdown-min-width: 10rem;
  --bs-dropdown-padding-x: 0.3rem;
  --bs-dropdown-padding-y: 1.3rem;
  --bs-dropdown-spacer: 0.125rem;
  --bs-dropdown-font-size: 1rem;
  --bs-dropdown-color: var(--bs-body-color);
  --bs-dropdown-bg: var(--bs-body-bg);
  --bs-dropdown-border-color: var(--bs-border-color-translucent);
  --bs-dropdown-border-radius: var(--bs-border-radius);
  --bs-dropdown-border-width: var(--bs-border-width);
  --bs-dropdown-inner-border-radius: calc(var(--bs-border-radius) - var(--bs-border-width));
  --bs-dropdown-divider-bg: var(--bs-border-color-translucent);
  --bs-dropdown-divider-margin-y: 0.5rem;
  --bs-dropdown-box-shadow: var(--bs-box-shadow);
  --bs-dropdown-link-color: var(--bs-body-color);
  --bs-dropdown-link-hover-color: var(--bs-body-color);
  --bs-dropdown-link-hover-bg: var(--bs-tertiary-bg);
  --bs-dropdown-link-active-color: #fff;
  --bs-dropdown-link-active-bg: #0d6efd;
  --bs-dropdown-link-disabled-color: var(--bs-tertiary-color);
  --bs-dropdown-item-padding-x: 1rem;
  --bs-dropdown-item-padding-y: 0.25rem;
  --bs-dropdown-header-color: #6c757d;
  --bs-dropdown-header-padding-x: 1rem;
  --bs-dropdown-header-padding-y: 0.5rem;
  position: absolute;
  z-index: var(--bs-dropdown-zindex);
  min-width: var(--bs-dropdown-min-width);
  padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);
  margin: 0;
  font-size: var(--bs-dropdown-font-size);
  color: var(--bs-dropdown-color);
  text-align: left;
  list-style: none;
  background-color: var(--bs-dropdown-bg);
  background-clip: padding-box;
  border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);
  border-radius: var(--bs-dropdown-border-radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.singe-select-drop-item {
  display: block;
  width: 100%;
  padding: 6px 12px;
  clear: both;
  font-weight: 400;
  color: var(--bs-dropdown-link-color);
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: transparent;
  border: 0;
  font-size: 0.8em;
}

.singe-select-drop-item.active {
  background-color: #0d6efd;
  color: white;
}

.singe-select-drop-item:hover {
  background-color: #6c757d;
  color: white;
  text-decoration: none;
}

.single-select-input {
  border-top-left-radius: var(--bs-border-radius) !important;
  border-bottom-left-radius: var(--bs-border-radius) !important;
  height: 2.4rem !important;
  overflow: clip;
  text-wrap: nowrap;  
}

/* multiselect widget */
.multi-select-container {
  position: relative;
}

.multi-select-box {
  flex-wrap: nowrap;
}

.multi-select-toggle-btn {
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-left: none;
  padding: 0 10px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  padding-top: 13px;
  color: #6c757d;
  font-size: 0.75rem;
  border-top-right-radius: var(--bs-border-radius, 0.25rem);
  border-bottom-right-radius: var(--bs-border-radius, 0.25rem);
}

.multi-select-toggle-btn:hover {
  color: #495057;
}

.multi-select-badges {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 6px;
  align-items: center;
  min-height: 2.4rem;
  height: auto !important;
  cursor: text;
}

.multi-select-badges:focus-within {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.multi-select-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background-color: #0d6efd;
  border-radius: 16px;
  color: white;
  font-size: 0.8rem;
  white-space: nowrap;
}

.multi-select-badge-close {
  margin-left: 5px;
  cursor: pointer;
  font-weight: bold;
}

.multi-select-search {
  border: none;
  outline: none;
  flex-grow: 1;
  min-width: 80px;
  padding: 2px;
  background: transparent;
}

.multi-select-dropdown {
  position: absolute;
  z-index: 1000;
  background: white;
  border: 1px solid #ced4da;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  border-bottom-left-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.multi-select-drop-item {
  display: block;
  width: 100%;
  padding: 6px 12px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #212529;
  background-color: transparent;
  border: 0;
  font-size: 0.8em;
}

.multi-select-drop-item.active {
  background-color: #0d6efd;
  color: white;
}

.multi-select-drop-item:hover {
  background-color: #6c757d;
  color: white;
  text-decoration: none;
}

/* multiselect from checkboxes */
ul.multiselect-checkbox-control {
  display: flex;
  flex-direction: column;
  max-height: 200px;
  overflow-y: auto;
}
.multiselect-checkbox-control li::marker {
  content: "";
}


/* widgets - custom styles */
.widget-date {
  width: 200px;
} 

.widget-input-number {
  width: 130px;
}

/* forms - custom styles */
.form-grup-title {
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 0.3rem;
}

.btn-orange {
  background-color: #ff9500;
  color: #000;
  border-color: #ff9500;
}

.btn-orange:hover {
  background-color: #e68600;
  color: #000;
  border-color: #e68600;
}

.btn-outline-orange {
  color: #955400;
  border-color: #ff9500;
  background-color: rgba(255, 149, 0, 0.1);
}

.btn-outline-orange:hover {
  background-color: #ff9500;
  color: #000;
  border-color: #ff9500;
}

/* Bootstrap 5 outline buttons - subtle background */
.btn-outline-primary {
  background-color: rgba(13, 110, 253, 0.1);
}

.btn-outline-secondary {
  background-color: rgba(108, 117, 125, 0.1);
}

.btn-outline-success {
  background-color: rgba(0, 132, 0, 0.1);
}

.btn-outline-danger {
  background-color: rgba(220, 53, 69, 0.1);
}

.btn-outline-warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #955400;
}

.btn-outline-info {
  background-color: rgba(13, 202, 240, 0.1);
}

.row-hover:hover {
  background-color: rgba(0, 0, 0, 0.032);
}

/* List item (docs/ui.md "Listy"): the same minimum height on every list, like a table row (3rem). Items with a second
   line (e.g. dates) grow naturally; no margins between items - the height and the hover make the rhythm. */
.list-row {
  min-height: 3rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  margin-bottom: 0;
}
.list-row:hover {
  background-color: rgba(0, 0, 0, 0.032);
}
/* Table rows of django-tables2 lists (core/tables2/drabina.html): the same minimum as .list-row. */
.table-container .table > tbody > tr > td {
  height: 3rem;
}