/* Replay upload page */
.rp {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 16px 48px;
}
/* Sections below use display flex, which would otherwise override the hidden attribute */
.rp [hidden] {
	display: none !important;
}
.rp-header h1 {
	margin: 24px 0 4px;
	font-size: 1.8rem;
}
.rp-muted {
	color: #a9adb3;
}
.rp-drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	margin: 16px 0;
	padding: 32px 16px;
	border: 2px dashed #4d535b;
	border-radius: 14px;
	background: #2b2f34;
	text-align: center;
	cursor: pointer;
}
.rp-drop:hover, .rp-drop.dragging {
	border-color: #3987e5;
}
/* The input covers the zone so drag and drop works natively */
.rp-drop input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}
.rp-drop-title {
	font-size: 1.2rem;
}
.rp-defaults {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}
.rp-defaults input, .rp-defaults select, .rp-table input, .rp-table select {
	width: auto;
	margin: 0;
	padding: 5px 8px;
	color-scheme: dark;
}
.rp-defaults button, .rp-table button, .rp-preview button {
	margin: 0;
	padding: 5px 10px;
	border: 1px solid #454a51;
	border-radius: 6px;
	background: #2b2f34;
	color: #f0efec;
	cursor: pointer;
}
.rp-table button.active, .rp-preview button.active {
	border-color: #3987e5;
	background: #1c5cab;
}

/* Preview: the web viewer in an iframe, 4:3 like the game */
.rp-names {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
}
.rp-names-label {
	margin-right: 4px;
}
.rp-names-hint {
	flex-basis: 100%;
	font-size: 0.8rem;
}
.rp-chip {
	margin: 0 4px 4px 0;
	padding: 3px 12px;
	border: 1px solid #454a51;
	border-radius: 14px;
	background: #2b2f34;
	color: #f0efec;
	cursor: pointer;
}
.rp-chip:hover {
	border-color: #3987e5;
}
/* Filled in from an earlier game of the same set */
.rp-name.rp-autofilled {
	color: #86b6ef;
	font-style: italic;
}
.rp-preview {
	margin-bottom: 16px;
	padding: 10px;
	border-radius: 12px;
	background: #2b2f34;
}
.rp-preview-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}
.rp-preview-head #RpPreviewTitle {
	font-weight: bold;
}
.rp-preview-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}
.rp-preview iframe {
	display: block;
	width: 100%;
	height: min(80vh, 760px);
	border: none;
	border-radius: 8px;
	background: #0d0d14;
}

.rp-table-wrap {
	overflow-x: auto;
}
.rp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}
.rp-table th {
	padding: 6px 8px !important;
	text-align: left;
	font-weight: normal;
	color: #8d9198;
	white-space: nowrap;
}
.rp-table td {
	padding: 6px 8px !important;
	border-top: 1px solid rgba(255, 255, 255, 0.07);
	vertical-align: middle;
}
.rp-table tr.rp-previewing td {
	background: rgba(57, 135, 229, 0.12);
}
.rp-table tr.rp-pending-row td {
	color: #8d9198;
}
.rp-player-inner {
	display: flex;
	align-items: center;
	gap: 6px;
}
.rp-portrait {
	width: 30px;
	height: auto;
	aspect-ratio: 58 / 72;
	border-radius: 3px;
}
.rp-moon {
	width: 16px;
	height: 16px;
}
.rp-char {
	font-size: 0.8rem;
	color: #a9adb3;
}
.rp-name {
	width: 150px !important;
}
.rp-winner .rp-char {
	color: #86b6ef;
	font-weight: bold;
}
.rp-winner .rp-char::after {
	content: " (winner)";
	font-weight: normal;
}
.rp-vs {
	color: #8d9198;
}
.rp-result {
	white-space: nowrap;
}
.rp-result button {
	margin-right: 4px !important;
}
.rp-result.rp-needs button {
	border-color: #c98500;
}
.rp-auto {
	color: #86b6ef;
}
.rp-warn {
	margin-top: 4px;
	font-size: 0.75rem;
	white-space: normal;
	color: #e0a84a;
}
.rp-error {
	color: #e66767;
	white-space: normal;
}
.rp-tags {
	width: 140px !important;
}
.rp-actions {
	white-space: nowrap;
}
.rp-remove {
	color: #e66767 !important;
}
.rp-footer {
	position: sticky;
	bottom: 0;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 16px;
	margin-top: 12px;
	padding: 12px 0;
	background: var(--default-bg, #25282c);
}
.rp-footer button {
	margin: 0;
}
.rp-footer button:disabled {
	opacity: 0.5;
	cursor: default;
}
.rp-message {
	padding: 12px 16px;
	border-radius: 10px;
	background: #2b2f34;
}
.rp-message.rp-error {
	background: #3a2a2c;
}
