/* Główne style dla generatora formularzy */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Dodajemy padding na dole, aby zawartość nie była zasłaniana przez stały pasek */
    padding-bottom: 50px;
    background-color: #000; 
    background-image: url(../grafika/tlo.jpg); 
    background-repeat: no-repeat; 
    background-size: cover; 
    background-position: center center;
    background-attachment: fixed;
	transition: 0.5s;
}

/* Style dla stałego paska na dole */
.fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

/* Przeźroczysty footer */
.transparent-footer {
    background-color: rgba(0, 0, 0, 0.5); /* Czarne tło z przeźroczystością 50% */
}

/* Przeźroczysty header */
.transparent-header {
    background-color: rgba(255, 255, 255, 0.7); /* Białe tło z przeźroczystością 30% */
}

.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Style dla zwijania/rozwijania panelu konfiguracji */
.config-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.config-header:hover {
    background-color: #e9ecef;
}

.config-toggle-icon {
    transition: transform 0.3s ease;
}

.config-header.active .config-toggle-icon {
    transform: rotate(-180deg);
}

.config-body {
    display: none;
}

.config-body.show {
    display: block;
}

/* Style dla panelu wyboru pól */
.available-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-item {
    padding: 10px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: move;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.field-item:hover {
    background-color: #f1f3f5;
    border-color: #adb5bd;
}

.field-item i {
    color: #6c757d;
}

/* Style dla podglądu formularza */
.form-container {
    min-height: 300px;
    padding: 15px;
    border: 1px dashed #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    position: relative;
}

#previewForm {
    min-height: 250px; /* Zapewnia wystarczającą wysokość, nawet gdy formularz jest pusty */
}

.form-field {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    position: relative;
}

.form-field:hover {
    border-color: #dee2e6;
}

.form-field.selected {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: #0d6efd;
}

.field-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: none;
}

.form-field:hover .field-actions {
    display: flex;
    gap: 5px;
}

.field-actions button {
    padding: 2px 5px;
    font-size: 12px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    cursor: pointer;
}

.field-actions button:hover {
    background-color: #f8f9fa;
}

.field-placeholder {
    height: 40px;
    border: 2px dashed #0d6efd;
    margin-bottom: 10px;
    border-radius: 4px;
    background-color: rgba(13, 110, 253, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd;
    font-weight: bold;
    text-align: center;
    animation: pulse 1.5s infinite;
    z-index: 100;
}

@keyframes pulse {
    0% { background-color: rgba(13, 110, 253, 0.05); }
    50% { background-color: rgba(13, 110, 253, 0.2); }
    100% { background-color: rgba(13, 110, 253, 0.05); }
}

/* Style dla panelu kodu */
pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    max-height: 500px;
    overflow: auto;
}

code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* Style dla panelu edycji pola */
#fieldEditPanel {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.edit-option {
    margin-bottom: 10px;
}

/* Animacje */
@keyframes highlight {
    0% { background-color: rgba(13, 110, 253, 0.1); }
    100% { background-color: transparent; }
}

.highlight {
    animation: highlight 1s ease;
}

/* Style dla modalu edycji pola */
.modal-content {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Responsywność */
@media (max-width: 992px) {
    .row {
        flex-direction: column;
    }
    
    .col-md-3, .col-md-5, .col-md-4 {
        width: 100%;
    }
}

/* Styl dla przeciągania */
.ui-sortable-helper {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
    transform: rotate(2deg);
    z-index: 1000;
}

/* Styl dla przeciąganego nowego pola */
.dragging-new-field {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
    z-index: 1000;
    background-color: #fff;
}

.ui-sortable-placeholder {
    visibility: visible !important;
    height: 40px;
    background-color: rgba(13, 110, 253, 0.1);
    border: 2px dashed #0d6efd;
    margin-bottom: 10px;
    border-radius: 4px;
}

/* Style dla obszaru upuszczania */
.droppable-active {
    border-color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.05) !important;
}

.droppable-hover {
    border-color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.1) !important;
}

#drop-placeholder {
    height: 40px;
    background-color: rgba(13, 110, 253, 0.1);
    border: 2px dashed #0d6efd;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd;
    font-weight: bold;
    font-size: 14px;
    animation: pulse 1.5s infinite;
}