/* Plik: kombinasjoner.css */
/* ZAKTUALIZOWANO 2025-11-11 (Szprosy Zagnieżdżone Krok 1): */
/* 1. Dodano style dla nowego, ukrytego panelu opcji szprosów zagnieżdżonych. */
/* 2. Dodano styl dla podświetlenia zaznaczonego pola szprosu (.glass-field-selection). */
/* 3. Dodano styl dla "strzałki" wskazującej pole z zagnieżdżonymi szprosami (.nested-sprosser-arrow). */
/* 4. Dodano styl dla "hitboxa" pola szprosu (.glass-field-hitbox). */
/* ZAKTUALIZOWANO 2025-11-11 (POPRAWKA PDF): */
/* 1. Ukryto czerwoną ramkę zaznaczenia (.glass-field-selection) w trybie eksportu PDF. */

#kombinasjoner-designer-content {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

#kombinasjoner-container {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

#kombinasjoner-canvas-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    overflow: hidden;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
    cursor: grab;
}

#kombinasjoner-canvas-wrapper:active {
    cursor: grabbing;
}


#kombinasjoner-svg {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    overflow: visible;
}

#kombinasjoner-svg.icons-hidden .interaction-icon {
    display: none;
}

/* --- NOWY KOD START --- */
#kombinasjoner-svg.sprosse-dims-hidden .sprosse-dimension-group-ui {
    display: none;
}
/* --- NOWY KOD KONIEC --- */

.interaction-icon {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.interaction-icon:hover {
    opacity: 1;
}
.interaction-icon text {
    font-family: monospace;
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: central;
    fill: white;
    pointer-events: none;
}

/* NOWE STYLE DLA INTERAKTYWNYCH SZPROSÓW */
.sprosse-line-vertical {
    cursor: ew-resize; /* Kursor lewo-prawo */
}
.sprosse-line-horizontal {
    cursor: ns-resize; /* Kursor góra-dół */
}

/* Style dla interakcji z polami szprosów */
.glass-field-hitbox {
    fill: transparent;
    cursor: cell; /* Kursor krzyżyka */
}
.glass-field-hitbox:hover {
    fill: rgba(0, 123, 255, 0.1); /* Lekkie niebieskie podświetlenie przy najechaniu */
}

.glass-field-selection {
    fill: none;
    stroke: #dc3545; /* Czerwony */
    stroke-width: 6px; /* Gruba linia */
    stroke-dasharray: 12, 6; /* Llinia przerywana */
    pointer-events: none; /* Ignoruj kliknięcia */
}

.nested-sprosser-arrow {
    fill: #007bff;
    opacity: 0.7;
    pointer-events: none;
}
/* Na wydruku PDF strzałka ma być ukryta */
.pdf-export-mode .nested-sprosser-arrow {
    display: none;
}

/* --- NOWY KOD START (POPRAWKA PDF) --- */
/* Ukryj czerwoną ramkę zaznaczenia w trybie PDF */
.pdf-export-mode .glass-field-selection {
    display: none;
}
/* --- NOWY KOD KONIEC --- */

/* --- NOWY KOD KONIEC --- */


#window-type-choice {
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 15px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 10px;
}

#window-type-choice button {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    width: 150px;
    text-align: left;
}
#window-type-choice button:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}

#kombinasjoner-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
}

#kombinasjoner-price-display {
    font-size: 1.5em;
    font-weight: bold;
}

#kombinasjoner-controls {
    position: absolute;
    bottom: 15px;
    left: 15px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#kombinasjoner-controls button {
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 40px;
    font-weight: bold;
    border: 1px solid #ccc;
    cursor: pointer;
    background-color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#kombinasjoner-controls button:hover {
    background-color: #f0f0f0;
    border-color: #007bff;
}

#kombinasjoner-properties-panel {
    width: 320px;
    flex-shrink: 0;
    background-color: #fff;
    border-left: 1px solid #e0e0e0;
    padding: 20px;
    overflow-y: auto;
    display: none;
}

#kombinasjoner-properties-panel.active {
    display: block;
}

#kombinasjoner-properties-panel h3 {
    margin-top: 0;
    font-size: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}
#kombinasjoner-properties-panel h4 {
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #0056b3;
    border-top: 1px dashed #ccc;
    padding-top: 15px;
}


#kombinasjoner-properties-panel .opcja-grupa {
    margin-bottom: 15px;
}
#kombinasjoner-properties-panel .opcja-grupa label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}
#kombinasjoner-properties-panel .opcja-grupa input,
#kombinasjoner-properties-panel .opcja-grupa select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

