/* --- PODSTAWOWE STYLE --- */
#designer-view {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
    background-color: #f0f2f5;
    overflow: hidden;
}

/* --- NAGŁÓWEK --- */
#designer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}
#designer-tabs { display: flex; gap: 5px; }
.designer-tab-btn { padding: 8px 16px; border: 1px solid #ccc; border-bottom: none; background-color: #f1f1f1; cursor: pointer; border-radius: 6px 6px 0 0; }
.designer-tab-btn.active { background-color: #fff; border-color: #e0e0e0; border-bottom: 1px solid #fff; margin-bottom: -1px; }

.header-actions { display: flex; gap: 15px; }
.control-btn { padding: 8px 18px; border-radius: 6px; border: 1px solid transparent; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px; }
.control-btn i { font-size: 18px; }
.primary-btn { background-color: #007bff; color: white; border-color: #007bff;}
.primary-btn:hover { background-color: #0056b3; }
.secondary-btn { background-color: #6c757d; color: white; border-color: #6c757d;}
.secondary-btn:hover { background-color: #5a6268; }

/* --- GŁÓWNY OBSZAR --- */
#designer-main-content { display: flex; flex-grow: 1; overflow: hidden; }

/* --- OBSZAR ROBOCZY (CANVAS) --- */
#svg-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
    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;
}

#designer-svg {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}


/* --- PANEL WŁAŚCIWOŚCI --- */
.w-80 {
    width: 320px;
    flex-shrink: 0;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0; 
}
.panel-section { 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    padding: 15px; 
    background-color: #fff; 
    margin-bottom: 20px;
}

/* --- NOWE STYLE AKORDEONU --- */
#skravindu-designer-content .accordion {
    background-color: #f1f1f1;
    color: #444;
    cursor: pointer;
    padding: 12px 15px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: left;
    outline: none;
    font-size: 16px;
    font-weight: bold;
    transition: 0.4s;
    margin-bottom: 0;
}
#skravindu-designer-content .accordion:after {
    content: '+';
    color: #777;
    font-weight: bold;
    float: right;
    margin-left: 5px;
}
#skravindu-designer-content .accordion.active:after {
    content: "−";
}
#skravindu-designer-content .accordion.active, #skravindu-designer-content .accordion:hover {
    background-color: #e2e2e2;
}
#skravindu-designer-content .panel {
    padding: 0 18px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    margin-bottom: 15px;
}
#skravindu-designer-content .panel .opcja-grupa {
    padding: 10px 0;
}
#skravindu-designer-content .panel .opcja-grupa:first-child {
    padding-top: 15px;
}


.panel-section h3 { margin-top: 0; font-size: 16px; padding-bottom: 10px; border-bottom: 1px solid #eee; margin-bottom: 15px; }
.opcja-grupa { margin-bottom: 15px; }
.opcja-grupa:last-child { margin-bottom: 0; }
.opcja-grupa label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.opcja-grupa input[type="number"], .opcja-grupa select { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 14px; }
.opcja-grupa input[type="radio"] + label { font-weight: normal; }
.opcja-grupa input[type="checkbox"] + label { font-weight: normal; display: inline; }


.input-with-lock {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-lock input {
    flex-grow: 1;
}
.input-with-lock input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}


.lock-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.lock-btn.locked {
    background-color: #e9ecef;
    color: #343a40;
}

.lock-btn i {
    font-size: 20px;
}


.mt-6 { margin-top: 1.5rem; }
.pt-6 { padding-top: 1.5rem; }
.border-t { border-top: 1px solid #eee; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.bg-gray-200 { background-color: #e9ecef; }
.hover\:bg-gray-300:hover { background-color: #dee2e6; }
.text-gray-800 { color: #343a40; }
.font-bold { font-weight: 700; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.rounded-lg { border-radius: 0.5rem; }
.price-display { font-size: 1.125rem; font-weight: 600; background-color: #e7f5ff; color: #0056b3; padding: 0.5rem 1rem; border-radius: 0.5rem; text-align: center; }
.bg-blue-600 { background-color: #007bff; }
.hover\:bg-blue-700:hover { background-color: #0056b3; }
.text-white { color: #fff; }

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