html, body {
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal overflow at the root level */
}

.floating-panel {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translate(0, -50%);
    width: 420px;
    background-color: #222222;
    border: 2px solid #444444;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    padding: 15px;
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    border-radius: 5px 0 0 5px;
    color: #FFFFFF;
}

    .floating-panel.hidden {
        right: -20%; /* Further increase to ensure complete off-screen */
    }

.toggle-button {
    position: absolute;
    left: -60px; /* Ensure this does not cause overflow */
    top: 50%;
    transform: translateY(-50%);
    background-color: #F2B735;
    border: none;
    color: #222222;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 1010; /* Ensure it's above other elements */
}

    .toggle-button:hover {
        background-color: #D9A02E;
    }


/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .floating-panel {
        width: 100%; /* Full width on smaller screens */
        right: -100%; /* Adjust hidden position for full width */
        border-radius: 0; /* Adjust border-radius for small screens */
    }

        .floating-panel.hidden {
            right: -15%; /* Adjust to ensure panel is completely off-screen */
        }

    .toggle-button {
        left: -50px; /* Adjust position to fit small screens */
    }
}
