#overlay-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

#overlay-panel.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.panel-content {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 90%; /* Zmień na procent, żeby formularz dopasował się do ekranu */
    max-height: 90vh; /* Ogranicz wysokość do 90% wysokości widoku */
    overflow-y: auto; /* <--- Dodaj tę linię! */
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

#overlay-panel.visible .panel-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-top: 10px;
    font-weight: bold;
}

input, textarea {
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button[type="submit"] {
    margin-top: 20px;
    padding: 10px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-floating>label{
    padding: 0 .5rem;
}