.modal { display: none; flex-direction: column; align-items: center; justify-content: center; position: absolute; width: 80%; max-width: 420px; max-height: 80%; margin: auto; inset: 0; z-index: 3; } .modal-content { border-top: 1px solid rgb(217, 217, 217); border-inline: 1px solid rgb(217, 217, 217); border-start-start-radius: inherit; border-start-end-radius: inherit; background-color: white; overflow-y: auto; height: fit-content; max-height: calc(100% - 3.3em); width: 100%; } .modal-content > p { margin-inline: 1em; } .modal-content > ul { margin-inline-end: 1em; } .modal-button-panel { height: 3.3em; border: 1px solid; border-color: rgb(223, 223, 223) rgb(217, 217, 217) rgb(217, 217, 217); border-end-start-radius: inherit; border-end-end-radius: inherit; background-color: white; text-align: center; justify-content: center; display: flex; width: 100%; } .modal-button { min-width: 2.5em; text-align: center; color: white; border-radius: 5px; padding: 0.4em; padding-bottom: 0.3em; height: 1.25em; background-color: rgb(50, 121, 178); inset-block: 0; margin-top: auto; margin-bottom: auto; cursor: pointer; user-select: none; margin-inline: 0.31em; } .modal-button:hover { background-color: rgb(39, 109, 167); } .modal-button:active { background-color: rgb(27, 86, 135); } .modal-svg-button { padding: 0; width: 2em; height: 1.8em; padding-bottom: 2px; } .modal-svg-button-icon { width: 100%; height: 100%; filter: brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%); } #modal-background-panel { position: absolute; width: 100%; height: 100%; background-color: #00000042; z-index: 2; display: none; } .show-modal-background { animation: fadeInBackground 0.3s ease-in-out; /* set the animation duration and easing function */ } @keyframes fadeInBackground { 0% { opacity: 0; } 100% { opacity: 1; } } .show-modal { animation: fadeInModal 0.3s ease-in-out; /* set the animation duration and easing function */ } @keyframes fadeInModal { 0% { opacity: 0; scale: 0.95; } 100% { opacity: 1; scale: 1; } } .hide-modal-background { animation: fadeOutBackground 0.2s ease-in-out; } @keyframes fadeOutBackground { 0% { opacity: 1; } 100% { opacity: 0; } } .hide-modal { animation: fadeOutModal 0.2s ease-in-out; } @keyframes fadeOutModal { 0% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 0.95; } }