/* ────────────────────────────────
   Ogólne
──────────────────────────────── */

/* === Liczby ujemne na czerwono === */
input[type="number"].negative {
    color: red;
    /* background-color: #ffe5e5; */
    transition: background-color 0.3s ease;
}

/* === Tylko duże litery === */
input.uppercase {
  text-transform: uppercase;
}

/* Nadpisanie stylu tylko dla placeholdera */
input.uppercase::placeholder {
  text-transform: none;
}

/* === Znacznik pola wymaganeho === */
.req-corner {
    background-image: url(../img/req2.png);
    background-position: top left;
    background-repeat: no-repeat;
}

/* fade dla tła*/
button {
  transition: background-color 0.3s ease, opacity 0.3s ease;
}


/* fade dla tła*/
input.form-control,
textarea.form-control {
  transition:
    opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hasDatepicker[data-is-open="true"]::placeholder {
  opacity: 0;
}


/* fade na placeholder */
input:focus::placeholder,
input:not(:placeholder-shown)::placeholder {
  opacity: 0;
}

input::placeholder {
  transition: opacity 0.3s ease 0.15s; /* 0.15s opóźnienia */
}

/* ikona zamknięcia alertu - belki z błedem */
.alert .close {
  font-size: 24px;
  color: #ed5565;
  opacity: 0.8;
}
.alert .close:hover {
  opacity: 1;
  color: #c34451;
}

span.disabled-span {
    color: #CCC !important;
    cursor: default !important;
    pointer-events: none !important;
}

/*===========================================================================================================*/


/* ────────────────────────────────
   przyciski
──────────────────────────────── */

@keyframes buttonPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 123, 255, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 10px rgba(0, 123, 255, 0.7); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 123, 255, 0.7); }
}

.button-pulse {
    animation: buttonPulse 0.6s ease-out;
}

/* stała szerokość na ikony na przycisku */
.fa-floppy-o {
  display: inline-block;
  width: 1.0em; /* lub 1.5em, zależnie od projektu */
  text-align: center;
}


/* przyciski do usuwania */
.settlement-delete,
.documentSeries-edit,
.documentSeries-delete,
.accounting-edit,
.accounting-delete,
.actionEdit,
.actionDelete
{
    width: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;    
}


/* przyciski ro rozwijania */
.leaseInvoiceShow,
.patternInvoiceShow,
.settlementMediaShow,
.contractInvoiceShow,
.leaseInvoiceIgnore,
.patternInvoiceIgnore
{
    width: 60px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
/* przyciski ro rozwijania */
.equipmentElementShow,
.leaseBurdenElementsShow,
.analysisEstateDetailsShow {
    width: 70px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
/* przyciski ro rozwijania */
.analysisEstateDocumentsShow {
    width: 90px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

button.btn-gus, /* znajdź w GUS */
button.btn-checkVat, /* sprawdź w vat */
/* button.btn-nrb, */
/* button.btn-white-list, */
button.btn-new-address,
a.btn-new-address,
button.btn-refresh-address {
    margin-top: 23px;
}

/*===========================================================================================================*/

/* ────────────────────────────────
   przyciski operacji w toku
──────────────────────────────── */

/* kropki animowane */
.dots {
  display: inline-block;
  opacity: 0;
  animation: dotFade 1.5s infinite;
}

.dots:nth-child(1) { animation-delay: 0s; }
.dots:nth-child(2) { animation-delay: 0.3s; }
.dots:nth-child(3) { animation-delay: 0.6s; }
.dots:nth-child(4) { animation-delay: 0.9s; }
.dots:nth-child(5) { animation-delay: 1.2s; }

/* dla kropek animowanych */
@keyframes dotFade {
  0%   { opacity: 0; }
  50%  { opacity: 1; }
  100% { opacity: 0; }
}


/*===========================================================================================================*/


/* ────────────────────────────────
   checkbox, radio
──────────────────────────────── */

/* === Animacje === */
@keyframes checkPulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 150, 0, 0.4); }
  50%  { transform: scale(1.2); box-shadow: 0 0 0 2px rgba(0, 150, 0, 0.2); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 150, 0, 0.0); }
}

