/* Styling dla pól rozwijanych (select) */

/* Ikona strzałki dla pól select */
.form-group label i.fas.fa-chevron-down {
    font-size: 0.8em;
    margin-left: 5px;
    opacity: 0.7;
}

/* Dodatkowe style dla pól select */
select.form-control,
select.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Hover effect dla pól select */
select.form-control:hover,
select.form-select:hover {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Focus effect dla pól select */
select.form-control:focus,
select.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Styling dla label z ikoną */
.form-group label:has(.fa-chevron-down) {
    position: relative;
}

/* Tooltip dla ikon */
[title="Pole rozwijane"] {
    cursor: help;
}

/* Ujednolicenie rozmiaru checkboxów */
.checkbox-group input[type="checkbox"],
.form-group input[type="checkbox"],
.form-check input[type="checkbox"],
input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    accent-color: #1a365d;
    margin-top: 2px;
    flex-shrink: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid #1a365d;
    border-radius: 4px;
    background-color: white;
    position: relative;
}

/* Stylowanie checkboxa po zaznaczeniu */
.checkbox-group input[type="checkbox"]:checked,
.form-group input[type="checkbox"]:checked,
.form-check input[type="checkbox"]:checked,
input[type="checkbox"]:checked {
    background-color: #1a365d;
    border-color: #1a365d;
}

/* Dodanie znacznika check po zaznaczeniu */
.checkbox-group input[type="checkbox"]:checked::after,
.form-group input[type="checkbox"]:checked::after,
.form-check input[type="checkbox"]:checked::after,
input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

/* Hover effect dla checkboxów */
.checkbox-group input[type="checkbox"]:hover,
.form-group input[type="checkbox"]:hover,
.form-check input[type="checkbox"]:hover,
input[type="checkbox"]:hover {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Poprawa widoczności checkboxów w panelu administracyjnym */
.form-check input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    border: 3px solid #1a365d !important;
    border-radius: 6px !important;
    background-color: white !important;
    position: relative !important;
    margin-top: 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
}

/* Stylowanie checkboxa po zaznaczeniu w panelu admin */
.form-check input[type="checkbox"]:checked {
    background-color: #1a365d !important;
    border-color: #1a365d !important;
}

/* Dodanie znacznika check po zaznaczeniu w panelu admin */
.form-check input[type="checkbox"]:checked::after {
    content: "✓" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

/* Hover effect dla checkboxów w panelu admin */
.form-check input[type="checkbox"]:hover {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    transform: scale(1.05) !important;
    transition: all 0.2s ease !important;
}

/* Focus effect dla checkboxów w panelu admin */
.form-check input[type="checkbox"]:focus {
    border-color: #0d6efd !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Poprawa stylowania labeli w panelu admin */
.form-check-label {
    font-weight: 500 !important;
    cursor: pointer !important;
    margin-left: 8px !important;
    line-height: 1.4 !important;
}

/* Layout dla checkboxów - pełna szerokość kolumny */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    align-items: flex-start;
}

/* Specjalne stylowanie dla checkboxów w zgódach - bez flex-wrap */
.checkbox-group:not(.checkbox-grid) {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 10px;
    align-items: flex-start;
}

/* Layout dla dni uczestnictwa i posiłków - pełna szerokość kolumny */
.checkbox-group .checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    margin-bottom: 8px;
}

/* Specjalne stylowanie dla checkboxów z checkbox-item (dni uczestnictwa, posiłki) */
.checkbox-group.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.checkbox-group.checkbox-grid .checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

/* Responsywny layout dla checkboxów */
@media (min-width: 768px) {
    .checkbox-group.checkbox-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-top: 10px;
    }

    .checkbox-group.checkbox-grid .checkbox-item {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 0;
    }
}

@media (max-width: 767px) {
    .checkbox-group.checkbox-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .checkbox-group.checkbox-grid .checkbox-item {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin-bottom: 0;
    }
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #1a365d;
    margin-top: 2px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-group label.required::after {
    content: " *";
    color: #b20015;
    font-weight: bold;
}

/* Granatowe kolory nagłówków pól */
label,
.form-label {
    color: #1a365d !important;
    font-weight: 600 !important;
}

/* Specjalne stylowanie dla wymaganych pól */
label.required::after {
    content: " *";
    color: #b20015;
    font-weight: bold;
}

/* Granatowe kolory dla nagłówków sekcji */
.form-group>label:not(.form-check-label):not([for]),
h5,
h6 {
    color: #1a365d !important;
    font-weight: 700 !important;
}

/* Granatowe kolory dla nagłówków w panelu administracyjnym */
.card-header h5,
.card-header .mb-0 {
    color: white !important;
    font-weight: 700 !important;
}

h2 {
    color: #1a365d !important;
    font-weight: 700 !important;
}

/* Biały kolor dla nagłówków na granatowym tle */
h2[style*="color: white"],
.card h2[style*="color: white"] {
    color: white !important;
}

/* Granatowe kolory dla nagłówków formularzy */
.mb-3 label,
.form-label {
    color: #1a365d !important;
    font-weight: 600 !important;
}

/* Granatowe kolory dla nagłówków sekcji bez for */
.form-group label:not([for]) {
    color: #1a365d !important;
    font-weight: 700 !important;
    font-size: 1.1em !important;
}

/* Dodatkowe stylowanie dla lepszej widoczności */
label:not(.form-check-label) {
    text-shadow: 0 1px 2px rgba(26, 54, 93, 0.1) !important;
}

/* Granatowe kolory dla nagłówków w różnych kontekstach */
.form-section h4,
.form-section h5,
.section-title {
    color: #1a365d !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #1a365d !important;
    padding-bottom: 5px !important;
    margin-bottom: 15px !important;
}

/* Responsywność dla ikon */
@media (max-width: 768px) {
    .form-group label i.fas.fa-chevron-down {
        font-size: 0.7em;
        margin-left: 3px;
    }
}