/* Sidebar stijl */
.sidebar {
    z-index: 1000;
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    height: 100dvh; /* respect mobile browser chrome so the bottom isn't cut off */
    background: #e6e6e6;
    color: #000;
    padding-top: 20px;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    padding: 16px;
    box-sizing: border-box; /* keep padding inside the width so it doesn't overflow on mobile */
    /* lay the contents out as a column so the contract scrolls and the buttons stay pinned */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* contract is the only flexible scroll region; canvas + buttons stay reachable */
.sidebar .contractContent {
    flex: 1 1 auto;
    min-height: 100px;
    overflow-y: auto;
}

.sidebar #sigPad,
.sidebar > button {
    flex: 0 0 auto;
}

/* Sidebar geopend */
.sidebar.open {
    right: 0;
}

/* Sluitknop */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Sidebar menu */
.sidebar ul {
    list-style: none;
    padding: 20px;
}

.sidebar ul li {
    padding: 15px 0;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    display: block;
}

/* Overlay stijl */
.overlay {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Overlay actief maken */
.overlay.active {
    visibility: visible;
    opacity: 1;
}

/* Open sidebar knop */
.open-btn {
    font-size: 20px;
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: #333;
    color: white;
    position: absolute;
    top: 20px;
    left: 20px;
    border-radius: 5px;
}


@media (max-width: 767px) {
    .sidebar {
        width: 100vw!important;
        right: -100vw;
    }
}

@media (max-width: 574px) {
    .sidebar {
        width: 100vw!important;
        right: -100vw;
    }
}

@media (max-width: 360px) {
    .sidebar {
        width: 100vw!important;
        right: -100vw;
    }
}