.sms-modal .modal-content { max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); }
#sms-template-form .sms-template-body { height: auto; min-height: 12rem; max-height: none; }
.sms-modal .modal-header, .sms-modal .modal-footer { flex-shrink: 0; }
.sms-modal .modal-header .heading { font-size: 1.25rem; margin: 0; }
.sms-modal .modal-body { overflow-y: auto; min-height: 0; }
.sms-modal .modal-footer { flex-wrap: wrap; gap: .5rem; }
.sms-modal .modal-footer > * { margin: 0; }
.sms-context { color: #62718a; margin: 0 0 1rem; overflow-wrap: anywhere; }
.sms-message { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f7fa; border-radius: .375rem; padding: 1rem; line-height: 1.6; }
#sms-compose-form #sms-body { height: 16rem; }
#sms-compose-form #sms-body[readonly] { background-color: #f5f7fa; }
#sms-compose-form .sms-recipient-choice { display: flex; align-items: baseline; gap: .25rem; min-width: 0; max-width: 100%; }
#sms-compose-form .selectize-control.multi .selectize-input { flex-wrap: wrap; height: auto; min-height: 2.25rem; }
#sms-compose-form .selectize-input > .sms-recipient-choice { display: inline-flex; flex-shrink: 0; vertical-align: middle; max-width: calc(100% - .5rem); }
#sms-compose-form .sms-recipient-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sms-compose-form .sms-recipient-number, #sms-compose-form .sms-recipient-kind { flex-shrink: 0; white-space: nowrap; }
.sms-status { font-weight: 600; margin: 0 0 .375rem; }
.sms-recipients { margin-bottom: .375rem; overflow-wrap: anywhere; }
.sms-summary { margin-bottom: 1rem; }
.sms-summary p:last-child { margin-bottom: 0; font-size: .875rem; }
.sms-usage { color: #62718a; font-size: .8125rem; line-height: 1.5; }
.sms-usage .sms-message-format { font-size: inherit; line-height: inherit; }
.sms-usage p { margin: 0 0 .25rem; }
.sms-metadata { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .4rem .75rem; font-size: .875rem; margin: 1.25rem 0; }
.sms-metadata dt { color: #62718a; font-weight: 400; }
.sms-metadata dd { margin: 0; overflow-wrap: anywhere; }
.sms-technical { border-top: 1px solid #e5e9ef; padding-top: .75rem; font-size: .875rem; }
.sms-technical summary { cursor: pointer; color: #405f87; }
.sms-test-notice { background: #fff8df; border-radius: .375rem; padding: .625rem .75rem; margin-bottom: 1rem; font-size: .8125rem; }
.sms-test-notice summary { cursor: pointer; }
.sms-test-notice p { margin: .5rem 0 0; }
.sms-recipient-list { list-style: none; padding: 0; margin: 1rem 0; }
.sms-recipient-list li, .sms-diagnostic-recipient { border-top: 1px solid #e5e9ef; padding: .75rem 0; }
.sms-recipient-heading { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; font-size: .875rem; }
.sms-recipient-list p { margin: .375rem 0 0; font-size: .8125rem; }
.sms-diagnostic-recipient h5 { font-size: .875rem; margin: 0; }
.sms-table-message { width: calc(var(--table-col-body-size) * 1px - 1rem); min-width: 0; overflow: hidden; }
.sms-table-message button { display: block; width: 100%; max-width: 100%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; text-align: left; }
.sms-send-control { font-weight: 500; padding: .25rem 0; min-height: 2rem; }
/* Contain Crisp's high internal layers beneath Bootstrap's modal backdrop. */
body.sms-dialog-open .crisp-client { position: relative; z-index: 1030 !important; isolation: isolate; }
@media (max-width: 575.98px), (max-height: 500px) {
  #sms-compose-form #sms-body { height: clamp(10rem, 30vh, 16rem); height: clamp(10rem, 30dvh, 16rem); }
}
@media (max-width: 575.98px) {
  .sms-modal { margin: .5rem; }
  .sms-modal .modal-content { max-height: calc(100vh - 1rem); max-height: calc(100dvh - 1rem); }
  .sms-modal .modal-body, .sms-modal .modal-header, .sms-modal .modal-footer { padding: 1rem; }
  .sms-modal .form-field__textarea { min-height: 7rem; }
  .sms-modal .modal-footer button { min-height: 2.75rem; }
}
