.authorizing .d4me-card.skeleton-box {
    max-width: unset; 
    box-shadow: none;
    margin: 24px;
}
.content-data-wrapper.superset {
    margin: 0px;
    width: 100%;
}
.content-data-wrapper.--locker-grid-view {
    height: calc(100% - 198px); 
    margin-top: 68px;
}

.support-cards-layout {
    display: flex;
    gap: 24px;
}

.parcel-status-change__wrapper { 
    display: flex;
    align-items: center;
    gap: 32px;
}

.role-modal__wrapper {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    margin-inline: 24px;
    margin-bottom: 24px;
}
.role-modal__wrapper .basic-info__wrapper {
    width: 45%;
}
.role-modal__wrapper .permissions__wrapper {
    width: 55%;
}

.role-modal__wrapper .desktop-view__buttons {
    display: flex;
    margin-top: 24px;
    gap: 12px;
}
.role-modal__wrapper .mobile-view__buttons {
    display: none;
}

.permissions__wrapper h5 {
    margin-bottom: 0px;
}
.permissions__wrapper .fixed-table-height {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 254px);
}

.alerts-settings__wrapper {
    display: flex;
    gap: 24px;
    margin-inline: 24px;
}

.alerts-settings__logging,
.alerts-settings__email-notifications {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.alerts-settings__email-notifications__top-content,
.alerts-settings__email-notifications__input-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.modal .alerts-settings__email-notifications__input-content {
    margin-bottom: 16px;
}

.alerts-settings__wrapper .d4me-card.--basic {
    margin-top: 24px;
    max-width: unset;
}

.alerts-settings__wrapper .d4me-card.--basic .modal-table {
    flex: 1;
}

.alert-settings-modal__table-wrapper {
    display: flex;
    flex-direction: column;
    height: 404px;
    margin-top: 16px;
}

.alerts-settings__logging .modal-table {
    max-height: calc(100% - 46px);
} 
.alerts-settings__email-notifications .modal-table {
    max-height: calc(100% - 256px);
} 
.alerts-settings__email-notifications:has(.form-error-wrapper) .modal-table {
    max-height: calc(100% - 284px);
}
.alert-settings-modal__table-wrapper .modal-table {
    max-height: calc(100% - 84px);
} 

.alerts-settings__logging .modal-table .table__scrollable-body,
.alerts-settings__email-notifications .table__scrollable-body {
    max-height: fit-content;
}

.edit-region-modal-table {
    height: 448px;
    display: flex;
    flex-direction: column;
}
.edit-region-modal-table .table td>div.overflowed {
    width: 186px;
}

/* Selected sites list on the edit region map: each row ends with a remove button and the header
   with "Clear all". The core styles lay the list out as two columns and style every nested div as
   a cell, so they are overridden here; the id outweighs them, as the core bundle loads after us. */
#editRegionGoogleMap .selected-markers-list__table__thead {
    grid-template-columns: 40% 1fr auto;
}
#editRegionGoogleMap .selected-markers-list__table__tbody {
    grid-template-columns: 40% 1fr 48px;
}
#editRegionGoogleMap .selected-markers-list__table__tbody div {
    font-weight: 400;
}
#editRegionGoogleMap .selected-markers-list__table__tbody > div:nth-child(3n+1) {
    font-weight: 600;
}
#editRegionGoogleMap .selected-markers-list__clear,
#editRegionGoogleMap .selected-markers-list__remove {
    padding-inline: 4px;
    justify-content: center;
}
#editRegionGoogleMap .selected-markers-list__clear div,
#editRegionGoogleMap .selected-markers-list__remove div {
    height: auto;
    padding-inline: 0;
    color: inherit;
}
#editRegionGoogleMap .selected-markers-list__clear .d4me-btn {
    width: auto;
    white-space: nowrap;
}

.modal-body .scrollable-content__list {
    margin-left: 24px;
    padding-right: 24px;
}
.modal-body .scrollable-content__static {
    padding-inline: 24px;
}

.editable-page__save-btn {
    width: 284px;
    padding-inline: 24px;
}

