/* =====================================================================
   contact-person-dialog.css  —  global chrome overrides for
   EditContactPersonDialog (story #774).

   (1) Import ONCE globally (App.razor, right after quote-convert-dialog.css): MudDialog renders
       .mud-dialog/.mud-dialog-content/.mud-dialog-actions in an internal portal-like template, so
       EditContactPersonDialog.razor.css's ::deep rules can't reach them — same documented gotcha
       already solved for documents-dialogs.css (#705) and quote-convert-dialog.css (#707). The
       dialog sets Class="contact-person-dialog" on its <MudDialog>, a real CSS class on the
       rendered .mud-dialog paper element, reachable here.

   (2) --cpd-border / --cpd-text-strong exist because the app's theme tokens differ slightly from
       the mock's at tolerance 0 (F4): app --default-border is #f3f3f3, mock --border is #eef0f3;
       app --default-text-color is #333335, mock --text-strong is #232427 (styles.css:101-102).
       Declared on .mud-dialog.contact-person-dialog so EditContactPersonDialog.razor.css can
       inherit them without introducing a third, app-wide token.

   #790 removed the preview block and with it the dialog-scoped 800-weight font faces it alone
   used (see git history / ContactPersonDialogCssGuardTests for details). */

.mud-dialog.contact-person-dialog {
  --cpd-border: #eef0f3;       /* mock --border; app --default-border is #f3f3f3 (styles.css:102) */
  --cpd-text-strong: #232427;  /* mock --text-strong; app --default-text-color is #333335 (styles.css:101) */
  max-width: 560px !important; /* beats .mud-dialog-width-md { max-width:800px !important } (styles.css:8105) */
  border: none;                /* styles.css:14473 adds 1px border */
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(20, 24, 40, .28);
  overflow: hidden;
  background: var(--custom-white);
  font-family: var(--default-font-family);
  line-height: normal;
  letter-spacing: normal;
  color: #2b2f36;              /* mock body colour */
}

.mud-dialog.contact-person-dialog .mud-dialog-title {
  padding: 18px 22px;          /* styles.css:7951 sets 1rem 1.25rem */
  margin: 0;
  border-bottom: 1px solid var(--cpd-border); /* replaces border-block-end (styles.css:7952) */
  border-radius: 0;
}

.mud-dialog.contact-person-dialog .mud-dialog-content {
  padding: 20px 22px;          /* styles.css:7947 sets 1rem */
  max-height: min(70vh, 660px);
  overflow-y: auto;
  border-radius: 0;            /* styles.css:7946 sets .5rem */
  background: var(--custom-white);
  color: inherit;              /* styles.css:7945 sets var(--default-text-color) #333335; mock inherits #2b2f36 */
}

.mud-dialog.contact-person-dialog .mud-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;          /* styles.css:7964 sets 1rem 1.25rem */
  border-top: 1px solid var(--cpd-border); /* replaces border-block-start (styles.css:7965) */
  background: var(--custom-white);
  border-radius: 0;
}

.mud-dialog.contact-person-dialog .mud-dialog-actions > * {
  margin: 0;
}

@media (max-width: 560px) {
  .mud-dialog.contact-person-dialog .mud-dialog-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}
