/* TASK 8A · 加入项目 / 招募 / 邀请闭环
   只服务科创广场流程层，不覆盖全局 drawer / modal / input / button。 */

.plaza-flow-layer[hidden],
.plaza-review-layer[hidden] {
  display: none !important;
}

body.plaza-flow-open {
  overflow: hidden;
}

.plaza-flow-layer,
.plaza-review-layer {
  position: fixed;
  inset: 0;
  z-index: 1400;
}

.plaza-flow-overlay,
.plaza-review-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(20, 24, 35, 0.18);
  cursor: default;
}

.plaza-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, calc(100vw - 44px));
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: #fff;
  border-left: 1px solid #d5d9e2;
  box-shadow: -18px 0 42px rgba(21, 27, 45, 0.08);
  transform: translateX(0);
  animation: plazaDrawerIn 210ms ease both;
  outline: none;
}

@keyframes plazaDrawerIn {
  from { transform: translateX(24px); opacity: 0.45; }
  to { transform: translateX(0); opacity: 1; }
}

.plaza-drawer-head,
.plaza-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px 22px;
  border-bottom: 1px solid #d5d9e2;
}

.plaza-drawer-kicker {
  margin: 0 0 5px;
  color: #757b89;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.plaza-drawer-head h2,
.plaza-review-head h2 {
  margin: 0;
  color: #181b22;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

.plaza-drawer-close,
.plaza-review-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #676d7b;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.plaza-drawer-close:hover,
.plaza-review-close:hover {
  background: #f5f6f8;
  color: #242832;
}

.plaza-drawer-context {
  padding: 17px 28px;
  border-bottom: 1px solid #e3e6ec;
  background: #fbfbfc;
}

.plaza-drawer-context strong {
  display: block;
  color: #23262e;
  font-size: 15px;
  line-height: 1.45;
}

.plaza-drawer-context span {
  display: block;
  margin-top: 4px;
  color: #737987;
  font-size: 13px;
  line-height: 1.5;
}

.plaza-drawer-body {
  min-height: 0;
  overflow-y: auto;
  padding: 8px 28px 28px;
  overscroll-behavior: contain;
}

.plaza-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 28px;
  border-top: 1px solid #d5d9e2;
  background: #fff;
}

.plaza-flow-section {
  padding: 24px 0;
  border-bottom: 1px solid #d5d9e2;
}

.plaza-flow-section:last-child {
  border-bottom: 0;
}

.plaza-flow-section h3 {
  margin: 0 0 14px;
  color: #20242c;
  font-size: 15px;
  font-weight: 700;
}

.plaza-flow-section p {
  margin: 0;
  color: #616775;
  font-size: 14px;
  line-height: 1.7;
}

.plaza-flow-label {
  display: grid;
  gap: 8px;
  color: #2b2f38;
  font-size: 14px;
  font-weight: 650;
}

.plaza-flow-label + .plaza-flow-label {
  margin-top: 20px;
}

.plaza-flow-label input,
.plaza-flow-label textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfd4df;
  border-radius: 9px;
  background: #fff;
  color: #1f232b;
  font: inherit;
  font-weight: 400;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.plaza-flow-label input {
  min-height: 42px;
  padding: 0 12px;
}

.plaza-flow-label textarea {
  min-height: 116px;
  padding: 11px 12px;
  line-height: 1.6;
  resize: vertical;
}

.plaza-flow-label input:focus,
.plaza-flow-label textarea:focus {
  border-color: #6d63d9;
  box-shadow: 0 0 0 3px rgba(109, 99, 217, 0.09);
}

.plaza-flow-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  color: #2c3038;
  font-size: 14px;
}

.plaza-flow-check + .plaza-flow-check {
  margin-top: 13px;
}

.plaza-flow-check input {
  margin: 2px 0 0;
}

.plaza-flow-check span small {
  display: block;
  margin-top: 2px;
  color: #858b98;
  font-size: 12px;
  line-height: 1.5;
}

.plaza-flow-gate {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 0 0;
}

.plaza-flow-gate-mark {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf7f1;
  color: #2c7b51;
  font-size: 12px;
  font-weight: 800;
}

.plaza-flow-gate.is-blocked .plaza-flow-gate-mark {
  background: #f7f1f1;
  color: #986060;
}

.plaza-flow-gate strong {
  display: block;
  margin-bottom: 3px;
  color: #2a2e36;
  font-size: 14px;
}

