.customer-logo {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-surface);
    object-fit: contain;
}

.customer-logo--large {
    width: 4rem;
    height: 4rem;
}

.customer-contact {
    display: grid;
    gap: 0.125rem;
}

.customer-choices > legend {
    margin-bottom: 0.375rem;
}

.customer-facts__name {
    display: inline-block;
    max-width: 100%;
}

.customer-facts__contact {
    overflow-wrap: anywhere;
}

.customer-logo-form__file:focus-visible + .button {
    box-shadow: var(--ring);
}

.customer-choices__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.customer-address {
    white-space: pre-line;
}

.customer-logo-card__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.customer-logo-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.customer-contact-edit {
    display: inline-block;
    text-align: start;
}

.customer-contact-edit > summary {
    list-style: none;
    cursor: pointer;
}

.customer-contact-edit > summary::-webkit-details-marker {
    display: none;
}

.customer-contact-edit[open] {
    display: grid;
    gap: 0.75rem;
    min-width: min(32rem, 80vw);
    margin-top: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-surface-muted);
}

.customer-contact-edit__actions {
    display: flex;
    justify-content: flex-end;
}

.customer-notes {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.customer-note {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-line);
}

.customer-note:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.customer-note__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    color: var(--color-ink-soft);
    font-size: 0.8125rem;
}

.customer-note__remove {
    margin-inline-start: auto;
}

.customer-note__text {
    margin: 0.375rem 0 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .customer-contact-edit[open] {
        min-width: 0;
    }

    .customer-note__remove {
        margin-inline-start: 0;
    }
}

@media (min-width: 1024px) {
    #customer-tabs .tabs__list {
        gap: 0;
    }

    #customer-tabs .tabs__tab {
        gap: 0.375rem;
        padding: 0 0.5rem;
    }
}

[data-show-when][hidden] {
    display: none !important;
}

.crm-modal {
    width: min(920px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    padding: 0;
    overflow: auto;
}

.crm-modal__head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--color-surface, #fff);
    border-bottom: 1px solid var(--color-border, #dfe6ea);
}

.crm-modal__title {
    margin: 0;
}

.crm-modal__form {
    padding: 16px 20px 0;
}

.crm-modal__form .card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.crm-modal__form .card__header,
.crm-modal__form .card__body {
    padding-inline: 0;
}

.crm-modal__form .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-inline: -20px;
    padding: 12px 20px;
    background: var(--color-surface, #fff);
    border-top: 1px solid var(--color-border, #dfe6ea);
}

[data-rows-row].is-removed {
    opacity: .5;
    text-decoration: line-through;
}

.crm-row-dialog {
    width: min(720px, calc(100vw - 32px));
    max-width: none;
}

body:has(dialog.crm-modal[open]) .toasts {
    right: auto;
    left: 16px;
}

@media (max-width: 760px) {
    body:has(dialog.crm-modal[open]) .toasts {
        top: 8px;
        right: 8px;
        bottom: auto;
        left: 8px;
    }
}

.customer-logo-region {
    display: contents;
}
