/* Report visibility and team collaboration controls. */

.report-team-share-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.report-team-share-choice:hover,
.report-team-share-choice:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 10%);
}

.report-team-share-choice.is-selected {
  border-color: rgb(37 99 235 / 42%);
  background: #eff6ff;
}

.report-team-share-choice input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: #2563eb;
}

.report-team-share-choice-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.report-team-share-choice-copy strong {
  color: #0f172a;
  font-size: 0.94rem;
}

.report-team-share-choice-copy small {
  color: #64748b;
  line-height: 1.45;
}

.report-team-share-choice-state,
.report-shared-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.73rem;
  font-weight: 800;
  white-space: nowrap;
}

.report-team-share-choice.is-selected .report-team-share-choice-state,
.report-shared-badge {
  border-color: rgb(37 99 235 / 24%);
  background: #dbeafe;
  color: #1d4ed8;
}

.report-access-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 0 0 18px;
  padding: 15px 17px;
  border: 1px solid #cbd5e1;
  border-radius: 15px;
  background: linear-gradient(135deg, #f8fafc, #fff);
}

.report-access-bar.is-shared {
  border-color: rgb(37 99 235 / 30%);
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.report-access-bar.is-partial {
  border-color: rgb(217 119 6 / 35%);
  background: linear-gradient(135deg, #fffbeb, #fff);
}

.report-access-main,
.report-access-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.report-access-heading,
.report-access-actions,
.review-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.report-access-heading strong {
  color: #0f172a;
  font-size: 0.96rem;
}

.report-access-copy p,
.report-access-message,
.review-report-provenance {
  margin: 0;
  color: #64748b;
  font-size: 0.83rem;
  line-height: 1.45;
}

.report-access-message.is-error {
  color: #b91c1c;
}

.report-access-message.is-success {
  color: #047857;
}

.report-access-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.report-access-bar.is-shared .report-access-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.report-access-bar.is-partial .report-access-badge {
  background: #fef3c7;
  color: #92400e;
}

.report-access-actions {
  justify-content: flex-end;
}

.report-access-actions .btn {
  white-space: nowrap;
}

.review-report-provenance {
  margin-top: 5px;
  color: #475569;
}

.review-open-report {
  align-self: flex-start;
}

#resultPanel[data-report-can-review="false"] .review-workbench .item-review-status,
#resultPanel[data-report-can-review="false"] .review-workbench .item-review-note,
#resultPanel[data-report-can-review="false"] .review-workbench .review-item-checkbox,
#resultPanel[data-report-can-review="false"] .review-workbench .save-review-note-btn,
#resultPanel[data-report-can-review="false"] .bulk-review-bar,
#resultPanel[data-report-can-review="false"] .audit-status-actions {
  cursor: not-allowed;
  opacity: 0.58;
}

#resultPanel[data-report-owner="false"] .output-editor {
  background: #f8fafc;
}

@media (max-width: 720px) {
  .report-team-share-choice,
  .report-access-bar {
    grid-template-columns: 1fr;
  }

  .report-team-share-choice {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .report-team-share-choice-state {
    grid-column: 2;
    justify-self: start;
  }

  .report-access-actions {
    justify-content: flex-start;
  }

  .review-open-report {
    width: 100%;
    justify-content: center;
  }
}
