/*
 * Player reports: the Report Player modal and the report cards of the gamemasters' Reports channel.
 * Same look as the Edit Hotkey modal (see hotbar.css); the reported player uses the danger colors of theme.css
 */

#report-modal {
  width: 400px;
  max-width: 90vw;
}

/* The reported player: a flag and the name in a dark red panel */
.report-target {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid black;
  border-radius: 6px;
  background-image: linear-gradient(to right, var(--color-danger-haze), rgba(0, 0, 0, 0.25));
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
}

.report-target-icon {
  flex: 0 0 auto;
  font-size: 24px;
  color: var(--color-danger);
  text-shadow: 0 0 6px var(--color-danger-glow);
}

.report-target-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.report-target-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
}

.report-target-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: bold;
  color: white;
}

.report-label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
}

.report-optional {
  font-weight: normal;
  font-size: 10px;
  color: var(--color-text-muted);
}

/* Reasons: two columns of selectable entries, "Other" (the last one) takes the whole row */
.report-reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 10px;
}

button.report-reason {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 8px;
  min-height: 30px;
  font-size: 11px;
  text-align: left;
  color: white;
  cursor: pointer;
  border: 1px solid black;
  border-radius: 5px;
  background-image: var(--gradient-surface);
  box-shadow: var(--shadow-raised);
}

button.report-reason:last-child {
  grid-column: 1 / -1;
}

button.report-reason .material-icons {
  flex: 0 0 auto;
  font-size: 16px;
  color: var(--color-text-muted);
  pointer-events: none;
}

button.report-reason span {
  pointer-events: none;
}

button.report-reason:not(.selected):hover {
  border-color: var(--color-accent-text);
  background-image: var(--gradient-surface-hover);
}

button.report-reason.selected {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background-image: var(--gradient-accent);
  box-shadow: var(--shadow-accent);
}

button.report-reason.selected .material-icons {
  color: var(--color-accent);
}

/* The message box uses the shared look and clear button (see text-field.css) */

/* Error on the left, character counter on the right */
.report-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 14px;
  margin-top: 4px;
  font-size: 10px;
}

.report-error {
  color: var(--color-error);
}

.report-counter {
  margin-left: auto;
  color: var(--color-text-muted);
}

.report-counter.full {
  color: var(--color-warning);
}

.report-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 10px;
  color: var(--color-text-muted);
}

.report-hint .material-icons {
  font-size: 14px;
  color: var(--color-accent);
}

/* Reports channel (gamemasters): one card per open report, from the oldest to the newest */
.report-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px;
}

.report-entry {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid black;
  border-left: 3px solid var(--color-danger);
  border-radius: 6px;
  background-image: linear-gradient(to right, var(--color-danger-haze), rgba(0, 0, 0, 0.3) 45%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.report-entry-header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.report-entry-icon {
  flex: 0 0 auto;
  font-size: 16px;
  color: var(--color-danger);
}

.report-entry-reported {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: bold;
  font-size: 13px;
  color: white;
}

.report-entry-time {
  flex: 0 0 auto;
  font-size: 10px;
  color: var(--color-text-muted);
}

/* The reason of a report: a small red tag above the message */
.report-entry-reason {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 5px;
  font-size: 10px;
  font-weight: bold;
  color: white;
  border: 1px solid var(--color-danger-dark);
  border-radius: 4px;
  background-color: var(--color-danger-darker);
}

.report-entry-reason .material-icons {
  font-size: 13px;
  color: var(--color-danger);
}

.report-entry-message {
  padding: 5px 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #e6e6e6;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  user-select: text;
}

.report-entry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.report-entry-reporter {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  color: var(--color-text-muted);
}

.report-entry-name {
  font-weight: bold;
  color: var(--color-accent-text);
}

/* Mark as Solved: the first click asks for a second click to confirm, with the shared look of two-click actions (--color-confirming) */
button.report-entry-solve {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 3px 8px 3px 6px;
  font-size: 10px;
  border: 1px solid black;
  border-radius: 5px;
  background-image: var(--gradient-surface);
  box-shadow: var(--shadow-raised);
}

button.report-entry-solve .material-icons {
  font-size: 14px;
  color: var(--color-success);
}

button.report-entry-solve:not(:disabled):hover {
  border-color: var(--color-accent);
  background-image: var(--gradient-accent);
  box-shadow: var(--shadow-accent);
}

button.report-entry-solve.confirming {
  border-color: var(--color-confirming);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 6px var(--color-confirming);
}

button.report-entry-solve.confirming,
button.report-entry-solve.confirming .material-icons {
  color: var(--color-confirming);
}

button.report-entry-solve:disabled,
button.report-entry-solve:disabled:hover {
  cursor: default;
  opacity: 0.6;
  border-color: black;
  box-shadow: var(--shadow-raised);
}
