.modal { position: fixed; left: 0; right: 0; top: 0; bottom: 0; margin: auto; z-index: 2000; display: flex; align-items: center; justify-content: center; } .modalContainer { box-shadow: 0px 16px 16px -16px rgba(0, 0, 0, 0.35); border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.1); /* TODO(eh-am): support light background */ background-color: #222; max-width: 520px; max-height: calc(100% - 64px); overflow-y: auto; display: flex; flex-direction: column; position: relative; } .header { padding: 15px 20px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); display: flex; } /* reset immediate headers */ .header > h1, .header > h2, .header > h3, .header > h4 { margin: 0; flex: 1; } .body { padding: 0 20px 20px; overflow-y: auto; } .closeButton { border: none; padding: 0; width: 34px; height: 34px; margin-right: -10px; cursor: pointer; position: relative; justify-self: flex-end; min-width: 0; } .closeButton::after { width: 34px; height: 34px; line-height: 22px; font-size: 1.5em; content: '\00d7'; } .backdrop { z-index: -1; position: fixed; right: 0; bottom: 0; top: 0; left: 0; background-color: rgba(0, 0, 0, 0.5); -webkit-tap-highlight-color: transparent; } .footer { padding: 15px 20px 15px; border-top: 1px solid rgba(255, 255, 255, 0.2); display: flex; flex-direction: column; } .dialogActions { align-self: end; } .dialogActions > *:not(:last-child) { margin-right: 8px; align-self: end; }