.changelog__content {
    height: 100%;
    padding-inline: 24px;
    overflow-y: auto;
}

.btn-full-changelog__svg-icon {
    margin-left: 8px;
    transform: rotate(135deg);
}

.d4me-badge.--small {
    font-size: 14px;
    line-height: 18px;
    padding: 2px 4px;
}

#parcelDetails .modal-body__padding-inline .skeleton-box {
    width: 0px;
}
#parcelDetails .modal-body__padding-inline.--loading .skeleton-box {
    width: 200px;
}
.--reversed #parcelDetails .text-right {
    text-align: left;
}

.site-limited-access-toggle {
    max-width: 692px;
    margin-bottom: 24px;
}

.add-site .grid-images-layout.sites {
    max-width: unset;
}
.add-site .grid-images-layout.sites > div:first-child {
    height: 348px;
}
.add-site .grid-images-layout.sites > div:not(:first-child) {
    height: 174px;
    max-width: unset;
}

.site-info-modal-map {
    height: 200px;
    overflow: hidden;
    position: relative;
}

/* The "map unavailable" notice of a map inside a modal covers only the map. Isolation keeps its
   z-index inside the wrapper, so buttons placed over the map (Site details) stay on top of it. */
.site-info-modal-map-wrapper {
    position: relative;
    isolation: isolate;
}
.site-info-modal-map-wrapper .google-map__overlay {
    position: absolute;
    /* !important beats the full-screen offsets for the side menu, including the --reversed ones */
    inset: 0 !important;
}

@media all and (max-width: 1400px) {
    .alerts-settings__wrapper {
        flex-direction: column;
        gap: 0px;
        margin-inline: 16px;
    }
}

/* ---- MEDIUM VIEW ---- */
@media all and (max-width: 991px) {
    .role-modal__wrapper {
        flex-direction: column;
        gap: 24px;
        margin-top: 16px;
        margin-inline: 16px;
        margin-bottom: 0px;
    }
    .role-modal__wrapper .basic-info__wrapper,
    .role-modal__wrapper .permissions__wrapper {
        width: 100%;
    }

    .permissions__wrapper h5 {
        margin-bottom: 8px;
    }

    .role-modal__wrapper .desktop-view__buttons {
        display: none;
    }
    .role-modal__wrapper .mobile-view__buttons {
        display: flex;
        margin-bottom: 24px;
        justify-content: center;
        gap: 16px;
    }
    .role-modal__wrapper .mobile-view__buttons > div {
        width: 100%;
    }
    .permissions__wrapper .fixed-table-height {
        min-height: 300px;
        max-height: calc(100vh - 570px);
    }

    .alerts-settings__logging,
    .alerts-settings__email-notifications {
        height: unset;
    }
    .alerts-settings__wrapper .d4me-card.--basic {
        margin-top: 16px;
    }
}


/* ---- SMALL VIEW ---- */
@media all and (min-width: 576px) and (max-width: 767px) {
    .welcomePopup .modal-dialog {
        width: calc(100% - 16px);
    }
}
/* ---- X-SMALL VIEW ---- */
@media all and (max-width: 575px) {
    .welcomePopup .modal-dialog {
        width: 516px;
    }
}


