/* XCPCIO-style submission status rendering: enum class on table cells. */
:root {
  --yc-xcpc-status-accepted: #37da58;
  --yc-xcpc-status-wrong-answer: #ff4545;
  --yc-xcpc-status-runtime-error: darkorchid;
  --yc-xcpc-status-time-limit-exceeded: sandybrown;
  --yc-xcpc-status-memory-limit-exceeded: sandybrown;
  --yc-xcpc-status-compilation-error: #1679dc;
  --yc-xcpc-status-partially-correct: #01bab2;
  --yc-xcpc-status-running: #66ccff;
  --yc-xcpc-status-waiting: grey;
  --yc-xcpc-status-unknown: #000;
}

html[data-bs-theme="dark"],
body[data-bs-theme="dark"],
body.dark {
  --yc-xcpc-status-runtime-error: #bc35ff;
  --yc-xcpc-status-time-limit-exceeded: #ff9840;
  --yc-xcpc-status-memory-limit-exceeded: #ff9840;
  --yc-xcpc-status-unknown: #fff;
}

.yc-status-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
}

.yc-status-table thead {
  background: #f9fafb;
  color: #374151;
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.yc-status-table th {
  padding: 14px 16px;
  font-weight: 800;
  text-align: center;
}

.yc-status-table td {
  border-top: 1px solid #e5e7eb;
  padding: 16px;
  text-align: center;
}

.yc-status-table tbody tr {
  background: #fff !important;
}

.yc-status-table tbody tr:nth-child(even) {
  background: #f9fafb !important;
}

.yc-result-cell.yc-status {
  border-color: #e5e7eb !important;
  background: transparent !important;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center !important;
  white-space: nowrap;
}

.yc-result-cell.yc-status a {
  display: block;
  color: inherit !important;
  text-decoration: none !important;
}

.yc-status-text,
.yc-status-inline,
.yc-status-sample {
  color: inherit;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  font-weight: 900;
  line-height: 1.2;
}

.yc-status-inline,
.yc-status-sample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  white-space: nowrap;
}

.yc-result-guide {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 12px 0 14px;
  color: #606b78;
  font-size: 16px;
  font-weight: 800;
}

.yc-result-guide-title {
  margin-right: 0;
  color: #4d5967;
  font-weight: 900;
}

.yc-result-guide .yc-status {
  font-size: 16px;
}

.yc-result-guide-notice {
  align-items: flex-start;
  gap: 8px 18px;
  margin: 12px 0 14px;
}

.yc-result-guide-notice .yc-result-guide-title {
  width: 100%;
}

.yc-result-guide-notice .yc-status {
  font-size: 15px;
}

.yc-status-meaning {
  color: #606b78;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans SC",
    "Microsoft YaHei",
    sans-serif;
  font-size: 14px;
  font-weight: 750;
}

.yc-status.ACCEPTED,
.yc-status.CORRECT {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--yc-xcpc-status-accepted) !important;
}

.yc-status.WRONG_ANSWER,
.yc-status.REJECTED,
.yc-status.NO_OUTPUT,
.yc-status.HACKED {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--yc-xcpc-status-wrong-answer) !important;
}

.yc-status.RUNTIME_ERROR {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--yc-xcpc-status-runtime-error) !important;
}

.yc-status.TIME_LIMIT_EXCEEDED {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--yc-xcpc-status-time-limit-exceeded) !important;
}

.yc-status.MEMORY_LIMIT_EXCEEDED,
.yc-status.OUTPUT_LIMIT_EXCEEDED {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--yc-xcpc-status-memory-limit-exceeded) !important;
}

.yc-status.COMPILATION_ERROR,
.yc-status.PRESENTATION_ERROR {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--yc-xcpc-status-compilation-error) !important;
}

.yc-status.PARTIALLY_CORRECT {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--yc-xcpc-status-partially-correct) !important;
}

.yc-status.WAITING,
.yc-status.PENDING {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--yc-xcpc-status-waiting) !important;
}

.yc-status.RUNNING,
.yc-status.JUDGING,
.yc-status.COMPILING {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--yc-xcpc-status-running) !important;
}

.yc-status.UNKNOWN,
.yc-status.UNDEFINED,
.yc-status.TOO_LATE,
.yc-status.ABORTED {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--yc-xcpc-status-unknown) !important;
}

.yc-status-table .yc-result-cell.yc-status {
  border-color: #e5e7eb !important;
}

@media (max-width: 720px) {
  .yc-result-guide {
    gap: 10px;
    font-size: 14px;
  }

  .yc-result-guide-title {
    width: 100%;
  }

  .yc-result-cell.yc-status {
    font-size: 18px;
  }
}