@keyframes uncheckPulse {
  0%   { box-shadow: 0 0 0 0 rgba(180, 180, 180, 0.3); }
  50%  { box-shadow: 0 0 0 4px rgba(180, 180, 180, 0.15); }
  100% { box-shadow: 0 0 0 0 rgba(180, 180, 180, 0.0); }
}

/* === Hook-triggered animacja === */
input[type="checkbox"].animate-check,
input[type="radio"].animate-check {
  animation: checkPulse 0.3s ease-out;
  transition: box-shadow 0.3s ease-out;
}

/* === Stylizacja readonly === */
input[type="checkbox"][readonly],
input[type="radio"][readonly] {
  pointer-events: none;
  display: inline-block;
}

/* === Semantyczne kolory === */
.checkbox-success input[type="checkbox"]:checked + label::before,
.checkbox-success input[type="radio"]:checked + label::before {
  background-color: #1ab394;
  border-color: #1ab394;
}

.radio-success input[type="radio"]:checked + label::before {
  border-color: #1ab394;
}
.radio-success input[type="radio"]:checked + label::after {
  background-color: #1ab394;
}

/* === Animacje przy kliknięciu użytkownika === */
.checkbox-success input[type="checkbox"]:checked:focus + label::before,
.radio-success input[type="radio"]:checked:focus + label::before {
  animation: checkPulse 0.3s ease-out;
}

input[type="checkbox"]:focus:not(:checked) + label::before {
  animation: uncheckPulse 0.3s ease-out;
}

input[type="radio"]:focus:not(:checked) + label::before {
  animation: uncheckPulse 0.3s ease-out;
}

/* === Marginesy komponentów === */
.checkbox,
.radio {
  margin-top: 5px;
  margin-bottom: 19px;
}

.checkbox-inline,
.radio-inline {
  margin-bottom: 0px;
}

/*===========================================================================================================*/

/* ────────────────────────────────
   BAZOWE STYLOWANIE SELECT2
──────────────────────────────── */
.select2 {
  font-size: 12px !important;
}

.select2-selection {
  outline: none;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.select2-container .select2-selection--single {
  height: 30px !important;
}

.select2-selection .select2-selection__rendered {
  line-height: 30px !important;
  padding-left: 12px !important;
}

ul.select2-selection__rendered li {
  line-height: 20px !important;
}

/* ────────────────────────────────
   STANY INTERAKTYWNE I FOCUS
──────────────────────────────── */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-color: #e7eaec;
  text-align: left !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: #1ab394;
}

/* ────────────────────────────────
   DROPDOWN I WYSZUKIWANIE
──────────────────────────────── */
.select2-dropdown {
  border-color: #e7eaec;
  max-width: none !important;
  white-space: nowrap;
  overflow-x: hidden !important;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.select2-dropdown.select2-dropdown--below,
.select2-dropdown.select2-dropdown--above {
  opacity: 1;
}

.select2-dropdown input:focus {
  outline: none;
}

.select2-container--open .select2-dropdown--below {
  z-index: 9999 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border-color: #e7eaec;
}

.select2-container--default .select2-results > .select2-results__options {
  max-height: 400px;
}

/* ────────────────────────────────
   OPCJE WYNIKÓW I RENDEROWANIE
──────────────────────────────── */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #1ab394;
}

.select2-container--default .select2-results__option[aria-disabled=true] {
  display: none;
}

.select2-results ul li[role=treeitem]:nth-child(2n+1)[aria-selected=false] {
  background-color: #f9f9f9 !important;
  color: #000;
}

.select2-results ul li[role=treeitem]:nth-child(2n+1):hover {
  background-color: #1ab394 !important;
  color: #fff !important;
}