/* ---- SMALL && X-SMALL VIEW ---- */
@media all and (max-width: 767px) {
    .content-data-wrapper.--locker-grid-view {
        height: calc(100% - 132px); 
    }
    .dropdown.access-type-dropdown {
        display: flex;
        justify-content: end;
    }
    .dropdown.access-type-dropdown::before {
        content: '';
        background: var(--basic-900-alpha-70);
        visibility: hidden;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 2;
    }
    .dropdown.access-type-dropdown:has( div.dd-toggle.show )::before {
        visibility: visible;
    }
    .dropdown.access-type-dropdown .dd-toggle.show + .dropdown-menu {
        width: 100% !important;
        transform: unset !important;
        bottom: 0 !important;
        top: unset !important;
        right: 0 !important;
        left: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column;
    }

    .d4me-card.--basic.--user-info-card {
        position: absolute;
        visibility: hidden;
        z-index: 2;
        width: 100%;
        right: 0;
        max-width: 280px;
        top: 72px;
    }

    .d4me-card.--basic.--user-info-card.--visible {
        visibility: visible;
    }

    .support-cards-layout {
        flex-direction: column;
        align-items: center;
        margin-top: 24px;
        margin-bottom: 32px;
    }

    .parcel-status-change__wrapper { 
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .parcel-status-change__wrapper > svg {
        transform: rotate(90deg);
    }
    .parcel-status-change__wrapper > div {
        width: 100%;
    }

    .alerts-settings__logging .modal-table,
    .alerts-settings__email-notifications .modal-table,
    .alert-settings-modal__table-wrapper .modal-table {
        max-height: unset;
    }
    .alert-settings-modal__table-wrapper {
        height: fit-content;
    }

    .mobile-view__email-column {
        word-break: break-all;
        width: 56vw;
        white-space: normal;
    }

    .mobile-view__recipients-column {
        white-space: normal;
        word-break: break-word;
    }

    .edit-region-modal-table.--members,
    .edit-region-modal-table.--sites {
        height: fit-content;
    }

    .modal-tabs-layout__content .edit-region-modal-table .table-options__search-field {
        width: 100%;
    }

    .selected-markers-list__table {
        display: none;
    }

    .modal-body .scrollable-content__list { 
        max-height: unset;

    }

    .modal-body .scrollable-content__list {
        margin-left: 0px;
        padding-right: 0px;
    }
    .modal-body .scrollable-content__static {
        padding-inline: 0px;
    }

    .editable-page__save-btn {
        width: 100%;
    }
}
/* ---- Instant messages ---- */
/* While any instant message is docked, .main-content stacks its children so banners take space
   instead of covering the page; the page content gets whatever height is left. */
.main-content:has(> .instant-banner) {
    display: flex;
    flex-direction: column;
}
.main-content:has(> .instant-banner) > * {
    flex: none;
}
.main-content:has(> .instant-banner) > .content-wrapper {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}
/* MainLayoutAuth renders all messages in one place, after the page content. Flex order puts them
   back where they belong; equal orders keep DOM order, so the floating-top anchor (-1) lands after
   the header (-1), and the floating-bottom anchor (1) before the bottom banners (1). */
.main-content:has(> .instant-banner) > .instant-message--banner.--top {
    order: -2;
}
.main-content:has(> .instant-banner) > .header,
.main-content:has(> .instant-banner) > .header__mobile-view,
.main-content:has(> .instant-banner) > .instant-message__float-anchor.--top {
    order: -1;
}
.main-content:has(> .instant-banner) > .instant-banner.--bottom {
    order: 1;
}
.instant-message.form-info-wrapper,
.instant-message.form-success-wrapper,
.instant-message.form-warning-wrapper,
.instant-message.form-error-wrapper,
.instant-message.form-note-wrapper {
    margin-top: 0;
    padding: 10px 16px;
    align-items: flex-start;
    border: 1px solid;
}
/* Border in each type's main color: the same colors as the FormMessage icon. */
.instant-message.form-info-wrapper {
    border-color: var(--primary-600);
}
.instant-message.form-success-wrapper {
    border-color: var(--success);
}
.instant-message.form-warning-wrapper {
    border-color: var(--warning);
}
.instant-message.form-error-wrapper {
    border-color: var(--critical);
}
.instant-message.form-note-wrapper {
    border-color: var(--basic-900);
}
.instant-message__content {
    min-width: 0;
    overflow-wrap: anywhere;
}
.instant-message .instant-message__content {
    font-size: 16px;
    line-height: 22px;
}
.instant-message__title {
    font-weight: 600;
    margin-right: 4px;
}
.instant-message__text {
    white-space: pre-line;
}
.instant-message__close {
    flex: none;
    margin: 0 -8px;
}

.instant-message--banner {
    border-radius: 0 !important;
    position: relative;
    z-index: 7;
}
/* Floating cards size like the toast: they wrap their text and grow at most to the
   available width, keeping the toast's 24px inset. */
.instant-message__float-anchor {
    position: relative;
    height: 0;
    z-index: 1000;
}
.instant-message__float-list {
    position: absolute;
    left: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}
.instant-message__float-anchor.--top .instant-message__float-list {
    top: 16px;
}
.instant-message__float-anchor.--bottom .instant-message__float-list {
    bottom: 24px;
    flex-direction: column-reverse;
}
.instant-message.instant-message--floating {
    max-width: 100%;
    pointer-events: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px var(--basic-1100-alpha-16);
}
/* The info color is translucent; give floating cards a solid base so the page does not show through. */
.instant-message--floating.form-info-wrapper {
    background: linear-gradient(var(--primary-600-alpha-24), var(--primary-600-alpha-24)), var(--basic-0);
}

/* Modal: the message alone, centered over a dimmed page. Above the nav menu, which sits at
   z-index 100000001. Flex, not grid: a grid's auto column grows to the card's 480px, so its
   max-width: 100% never caps it on a phone; a flex container's width does. */
.instant-message__modal {
    position: fixed;
    inset: 0;
    z-index: 100000002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.instant-message__modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--basic-900-alpha-70);
}
/* A long text scrolls inside the card instead of running off the top and bottom of the screen. */
.instant-message.instant-message--modal {
    position: relative;
    width: 480px;
    max-height: 100%;
    overflow-y: auto;
}

