/* Shared styles for IFS Catalog components */
.modalRoot {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2000;
}

.modalContainer {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  width: 90vw;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.modalActions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
}

.formRow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.formLabel {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}

.pageHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
}

.cardTitleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.cardTitleSearchContainer {
  min-width: 260px;
  max-width: 360px;
}

.headingLarge {
  font-family: 'Titillium Web, sans-serif';
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.2;
  margin: 0;
}

.backTitleContainer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.backLink {
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}

.contentWrap {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.gridFullWidth {
  width: 100%;
}

.formSection {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.leftCol {
  flex-basis: 30%;
  max-width: 30%;
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.rightCol {
  flex-basis: 70%;
  max-width: 70%;
}

.columnStack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.leftStack {
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.rightStack {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-right: 4px;
}

/* Flex gap fallback for Safari */
.columnStack > * + * {
  margin-top: 16px;
}

.cardTitleSmall {
  font-size: 1rem;
}

.aboutGrid {
  display: block;
  font-size: 0.9rem;
}

.aboutRow {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}

.aboutLabel {
  color: #333;
  font-weight: 600;
}

.aboutSectionValueWithIcon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.aboutLifecycleActions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aboutLifecycleLabel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.aboutValue {
  color: #111;
}

.aboutSection {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aboutSectionHeader {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aboutSectionKind {
  font-size: 1rem;
  color: #111;
  font-weight: 500;
  word-break: break-word;
}

.aboutSectionName {
  font-size: 0.75rem;
  font-weight: 500;
}

.aboutSectionDivider {
  height: 1px;
  background: #e5e7eb;
}

.aboutSectionBlock {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aboutSectionRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.aboutSectionCell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.aboutSectionLabel {
  font-size: 0.75rem;
  font-weight: 500;
}

.aboutSectionValue {
  color: #111;
  word-break: break-word;
}

.aboutSectionTags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .aboutSectionRow {
    grid-template-columns: 1fr;
  }
}

.linksText {
  font-size: 0.9rem;
}

.linksList {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.linksList li {
  white-space: normal;
}

.linkRow {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  min-width: 0;
}

.linkUrl {
  font-size: 0.825rem;
  display: inline-block;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}

.linkTitle {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.825rem;
}

.linkTitleClickable {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.linkTitleClickable:hover {
  text-decoration: underline;
}

.linkDivider {
  height: 1px;
  background: #e5e7eb;
  margin: 8px 0;
}

.inlineActionButton {
  padding: 2px 10px !important;
  min-width: auto !important;
  text-transform: none !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
  margin: 0 6px !important;
}

.tableText {
  font-size: 0.9rem;
}

.fullWidth {
  width: 100%;
}

.filterMenu {
  padding: 8px;
  min-width: 220px;
}

.filterActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.headerActions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ifsCatalogAddButton {
  background-color: #000 !important;
  color: #fff !important;
  text-transform: none !important;
}

.ifsCatalogAddButton:hover {
  background-color: #111 !important;
}

.padBottom16 {
  padding-bottom: 16px;
}

.pad16 {
  padding: 16px;
}

.infoCardFixed {
  min-height: auto;
  display: flex;
  flex-direction: column;
}

.infoCardFixed .MuiCardContent-root {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.compactCard {
  min-height: auto;
}

.subComponentsCard.compactCard {
  min-height: 0;
}

.subComponentsCard.compactCard .MuiCardContent-root {
  flex: 0;
  padding: 8px 12px;
}

.subComponentsCard.compactCard .tableText {
  flex: 0;
  min-height: 0;
}

.subComponentsCard.compactCard .emptyState {
  min-height: 0;
  padding: 8px 0;
}

.subComponentsCard.compactCard .card-content {
  padding: 8px 12px;
}

/* .aboutCard,
.linksCard {
  min-height: 220px;
} */

/* .dataCard {
  min-height: 320px;
} */

/* Details page: allow cards to size to content */
.aboutCard,
.relationshipsCard {
  min-height: auto;
}

.relationshipsCard .MuiCardContent-root {
  overflow: auto;
}

/* Relationships: center empty states inside tab content */
.relationshipsCard .tableText {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.relationshipsCard .emptyState {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: #6b7280;
}

/* Relations graph: force the header title to match other section headings */
.graphCard > div > div > div > span {
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

/* Listing table card header styling (Catalog page) */
.listingInfoCard .MuiCardHeader-root {
  border-bottom: none !important;
  padding: 5px !important;
}

.listingInfoCard .MuiCardContent-root {
  padding-top: 8px !important;
}

.listingTitle {
  font-size: 16px !important;
  font-weight: 600;
}

.listingCount {
  font-weight: 600;
  color: #6b7280;
}

/* Proposal modal */
.proposal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2000;
  background-color: rgba(0, 0, 0, 0.4);
}

.proposal-container {
  background: #fff;
  width: 100%;
  max-width: 740px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  position: relative;
}

.proposal-close {
  position: absolute !important;
  top: 8px;
  right: 8px;
  color: #1a1a1a !important;
  z-index: 2;
}

.proposal-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 16px;
}

.proposal-header {
  margin-bottom: 16px;
}

.proposal-kind {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.proposal-entity {
  font-size: 18px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.4;
}

.proposal-divider {
  border: none;
  border-top: 1.5px dashed #c9cdd4;
  margin: 0 0 22px 0;
}

.proposal-section {
  margin-bottom: 22px;
}

.proposal-label {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 5px;
}

.proposal-value {
  font-size: 16px;
  font-weight: 400;
  color: #1a1a1a;
}

.proposal-string-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proposal-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proposal-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border: 1px solid #c9cdd4;
  border-radius: 12px;
  background: #fff;
  color: #1a1a1a;
  font-size: 13px;
  line-height: 22px;
}

.proposal-link-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proposal-link {
  color: #1d6fcf;
  font-size: 14px;
  text-decoration: none;
  word-break: break-all;
  line-height: 1.5;
}

.proposal-reject {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-left: 3px solid #e53e3e;
  background: #fff5f5;
  border-radius: 0 4px 4px 0;
  margin-bottom: 22px;
}

.proposal-reject-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.proposal-reject-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.proposal-reject-label {
  font-size: 12px;
  font-weight: 700;
  color: #c53030;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.proposal-reject-text {
  margin-top: -3px;
  font-size: 13px;
  color: #742a2a;
  line-height: 1.6;
  font-weight: 400;
}

.proposal-desc-text {
  font-size: 15px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.55;
}

.proposal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 22px;
  column-gap: 48px;
  margin-bottom: 22px;
}

.proposal-remarks-block {
  margin-bottom: 24px;
}

.proposal-remarks-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.proposal-required {
  color: #dc2626;
}

.proposal-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #c9cdd4;
  border-radius: 4px;
  font-size: 14px;
  color: #1a1a1a;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  background: #fff;
}

.proposal-remark-helper {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.proposal-saved-remarks {
  margin-bottom: 24px;
}

.proposal-saved-remarks-text {
  font-size: 14px;
  color: #1a1a1a;
  line-height: 1.6;
}

.proposal-footer {
  flex-shrink: 0;
  padding: 12px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  background: #fff;
}

.proposal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 20px;
  border: 1.5px solid transparent;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.proposal-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.proposal-action-approve {
  color: #1e7e34;
  border-color: #1e7e34;
}

.proposal-action-reject {
  color: #c0392b;
  border-color: #c0392b;
}

/* Tables: align sort icon to the end for WDP data table headers */
.wdp-dt-headerSortCell {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.wdp-dt-headerSortName {
  flex: 1;
  min-width: 0;
}

.wdp-dt-headerSortCell > span:last-child {
  display: inline-flex;
  margin-left: auto;
}

/* Add Catalog - Links section */
.links-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.links-title {
  margin-bottom: 0;
}

.links-add-btn {
  border: 1px solid #d1d5db !important;
  width: 32px;
  height: 32px;
}

.links-add-icon {
  font-weight: 700;
  font-size: 16px;
}

.links-remove-wrap {
  display: flex;
  align-items: flex-start;
  height: 100%;
  margin-top: -8px;
}

.links-remove-icon {
  color: #7a7a7a;
}

.links-max-note {
  margin-top: 8px;
  color: #6b6b6b;
}

.listingInfoCard .MuiCardHeader-title {
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* WDP ClientDataTable adds a bordered container; remove it for listing tables */
.listingInfoCard .wdp-table-container.border-steel-grey {
  border: none !important;
}

.wdp-dt-row .wdp-dt-cell,
.wdp-dt-headerRow > .wdp-dt-cell {
  display: flex;
  padding: 8px;
  align-items: center;
  gap: 10px;
  flex: 1 0 0;
  align-self: stretch;
}

/* Make Catalog/Proposals tabs wider for better label+count fit */
.tabs.left.boxed li {
  width: 180px;
  max-width: 180px;
}
