/*
 * Shared popup chrome: viewport height, centering, z-index, pinned header/footer.
 * Add .cbot-modal to the .modal root. Optional: .cbot-modal--sm / --lg / --nested.
 */
.cbot-modal.modal {
    z-index: 200000 !important;
}

.modal-backdrop.cbot-modal-backdrop {
    z-index: 199990 !important;
}

.cbot-modal--nested.modal {
    z-index: 210000 !important;
}

.modal-backdrop.cbot-modal-backdrop--nested {
    z-index: 209990 !important;
}

.cbot-modal.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    padding: 0.75rem;
}

.cbot-modal .modal-dialog-centered {
    display: block;
    min-height: 0;
}

.cbot-modal .modal-dialog-centered::before {
    content: none;
}

.cbot-modal .modal-dialog {
    max-width: 680px;
    width: 100%;
    max-height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
}

.cbot-modal--sm .modal-dialog {
    max-width: 420px;
}

.cbot-modal--lg .modal-dialog {
    max-width: 800px;
}

.cbot-modal .modal-content {
    max-height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cbot-modal .modal-header {
    flex: 0 0 auto;
    z-index: 2;
    background: #fff;
    min-width: 0;
}

.cbot-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cbot-modal .modal-footer {
    flex: 0 0 auto;
    z-index: 2;
    background: #fff;
}
