html.tm24-modal-open { overflow: hidden; }
dialog.tm24-modal {
    box-sizing: border-box; width: min(960px, calc(100% - 32px)); max-width: none;
    max-height: calc(100dvh - 32px); margin: auto; padding: 0;
    background: #fff; color: #07152f; border: 1px solid #dbe6f1; border-radius: 20px;
    box-shadow: 0 24px 80px #07152f40; overflow: hidden;
}
.tm24-modal::backdrop { background: #07152fb3; }
.tm24-modal__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #dbe6f1; }
.tm24-modal .tm24-modal__header h2 { margin: 0; padding: 0; font-size: 20px; line-height: 1.3; color: #07152f; }
.tm24-modal button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 10px; margin: 0; border: 0; border-radius: 12px; background: #edf5ff; color: var(--tm24-theme-main, #1e73be); cursor: pointer; }
.tm24-modal button:hover { background: #dcecff; }
.tm24-modal button:focus-visible { outline: 2px solid var(--tm24-theme-main, #1e73be); outline-offset: 2px; }
.tm24-modal button svg { display: block; width: 24px; height: 24px; }
.tm24-modal__body { display: flex; align-items: center; justify-content: center; min-height: 120px; background: #f6faff; }
.tm24-modal__body > img { display: block; width: auto; max-width: 100%; max-height: calc(100dvh - 180px); height: auto; object-fit: contain; margin: 0; }
.tm24-modal__body > iframe, .tm24-modal__map { display: block; width: 100%; height: min(620px, calc(100dvh - 148px)); min-height: 180px; border: 0; }
.tm24-modal--inline .tm24-modal__body { display: block; padding: 24px; max-height: calc(100dvh - 160px); overflow: auto; background: #fff; }
.tm24-modal__nav { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px; }
.tm24-modal__nav:has([hidden]) { display: none; }
.tm24-modal [hidden] { display: none; }
.tm24-modal__status { margin: 24px; }
@media (max-width: 600px) {
    dialog.tm24-modal { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 16px; }
    .tm24-modal__header { padding: 10px 14px; }
    .tm24-modal .tm24-modal__header h2 { font-size: 18px; }
    .tm24-modal__body > iframe, .tm24-modal__map { height: min(620px, calc(100dvh - 110px)); }
    .tm24-modal--inline .tm24-modal__body { padding: 18px; }
}