/* ────────────────────────────────
   INTEGRACJA Z UI-SELECT (jeśli używane)
──────────────────────────────── */
.ui-select-container.ui-select-bootstrap .ui-select-choices-row.active > a {
  background-color: #1ab394;
}

/*===========================================================================================================*/

/* ────────────────────────────────
   Tabela
──────────────────────────────── */

/* === Drag & Drop === */
table tbody tr td.order {
  cursor: grab;
}

.table-row-drag-helper {
  background-color: #f9f9f9;
  opacity: 0.9;
}

/* efekt przygaszenia, ze rekord usuwany / jest nanim jakaś operacja*/
.tr-pending {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}


/* ────────────────────────────────
   Pokrycie komórki aby każdy obszar dało się kliknać i zaznaczyć radio/checkbox
──────────────────────────────── */



/*===========================================================================================================*/


/* ────────────────────────────────
   Zwijanie rozwijanie obszarów
──────────────────────────────── */

.glyphicon{
  transition: transform 0.3s ease;
}

.rotate {
  transform: rotate(-180deg);
}

/* .rotate-back {
  transform: rotate(0deg);
} */


/* .rotate {
    transition: transform 0.3s ease;
    transform: rotate(-180deg);
}

.rotate-back {
    transition: transform 0.3s ease;
    transform: rotate(0deg);
} */

.glyphicon-chevron-up:hover,
.glyphicon-chevron-down:hover {
    color: #090;
}

.slide-wrapper {
  overflow: hidden;
}

/*===========================================================================================================*/

/* ────────────────────────────────
   Filtry na listach dokumentów
──────────────────────────────── */

/* pole z inforamcją o wybranym obiekcie */
#estateFilterName,
#customerFilterName {
    display: inline-block;
    width: 150px;    
    background-color: #fff;
    cursor: pointer;
}

/* dodatkowe przyciski na input*/
.action-input-wrapper {
    position: relative;
}

/* grupa dodatkowych przycisków */
.action-input-overlay-buttons {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    display: flex !important;
    flex-direction: row; /* ważne! */
    align-items: center; /* wyśrodkowanie pionowe */
    padding-right: 6px;
    gap: 0px; /* kontrolowany odstęp */
}

.action-input-overlay-buttons button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    width: 24px;
    height: 100%;
    cursor: pointer;
}
.action-input-overlay-buttons .glyphicon {
    font-size: 14px;
    line-height: 1;

    
}
.action-input-overlay-buttons .search-icon:hover {
    color: #1c84c6;
    cursor: pointer;
    transition: color 0.3s ease;
}
.action-input-overlay-buttons .clear-icon:hover {
    color: #d9534f; /* Bootstrapowy czerwony */
    cursor: pointer;
    transition: color 0.3s ease;
}


.filters {
    text-align: right;
    font-size: 12px;
    display: flow-root;
}
.filters div {
    display: inline-block;
    vertical-align: top;
    margin-bottom: 5px;
}
.filters span.lab {
    line-height: 30px;
    margin-right: 5px;
    vertical-align: top;
}


/*===========================================================================================================*/

/* ────────────────────────────────
   Dialogi modalne
──────────────────────────────── */
/* np. coś pomiędzy medium (~600px) a large (~900px) */
@media (min-width: 768px) {
  .modal-mdlg {
    width: 720px; /* wybierz wartość pomiędzy */
  }
}


/*===========================================================================================================*/

/* ────────────────────────────────
   Różne pola
──────────────────────────────── */

.equipmentReccurence .panel-heading {
    font-weight: bold;
    color: #666;
}
.equipmentReccurence .panel-body {
    padding: 15px;
}

/* ────────────────────────────────
   Dashboard
──────────────────────────────── */

.dashboard-widgets .panel {
    border-color: color-mix(in hsl, var(--widget-color) 95%, black);

    /* var(--widget-color); */
}

