.modal-page-blocked { overflow: hidden; } .modal-dialog { text-align: left; background: var(--color-body); border: none; margin: 0; padding: 0; color: inherit; box-shadow: 1px 3px 3px 0 var(--color-shadow), 1px 3px 15px 2px var(--color-shadow); border-radius: var(--border-radius); user-select: text; width: fit-content; /* on small screens, the modal should not exceed 90% of the viewport width; on large screens, the modal should not exceed 800px in width (ref: ".ui.container" width is 1280px) */ max-width: min(800px, 90vw); /* on small screens, the modal should not be smaller than 300px or 90vw in width; on large screens, the minimum width is 30% of the viewport width, capped at 800px */ min-width: min(800px, max(min(300px, 90vw), 30vw)); } .modal-dialog > :first-child { border-top-left-radius: var(--border-radius); border-top-right-radius: var(--border-radius); } .modal-dialog > :last-child { border-bottom-left-radius: var(--border-radius); border-bottom-right-radius: var(--border-radius); } .modal-dialog .close-modal { cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); right: 1rem; z-index: 1; opacity: 0.5; padding: 0; border: none; background: none; width: 1.5rem; height: 1.5rem; } .modal-dialog .close-modal::before { content: ""; display: block; width: 100%; height: 100%; background-color: currentcolor; mask-image: var(--octicon-x); mask-size: cover; } .modal-dialog .close-modal:hover { opacity: 1; } .modal-dialog > .header { display: block; position: relative; font-size: 18px; font-weight: var(--font-weight-medium); background: var(--color-body); margin: 0; padding: 1.25rem 3rem 1.25rem 1.5rem; /* leave more right space for the "close" button */ box-shadow: none; color: var(--color-text-dark); border-bottom: 1px solid var(--color-secondary); border-top-left-radius: var(--border-radius); border-top-right-radius: var(--border-radius); } .modal-dialog > .content, .modal-dialog form > .content { display: block; width: 100%; font-size: 1em; line-height: 1.4; padding: 1.5em; background: var(--color-body); border-radius: 0 0 var(--border-radius) var(--border-radius); } .modal-dialog > .actions, .modal-dialog .content + .actions, .modal-dialog .content + form > .actions { background: var(--color-secondary-bg); padding: 1rem; border-top: 1px solid var(--color-secondary); text-align: right; border-radius: 0 0 var(--border-radius) var(--border-radius); } .modal-dialog .content > form > .actions, .modal-dialog .content > .actions { padding-top: 1em; text-align: right; } .modal-dialog .actions > .ui.button { display: inline-flex; gap: var(--gap-inline); align-items: center; padding-inline: 10px 12px; margin-left: 0.75em; margin-right: 0; } .modal-dialog .actions > .ui.button.danger { display: block; width: 100%; margin: 0 auto; text-align: center; }