/* Author / affiliation edit modals (formatter-style) */

.entity-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 40, 60, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.entity-modal-panel {
  width: 100%;
  max-width: 520px;
  max-height: min(90vh, 720px);
  background: #e8e8e8;
  border: 1px solid #b0b8bf;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: "Open Sans", system-ui, sans-serif;
}

.entity-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 12px;
  background: #d8d8d8;
  border-bottom: 3px solid #005274;
}

.entity-modal-heading {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: #1c1d1e;
}

.entity-modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #6c757d;
  cursor: pointer;
  padding: 0 4px;
}

.entity-modal-close:hover {
  color: #1c1d1e;
}

.entity-modal-body {
  padding: 16px 20px 8px;
  overflow-y: auto;
  flex: 1;
}

.entity-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 16px;
  background: #e0e0e0;
  border-top: 1px solid #c8c8c8;
}

.entity-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #1c1d1e;
}

.entity-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.entity-input {
  font-weight: 400;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid #adb5bd;
  border-radius: 3px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.entity-input:focus {
  outline: 2px solid #005274;
  border-color: #005274;
}

.entity-hint {
  font-size: 11px;
  font-weight: 400;
  color: #6c757d;
}

.entity-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.entity-affil-picker {
  margin: -6px 0 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.entity-affil-chip {
  border: 1px solid #005274;
  background: #fff;
  color: #005274;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
}

.entity-affil-chip:hover {
  background: #005274;
  color: #fff;
}

.entity-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
}

.entity-btn--primary {
  background: #005274;
  color: #fff;
  border-color: #005274;
}

.entity-btn--primary:hover {
  background: #003d56;
}

.entity-btn--ghost {
  background: #fff;
  color: #005274;
  border-color: #adb5bd;
}

.entity-btn--ghost:hover {
  background: #f5f8fa;
}
