 .document-menu {
     position: relative;
     display: inline-block;
 }

 .menu-dropdown {
     display: none;
     position: absolute;
     right: 10px;
     top: 35px;
     background: white;
     border: 1px solid #ddd;
     box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
     padding: 5px 0;
     list-style: none;
     min-width: 120px;
     border-radius: 6px;
     z-index: 2;
 }

 /* When the menu is active */
 .menu-dropdown.active {
     display: block;
 }

 .menu-dropdown li {
     padding: 10px;
     cursor: pointer;
     white-space: nowrap;
     vertical-align: middle;
     height: 18px;
     line-height: 18px;
 }


 .menu-dropdown li:hover {
     background: #f0f0f0;
 }

 .menu-icon {
     text-decoration: none;
     color: #333;
     vertical-align: middle;
     height: 18px;
     line-height: 18px;
 }

 .menu-icon>p {
     display: inline;
     height: 18px;
     vertical-align: middle;
 }

 .menu-icon svg {
     width: 18px;
     height: 18px;
     margin-right: 0.5em;
     vertical-align: middle;

 }

 .menu-button {
     background: none;
     border: none;
     font-size: 16px;
     color: grey;
     text-decoration: none;
     cursor: pointer;
     padding: 2px;
     width: 26px;
     /* Set a fixed width */
     height: 26px;
     /* Set a fixed height */
     display: flex;
     align-items: center;
     justify-content: center;
     border-radius: 50%;
     /* Makes it a circle */
     transition: background-color 0.2s ease-in-out;
 }

 /* Hover effect: grey circular background */
 .menu-button:hover {
     background-color: rgba(0, 0, 0, 0.1);
     /* Light grey background */
 }

 /* The modal background overlay */
 .modal-overlay {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(0, 0, 0, 0.5);
     /* Semi-transparent dark background */
     display: none;
     z-index: 999;
     /* Ensures it's above other content */
 }

 /* Modal styling */
 .modal {
     position: fixed;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     background: white;
     padding: 20px;
     border-radius: 8px;
     box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
     z-index: 1000;
     /* Ensures it's above the overlay */
     display: none;
 }

 /* When modal is active */
 .modal.active,
 .modal-overlay.active {
     display: block;
 }

 .modal-content {
     display: flex;
     flex-direction: column;
 }

 .modal .close-btn {
     position: absolute;
     right: 10px;
     top: 10px;
     cursor: pointer;
     font-size: 20px;
 }

 /* Container for the category selection */
 #categoryContainer {
     display: grid;
     grid-template-columns: repeat(4, 4fr);
     /* Two equal columns */
     gap: 4px;
     /* Space between cards */
     padding: 16px;
 }

 /* Individual category cards */
 .category-card {
     background-color: #fff;
     padding: 16px;
     border-radius: 0;
     box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
     text-align: center;
     font-size: 16px;
     font-weight: bold;
     cursor: pointer;
     transition: background-color 0.2s ease, transform 0.1s ease-in-out;
 }

 /* Hover effect */
 .category-card:hover {
     transform: scale(1.05);
 }

 /* Selected category */
 .category-card.selected {
     background-color: #ddd;
     box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
 }

 /* Ensure menu behaves properly on touch screens */
 @media (hover: none) and (pointer: coarse) {
     .menu-dropdown {
         touch-action: manipulation;
     }
 }