/* Pages outside the portal have no nav menu: messages are fixed to the viewport, full width. */
.instant-messages__page {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 100000000;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.instant-messages__page.--top {
    top: 0;
}
.instant-messages__page.--bottom {
    bottom: 0;
}
.instant-messages__page .instant-message {
    pointer-events: auto;
}

/* Mobile layout: the page content's 16px inset. The header is hidden and the menu button floats
   over the 64px page title bar, so the top cards go under that bar instead of covering the button. */
@media all and (max-width: 767px) {
    .instant-message__float-list {
        left: 16px;
        right: 16px;
    }
    .main-content .instant-message__float-anchor.--top .instant-message__float-list {
        top: 72px;
    }
}

/* ---- Instant messages admin page ---- */
.instant-messages__content {
    height: 100%;
    padding-inline: 24px;
    padding-bottom: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.instant-messages__card,
.instant-messages__empty {
    max-width: unset;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.instant-messages__card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.instant-messages__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 24px;
}
.instant-messages__status.--active {
    background: var(--success-subdued);
    color: var(--success);
}
.instant-messages__status.--scheduled {
    background: var(--primary-40);
    color: var(--primary-800);
}
.instant-messages__status.--expired {
    background: var(--basic-200);
    color: var(--basic-600);
}

/* ---- Instant message edit modal ---- */
.instant-message-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.instant-message-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .instant-message-form__row {
        grid-template-columns: 1fr;
    }
}
.instant-message-form__schedule {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.instant-message-form__time,
.instant-message-form__company {
    display: flex;
    align-items: center;
    gap: 8px;
}
.instant-message-form__time > :first-child,
.instant-message-form__company > :first-child {
    flex: 1;
    min-width: 0;
}
.instant-message-form__clear {
    flex: none;
}

/* ---- Instant message dismissals modal ---- */
.instant-message-dismissals {
    max-height: 60vh;
    overflow: auto;
}
.instant-message-dismissals table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.instant-message-dismissals th,
.instant-message-dismissals td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--basic-200);
    white-space: nowrap;
}
.instant-message-dismissals th {
    position: sticky;
    top: 0;
    background: var(--basic-0);
    color: var(--basic-600);
    font-weight: 600;
}
.instant-message-dismissals__client {
    font-family: monospace;
}
.instant-message-form__translations-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.instant-message-form__json {
    font-family: monospace;
    min-height: 200px;
}
/* The example inside the translations tooltip; the tooltip itself centers its text. */
.instant-message-form__json-tip {
    text-align: left;
    max-width: 360px;
}
.instant-message-form__json-tip pre {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 16px;
    white-space: pre;
}
