/* =========================================================
   CRM_FORMS.CSS – FORMULARZE I PRZYCISKI (MIGRACJA)
   Zakres: Inputy, Selecty, Przyciski, Checkboxy, Select2
   ========================================================= */

/* =========================
   1. FORM CONTROL – PODSTAWA
   (Przywrócona wysokość 2.5em z legacy)
========================= */
.form-control {
    border-radius: 0.3rem !important; /* Twoje precyzyjne zaokrąglenie */
    font-size: .74rem !important;    /* Spójne z body */
    background-color: #f9f9f9 !important;
    border: 1px solid #ced4da;
    height: calc(2.5em + 0.75rem + 2px)  ; /* Wysokość z kosztorysanta */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:hover {
    border-color: #b1b1b1;
    background-color: #ffffff !important;
}

.form-control:focus {
    border-color: #007e8c;
    box-shadow: 0 0 0 0.2rem rgba(0, 126, 140, 0.15);
    background-color: #ffffff !important;
}

/* Specyficzny wariant "none" z Twojego pliku */
.form-none {
    background-color: transparent !important;
    border: 0px !important;
}

.form-none:focus {
    box-shadow: none !important;
}

/* =========================
   2. ETYKIETY (LABEL)
========================= */
.form-control-label {
    border-radius: 0.3rem !important;
    font-size: .74rem !important;
    background-color: #ffffff;
    border: 1px solid #ced4da;
    height: calc(2.5em + 0.75rem + 2px) !important;
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    margin-bottom: 0;
}

.labelColorGray {
    background-color: #e0e0e0 !important;
    padding: 12px !important;
    border: 1px solid #ced4da;
}

.labelColorGrayPytanie {
    background-color: #e0e0e0 !important;
    padding: 13px !important;
    border: 1px solid #ced4da;
}

.labelGlowna {
    font-weight: 600;
    font-size: 1.2rem !important;
    color: #000000 !important;
}

.label-checkbox {
  font-weight: normal;
}


.labelColorGray {
  background-color: #e0e0e0;
  padding: 12px !important;
  border: 1px solid #ced4da;
}
.labelWidth100 {
  display: block;
}
/* =========================
   3. PRZYCISKI (BUTTONS)
========================= */
.btn {
    font-size: .74rem;
    border-radius: 0.3rem;
    padding: 0.45rem 1rem;
    transition: all 0.2s;
    margin-right: 0.2rem;
}

.btnOperacje {
    padding: 7px 10px 7px 10px !important;
}

.btn-width {
    width: 8rem !important;
}

.btn-link-tooltip {
    font-size: .80rem !important;
    font-weight: bold;
    background: transparent;
    padding: 0 0 0 5px !important;
    border: 0;
    color: #007e8c;
}

/* Usuwa ramkę i cień po kliknięciu w przycisk menu operacji */
.btn-menu:focus,
.btn-menu:active,
.btn-menu.active {
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important; /* Opcjonalne: zapobiega zmianie tła */
}

.btn-success {
    background-color: #007e8c !important; /* Zielony EDPO */
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 6px !important;
    /*font-weight: 600 !important;*/
    text-decoration: none !important;
    font-size: 0.8rem !important;
    transition: background 0.2s ease !important;
 
}

.btn-success:hover {
    background-color: #1d5959 !important;
}
 
.btn-link {
  font-weight: 400;
  color: #0061E0;
  text-decoration: none;
}

.bg-info {
  background-color: #17a2b8 !important;
}

.btn-primary  {
    background-color: transparent !important;
    color: #007e8c !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    border: 1px solid #007e8c !important;
    transition: all 0.2s ease !important;
    margin:10px; 
}

.btn-primary:hover {
    background-color: rgba(0, 126, 140, 0.05) !important;
    color: #ff8b05 !important; /* Pomarańczowy akcent przy hover */
    border-color: #ff8b05 !important;
}

/* Styl dla pól tylko do odczytu */
input[readonly],
textarea[readonly],
input[readonly="readonly"],
textarea[readonly="readonly"] {
    background-color: #e9ecef !important;
    cursor: not-allowed; /* Dodatkowy sygnał UX: kursor "zakazu" */
    border-color: #dee2e6; /* Subtelne obramowanie pasujące do tła */
    color: #495057; /* Nieco ciemniejszy tekst dla lepszej czytelności */
}

/* Opcjonalnie: usuń efekt focus dla pól readonly, by nie sugerować możliwości edycji */
input[readonly]:focus,
textarea[readonly]:focus {
    box-shadow: none !important;
    border-color: #dee2e6 !important;
}

/* Blokada zmiany tła przy najechaniu myszką (hover) */
input[readonly]:hover,
textarea[readonly]:hover {
    background-color: #e9ecef !important;
}

/* Blokada zmiany tła i ramki przy kliknięciu (focus) */
input[readonly]:focus,
textarea[readonly]:focus {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* =========================
   4. CHECKBOXY I PRZEŁĄCZNIKI
========================= */
input[type="checkbox"],
input[type="radio"] {
    width: 1rem !important;
    height: 1rem !important;
    cursor: pointer;
}

input[type="radio"], input[type="checkbox"] {
    width: 1.03rem !important;
    height: 1.03rem !important;
    min-width: 1.03rem !important; /* Gwarantuje, że nie zejdzie poniżej tej szerokości */
    min-height: 1.03rem !important;
    flex-shrink: 0 !important;      /* Kluczowe: zabrania przeglądarce ściskania inputa */
    margin-right: 8px;              /* Nieco większy odstęp poprawi UX przy łamaniu tekstu */
    cursor: pointer;
    align-self: flex-start;         /* Opcjonalnie: checkbox zostanie u góry, gdy tekst ma wiele linii */
    margin-top: 2px;                /* Korekta wyrównania do pierwszej linii tekstu */
}

.checkbox-style {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px; 
}

/* Customowy Switch Slider z kosztorysanta */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5px;
    background-color: #006168;
    transition: .2s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 5px;
    width: 6px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .2s;
}

input:checked + .slider {
    background-color: #ff0000; /* Red z Twojego oryginału */
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* =========================
   5. SELECT2 & DROPDOWNS
========================= */
.select2-container--default .select2-selection--single {
    background-color: #f9f9f9 !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.3rem !important;
    height: calc(2.5em + 0.75rem + 2px) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(2.5em + 0.75rem);
    font-size: .74rem;
}

.dropdown-divider {
    border: 0px !important;
    height: 1px;
    background-color: #e9ecef;
}

/* =========================
   6. SPECJALNE (WAGA / TESTY)
========================= */
.form-waga {
    border-radius: 0.3rem !important;
    font-size: 1.5rem !important;
    background-color: transparent !important;
    color: #495057;
    border: 0px !important;
    height: auto !important;
    font-weight: bold;
}

.testZaliczony {
    background-color: #e6ffe6 !important;
}
.testNieZaliczony {
    background-color: #fff2e6 !important;
}
.fontTest {
    font-size: .80rem !important;
}