.plaza-flow-gate span {
  color: #747a87;
  font-size: 13px;
  line-height: 1.55;
}

.plaza-flow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.plaza-flow-tag {
  padding: 4px 8px;
  border: 1px solid #d9dde6;
  border-radius: 6px;
  color: #555c69;
  background: #fff;
  font-size: 12px;
  line-height: 1.4;
}

.plaza-flow-error {
  margin: 14px 0 0;
  padding: 9px 11px;
  border-left: 2px solid #b65757;
  background: #fbf6f6;
  color: #8b4545;
  font-size: 13px;
  line-height: 1.55;
}

.plaza-flow-success {
  padding: 56px 4px 24px;
  text-align: center;
}

.plaza-flow-success-mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border: 1px solid #b8dac6;
  border-radius: 50%;
  color: #347756;
  font-size: 21px;
  font-weight: 700;
}

.plaza-flow-success h3 {
  margin: 0 0 9px;
  color: #1f232b;
  font-size: 20px;
}

.plaza-flow-success p {
  max-width: 330px;
  margin: 0 auto;
  color: #737986;
  font-size: 14px;
  line-height: 1.65;
}

.plaza-invite-search {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 20px 0 12px;
  background: #fff;
}

.plaza-invite-list {
  border-top: 1px solid #d5d9e2;
}

.plaza-invite-person {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid #e1e4ea;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.plaza-invite-person:hover:not(:disabled) {
  background: #fafafd;
}

.plaza-invite-person.is-selected {
  background: #f7f6fd;
}

.plaza-invite-person:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.plaza-invite-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #d9dde6;
  border-radius: 50%;
  background: #f6f7f9;
  color: #555d6b;
  font-size: 14px;
  font-weight: 700;
}

.plaza-invite-copy {
  min-width: 0;
}

.plaza-invite-copy strong {
  display: block;
  overflow: hidden;
  color: #242831;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plaza-invite-copy span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #7a808d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plaza-invite-state {
  color: #6760b5;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.plaza-invite-person:disabled .plaza-invite-state {
  color: #8a909b;
}

.plaza-review-layer {
  z-index: 1460;
  display: grid;
  place-items: center;
  padding: 24px;
}

.plaza-review-overlay {
  background: rgba(20, 24, 35, 0.22);
}

.plaza-review-modal {
  position: relative;
  width: min(500px, calc(100vw - 40px));
  max-height: min(720px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #d5d9e2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(24, 29, 46, 0.16);
  outline: none;
}

.plaza-review-head {
  padding: 22px 24px 18px;
}

.plaza-review-body {
  overflow-y: auto;
  padding: 22px 24px;
}

.plaza-review-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 24px;
  border-top: 1px solid #d5d9e2;
}

.plaza-review-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.plaza-review-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f3f4f7;
  color: #555d6b;
  font-weight: 700;
}

.plaza-review-person strong {
  display: block;
  color: #252932;
  font-size: 15px;
}

.plaza-review-person span {
  display: block;
  margin-top: 3px;
  color: #7b818d;
  font-size: 12px;
}

.plaza-review-message {
  margin: 0;
  padding: 14px 0 20px;
  border-top: 1px solid #e1e4ea;
  border-bottom: 1px solid #e1e4ea;
  color: #4f5663;
  font-size: 14px;
  line-height: 1.7;
}

.plaza-review-meta {
  display: grid;
  gap: 9px;
  padding-top: 18px;
}

.plaza-review-meta div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  font-size: 13px;
}

.plaza-review-meta dt {
  color: #8a909b;
}

.plaza-review-meta dd {
  margin: 0;
  color: #454b56;
}

#view-project-detail .plaza-request-review {
  min-width: auto;
  padding-inline: 10px;
  white-space: nowrap;
}

@media (max-width: 1700px) {
  .plaza-drawer {
    width: min(460px, calc(100vw - 40px));
  }
}

@media (max-width: 1420px) {
  .plaza-drawer {
    width: min(430px, calc(100vw - 34px));
  }
}

@media (max-width: 760px) {
  .plaza-drawer {
    width: min(96vw, 520px);
  }

  .plaza-drawer-head,
  .plaza-drawer-context,
  .plaza-drawer-body,
  .plaza-drawer-foot {
    padding-left: 20px;
    padding-right: 20px;
  }

  .plaza-review-layer {
    padding: 16px;
  }

  .plaza-review-modal {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plaza-drawer {
    animation: none;
  }
}