.dashboard-widgets .panel > .panel-heading {
    background-color: var(--widget-color);
    /* border-color: var(--widget-color); */
    border-color: color-mix(in hsl, var(--widget-color) 95%, black);
    color: var(--widget-text-color, #fff); /* domyślnie biały */
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.grid-stack .panel-heading.movable {
    cursor: move;
}
.grid-stack {
    margin: -10px -5px;
}

/* 1. GridStack item content musi być flex */
.grid-stack-item-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    left: 0px;
    right: 0px;
}

/* 2. Dashboard-widgets też musi przepuszczać wysokość */
.grid-stack-item-content > .dashboard-widgets {
    display: block;
    flex-direction: column;
    height: 100%;
    padding-bottom: 10px;
    /* margin-bottom: 20px; */
    /* margin-top: 5px; */
}

/* 3. Panel musi być flex i mieć 100% */
.grid-stack-item-content .panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-top: 2px;
    margin-left: 5px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* 4. Panel-body ma wypełniać resztę */
.grid-stack-item-content .panel-body.widget-body {
    flex: 1 1 auto;
    overflow: auto;
    
}

.grid-stack-item,
.grid-stack-item-content {
    overflow: hidden !important;
}


/* Uchwyty dolne (S, SE, SW) – podnieś o 5px */
.grid-stack .ui-resizable-s,
.grid-stack .ui-resizable-se,
.grid-stack .ui-resizable-sw {
    bottom: 10px !important;
}

/* usuniecie widgeta - edycja */
.widgetDelete {
  /* color: var(--widget-text-color); */
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.widgetDelete:hover {
    /* color: #000; */
    color: var(--widget-text-color);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

/* zmiana koloru widgeta - edyca */
.widgetColor {
  /* color: var(--widget-text-color); */
  margin-right: 10px;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.widgetColor:hover {
    /* color: #000; */
    color: var(--widget-text-color);
    cursor: pointer;
}

.widget-body::-webkit-scrollbar {
    width: 10px;
    background: transparent;
}
.widget-body::-webkit-scrollbar-thumb {
    background: #ccc;
} 

/* 1. GridStack item content musi być flex */
.grid-stack-item-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    left: 0px;
    right: 0px;
}


.notebookNew {
    position: absolute;
    top: 10px;
    right: 25px;
    z-index: 2;
    padding: 3px 10px;
    color: #333;
    font-size: 12px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 10px;
    
    cursor: pointer;
}
.notebookNew:hover {
    color: #000;
    box-shadow: -1px -1px 10px 1px #fff;
    /* border: 1px solid #000; */
}


span.portalInfoRead,
span.tenantInfoRead,
span.notebookEdit,
span.notebookDelete {
    color: #ccc;
}
span.notebookEdit {
    margin-right: 5px;
}
span.portalInfoRead:hover,
span.tenantInfoRead:hover,
span.notebookEdit:hover,
span.notebookDelete:hover {
    color: #000;
    cursor: pointer;
}

.pNotes,
.pInfos,
.tInfos {
    padding: 5px 10px;
    margin-bottom: 5px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #fcfcfc;
}
.pNotes:hover,
.pInfos:hover,
.tInfos:hover {
    border: 1px solid #ccc;
}

.noteText {
    white-space: pre-line;
}


/* ────────────────────────────────
   Spliter
──────────────────────────────── */

.splitter {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    width: 100% !important;
    min-width: 400px !important;
    border: 1px solid #ccc;    
}

.splitter-pane {
    overflow: auto;
}

.splitter-pane-left {
    min-width: 150px;
    /* max-width: 95%; */
    width: 75%;
}

.splitter-pane-right {
    flex: 1 1 auto;
    min-width: 50px;
    /* width: 25%; */
}

.splitter-gutter {
    width: 7px;
    cursor: col-resize;
    background: #ddd;
    flex: 0 0 auto;
}
.splitter-gutter:hover {
    background: #ccc;
}



