/* Component ownership: modal.css */

body.app-shell:not(.app-shell--default) .erp-modal {
  position: fixed;
  inset: 0;
  z-index: 1150;
}

body.app-shell:not(.app-shell--default) .erp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.44);
}

body.app-shell:not(.app-shell--default) .erp-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  overflow: auto;
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  background: var(--erp-surface);
  box-shadow: var(--erp-shadow);
}

body.app-shell:not(.app-shell--default) .erp-modal--small .erp-modal__dialog { width: min(420px, calc(100vw - 32px)); }
body.app-shell:not(.app-shell--default) .erp-modal--medium .erp-modal__dialog { width: min(720px, calc(100vw - 32px)); }
body.app-shell:not(.app-shell--default) .erp-modal--large .erp-modal__dialog { width: min(980px, calc(100vw - 32px)); }
body.app-shell:not(.app-shell--default) .erp-modal--full .erp-modal__dialog { width: calc(100vw - 24px); height: calc(100vh - 24px); }

body.app-shell:not(.app-shell--default) .erp-modal__header,
body.app-shell:not(.app-shell--default) .erp-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--erp-line-soft);
}

body.app-shell:not(.app-shell--default) .erp-modal__footer {
  border-top: 1px solid var(--erp-line-soft);
  border-bottom: 0;
}

body.app-shell:not(.app-shell--default) .erp-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

body.app-shell:not(.app-shell--default) .erp-modal__body {
  padding: 1rem;
}

body.app-shell:not(.app-shell--default) .modal-content {
  color: var(--erp-text);
  background-color: var(--erp-surface);
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius-sm);
  box-shadow: var(--erp-shadow);
}