/* NOWE STYLE DLA PRZYCISKÓW +/- W SZPROSACH */
.sprosse-input-wrapper {
    display: flex;
    align-items: center;
}
.sprosse-input-wrapper input {
    flex-grow: 1;
    text-align: center;
    border-left: none;
    border-right: none;
    -moz-appearance: textfield;
}
.sprosse-input-wrapper input::-webkit-outer-spin-button,
.sprosse-input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.sprosse-dim-btn {
    width: 42px;
    height: 38px;
    font-size: 24px;
    font-weight: bold;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    cursor: pointer;
    flex-shrink: 0;
}
.sprosse-dim-btn.minus { border-radius: 4px 0 0 4px; }
.sprosse-dim-btn.plus { border-radius: 0 4px 4px 0; }
.sprosse-dim-btn:hover { background-color: #e9ecef; }

/* NOWE STYLE DLA PÓL POZYCJI SZPROSÓW */
.sprosse-positions-container {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sprosse-positions-container .opcja-grupa {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}
.sprosse-positions-container label {
    margin-bottom: 0;
    flex-basis: 60px; /* Stała szerokość etykiety */
}
.sprosse-positions-container input {
    flex-grow: 1;
}

/* --- NOWY KOD START --- */
/* Style dla nowego panelu szprosów zagnieżdżonych */
#nested-sprosser-panel {
    border: 2px solid #007bff;
    background-color: #f0f8ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}
#nested-sprosser-panel h4 {
    margin-top: 0;
    color: #0056b3;
    border-top: none;
    padding-top: 0;
}
#nested-sprosser-panel .opcja-grupa {
    margin-bottom: 10px;
}
#nested-sprosser-panel .opcja-grupa label {
    font-size: 13px;
    margin-bottom: 4px;
}
#nested-sprosser-panel-toggle {
    background: none;
    border: none;
    color: #007bff;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}
#nested-sprosser-panel-toggle .arrow-icon {
    transition: transform 0.2s;
}
#nested-sprosser-panel.collapsed .arrow-icon {
    transform: rotate(-90deg);
}
#nested-sprosser-panel.collapsed .panel-content {
    display: none;
}
/* --- NOWY KOD KONIEC --- */


/* Style dla przycisków materiału */
.material-btn {
    padding: 5px 15px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
}
#kombinasjoner-material-choice .material-btn.selected {
    background-color: #dc3545; /* Czerwony */
    color: white;
    border-color: #c82333;
}

/* NOWE STYLE DLA GENERAL INFO W DESIGNERZE */
#designer-general-info-header {
    display: flex;
    align-items: center;
    gap: 0;
}
#designer-general-info-header .accordion {
    flex-grow: 1;
    border-right: none;
    background-color: #f1f1f1;
    color: #444;
    cursor: pointer;
    padding: 12px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
    transition: 0.4s;
    border-bottom: 1px solid #ddd;
}
#designer-general-info-header .accordion.active,
#designer-general-info-header .accordion:hover {
    background-color: #e2e2e2;
}
#designer-general-info-header .accordion:after {
    content: '\002B';
    color: #777;
    font-weight: bold;
    float: right;
    margin-left: 5px;
}
#designer-general-info-header .accordion.active:after {
    content: "\2212";
}

#designer-general-info-header .reset-btn-header {
    height: 43px;
    width: 45px;
    border: none;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    font-size: 18px;
    color: #444;
    transition: background-color 0.2s;
}
#designer-general-info-header .reset-btn-header:hover {
    background-color: #e2e2e2;
}

#designer-general-info-wrapper .panel {
    padding: 0;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}

#designer-general-info-container {
    padding: 15px 0;
}
.gi-accordion-wrapper {
    border-bottom: 1px solid #e9ecef;
}
.gi-accordion-wrapper:last-child {
    border-bottom: none;
}
.accordion.gi-accordion {
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border: none;
    border-bottom: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.accordion.gi-accordion:hover, .accordion.gi-accordion.active {
    background-color: #e9ecef;
}
.gi-accordion-label {
    font-weight: 600;
    color: #343a40;
    flex-shrink: 0;
    margin-right: 10px;
}
.gi-accordion-value {
    font-weight: normal;
    color: #0056b3;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.panel.gi-panel {
    padding: 0;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    border-left: none;
    border-right: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}
.gi-panel-content {
    padding: 10px 15px;
}
.gi-option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.gi-option:last-child {
    margin-bottom: 0;
}
.gi-option label {
    margin: 0;
    font-weight: normal;
    margin-left: 8px;
}
.gi-option input[type="radio"],
.gi-option input[type="checkbox"] {
    flex-shrink: 0;
}
.gi-custom-input {
    margin-left: 5px;
    padding: 4px 6px;
    font-size: 13px;
    flex-grow: 1;
}