/* Select2 Image Styles */
.select2-container .select2-selection--single .select2-selection__rendered img,
.select2-results__option img {
    width: 25px;
    height: auto;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
}
.select2-container .select2-selection--single {
    height: auto !important;
    padding-top: 5px;
    padding-bottom: 5px;
}
.select2-container.select2-container--open .select2-dropdown--below, .select2-container .select2-dropdown {
top:0% !important; 
}
.select2-container .select2-selection--single .select2-selection__clear {
    cursor: pointer;
    float: left;
    font-weight: bold;
    height: 26px;
    margin-right: 4px;
    padding-right: 0px;
    top: 6px;
    position: relative;
}
.select2-results__option {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}
.select2-container .select-option-price {
    color: #777;
    margin-left: 5px;
    font-size: 0.9em;
}
#szerokosc.select2-hidden-accessible,
#end_type.select2-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Addon Checkbox Styles */
.dqpbw-addons-wrapper {
    margin-top: 32px;
}
.dqpbw-addons-wrapper h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1em;
    color: var(--body);
}

.dqpbw-addon-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #f0f0f0;
}
.dqpbw-addon-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.dqpbw-addon-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
}
.dqpbw-addon-option input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.1);
}
.dqpbw-addon-option img {
    width: 30px;
    height: auto;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 2px;
}
.dqpbw-addon-option .addon-name {
    flex-grow: 1;
    vertical-align: middle;
}
.dqpbw-addon-option .addon-price {
    margin-left: 10px;
    color: #555;
    font-size: 0.9em;
    white-space: nowrap;
}

/* File Upload Styles */
.dqpbw-file-upload-wrapper {
    margin-top: 32px;
}
.dqpbw-file-upload-wrapper h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--body);
}
.dqpbw-dropzone {
    display: block;
    border: 2px dashed var(--primary);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background-color: var(--light);
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    border-radius: 5px;
}
.dqpbw-dropzone:hover {
    border-color: var(--main);
    background-color: #ffdbdc;
}
.dqpbw-dropzone.drag-over {
    /* Styl podczas przeciągania pliku nad strefę */
    border-color: var(--main);
    background-color: #ffdbdc;
}
.dqpbw-dropzone .dqpbw-dropzone-text {
    color: #555;
}
.dqpbw-dropzone .dqpbw-browse-button {
    color: var(--main);
    text-decoration: underline;
    font-weight: bold;
}
/* Usunięto styl dla .dqpbw-file-preview, bo go nie ma */
/* Usunięto styl dla .dqpbw-file-preview #dqpbw-file-name */
/* Usunięto styl dla .dqpbw-remove-file (globalny), bo jest w liście */

.dqpbw-file-preview-list {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}
.dqpbw-file-preview-list li {
    background-color: var(--light);
    border: 1px solid var(--primary);
    padding: 5px 10px;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.dqpbw-file-preview-list .dqpbw-file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
    flex-grow: 1;
}
.dqpbw-file-preview-list .dqpbw-remove-file {
    background: none;
    border: none;
    color: #a00;
    font-size: 1.4em; /* Trochę mniejszy w liście */
    line-height: 1;
    cursor: pointer;
    padding: 0 3px;
    flex-shrink: 0; /* Zapobiegaj zmniejszaniu przycisku */
}
.dqpbw-file-preview-list-wrapper {
    margin-top: 15px; /* Dodaj odstęp nad listą plików */
}
.dqpbw-dropzone.limit-reached {
    background-color: #f8f8f8; /* Lekko wyszarz tło */
    border-color: #e0e0e0; /* Wyszarz ramkę */
    cursor: not-allowed; /* Zmień kursor */
    opacity: 0.7; /* Lekko przygaś */
}
/* Opcjonalnie: Zablokuj hover effect po osiągnięciu limitu */
.dqpbw-dropzone.limit-reached:hover {
    border-color: #e0e0e0;
    background-color: #f8f8f8;
}

/* Realization Mode Styles */
.dqpbw-realization-mode-wrapper h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--body);
}
.dqpbw-modes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.dqpbw-mode-option {
    position: relative; /* Kontener dla radio i label */
}
.dqpbw-mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.dqpbw-mode-option label {
    display: block;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
    text-align: center;
    min-width: 120px; /* Minimalna szerokość kafelka */
}
.dqpbw-mode-option label strong {
    display: block;
    font-size: 1em;
    margin-bottom: 3px;
}
.dqpbw-mode-option label .mode-desc {
    font-size: 0.9em;
    color: #555;
}

/* Styl dla zaznaczonego kafelka */
.dqpbw-mode-option input[type="radio"]:checked + label {
    border-color: var(--primary); /* Kolor WordPressa */
    background-color: var(--light); /* Lekkie tło */
    box-shadow: 0 0 5px var(--primary);
}
/* Styl dla najechania myszką */
.dqpbw-mode-option label:hover {
    border-color: var(--primary);
}
.dqpbw-mode-option input[type="radio"]:checked + label:hover {
    border-color: var(--primary); /* Zachowaj kolor zaznaczenia przy hover */
}

/* Total Price Display */
#total-price-wrapper {
    font-size: 1.2em;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
#total-price-display {
    color: #c00;
}

/* Price Table Styles */
.dqpbw-price-table-wrapper {
 
    clear: both;
}
.dqpbw-price-table-wrapper h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--body);
}
.dqpbw-price-table {
    width: auto;
    border-collapse: collapse;
    min-width: 250px;
    width: 100%;
}
.dqpbw-price-table tr:nth-child(even) {
    background-color: #fff;
}
.dqpbw-price-table tr:nth-child(odd) {
    background-color: var(--light);
}
.dqpbw-price-table th,
.dqpbw-price-table td {
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
}
.dqpbw-price-table th {
    background-color: var(--primary);
    font-weight: bold;
}
.dqpbw-price-table td.price-cell {
    text-align: right;
    font-weight: bold;
    white-space: nowrap;
}

/*--- !M ---*/
@media only screen and (max-width: 768px) {
    .dqpbw-price-table-wrapper {
        display: none !important;
    }
}

.dqpbw-admin-section-header {
    cursor: pointer;
    padding: 8px 12px;
    background: #f9f9f9; /* Lighter background */
    border: 1px solid #e5e5e5;
    margin: 15px 0 0 0; /* More margin top */
    border-radius: 3px;
    position: relative;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}
.dqpbw-admin-section-header:hover {
    background: #f1f1f1;
}
.dqpbw-admin-section-header .toggle-indicator {
    float: right;
    font-size: 18px;
    line-height: inherit;
    color: #555;
}
.dqpbw-admin-section-content {
    /* display: none; /* Initial state set in PHP */
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-top: none;
    background: #fff;
    margin: 0 0 10px 0; /* Margin bottom only */
    border-radius: 0 0 3px 3px;
}
/* Remove extra padding/borders from inner groups if needed */
.dqpbw-admin-section-content .options_group {
    border: none;
    padding: 0;
    margin: 0;
}
/* Remove redundant inner H3 if you commented them out in PHP */
.dqpbw-admin-section-content .options_group > h3 {
    display: none;
}
.dqpbw-admin-section-content h4 {
    /* Adjust sub-headings inside */
    margin-top: 0;
    padding-top: 0;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
	    background-color: var(--primary) !important;
    color: white;
}