/* ─── Submit page layout ───────────────────────────────────────────────────── */

.submit-page {
	background: #0a0a0a;
	min-height: 100vh;
	padding: 5rem 2rem 7rem;
}

.submit-page__inner {
	max-width: 720px;
	margin: 0 auto;
}

.submit-page__label {
	display: block;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #3f3f46;
	margin-bottom: 1rem;
}

.submit-page__title {
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	color: #fafafa;
	margin: 0 0 0.75rem;
	line-height: 1.1;
}

.submit-page__subtitle {
	font-size: 0.9375rem;
	color: #52525b;
	margin: 0 0 3rem;
	line-height: 1.6;
}

/* ─── Login gate ────────────────────────────────────────────────────────────── */

.submit-login-gate {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
	padding: 4rem 2rem;
	border: 1px solid #1e1e1e;
	border-radius: 16px;
	text-align: center;
}

.submit-login-gate__text {
	font-size: 1rem;
	color: #71717a;
	margin: 0;
}

.submit-login-gate__btn {
	display: inline-block;
	padding: 0.75rem 2rem;
	background: #ef4444;
	color: #fff;
	text-decoration: none;
	border-radius: 10px;
	font-size: 0.9375rem;
	font-weight: 600;
	transition: background 0.15s;
}

.submit-login-gate__btn:hover {
	background: #dc2626;
}

/* ─── Notice ───────────────────────────────────────────────────────────────── */

.submit-notice {
	padding: 1rem 1.25rem;
	border-radius: 10px;
	font-size: 0.9375rem;
	margin-bottom: 2rem;
	border: 1px solid transparent;
}

.submit-notice--success {
	background: rgba(34,197,94,0.08);
	border-color: rgba(34,197,94,0.2);
	color: #4ade80;
}

.submit-notice--error {
	background: rgba(239,68,68,0.08);
	border-color: rgba(239,68,68,0.2);
	color: #f87171;
}

/* ─── Form fields ──────────────────────────────────────────────────────────── */

.report-form {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.form-label {
	font-size: 0.8125rem;
	font-weight: 500;
	color: #a1a1aa;
	letter-spacing: 0.01em;
}

.form-label--optional {
	color: #3f3f46;
	font-weight: 400;
}

.form-input {
	background: #0f0f0f;
	border: 1px solid #27272a;
	border-radius: 10px;
	color: #e4e4e7;
	font-size: 0.9375rem;
	padding: 0.75rem 1rem;
	width: 100%;
	box-sizing: border-box;
	outline: none;
	transition: border-color 0.15s;
	font-family: inherit;
}

.form-input:focus { border-color: #ef4444; }
.form-input::placeholder { color: #3f3f46; }

/* Select — strip OS chrome and add a custom arrow */
select.form-input {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2352525b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.5rem;
	cursor: pointer;
}

select.form-input option {
	background: #18181b;
	color: #e4e4e7;
}

select.form-input option:disabled {
	color: #3f3f46;
}

.form-input--icon { padding-left: 2.625rem; }

.form-textarea {
	resize: vertical;
	min-height: 140px;
	line-height: 1.6;
}

/* ─── Rich text editor ─────────────────────────────────────────────────────── */

.rich-editor {
	background: #0f0f0f;
	border: 1px solid #27272a;
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.15s;
}

.rich-editor:focus-within { border-color: #ef4444; }

/* Toolbar */
.rich-editor__toolbar {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 0.5rem 0.625rem;
	border-bottom: 1px solid #27272a;
	background: #111113;
	flex-wrap: wrap;
}

.rte-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: #71717a;
	cursor: pointer;
	font-size: 0.8125rem;
	font-weight: 700;
	font-family: inherit;
	transition: background 0.1s, color 0.1s;
	flex-shrink: 0;
}

.rte-btn svg {
	width: 14px;
	height: 14px;
	pointer-events: none;
}

.rte-btn:hover    { background: #1e1e21; color: #e4e4e7; }
.rte-btn.is-active { background: rgba(239,68,68,0.12); color: #ef4444; }

.rte-sep {
	width: 1px;
	height: 18px;
	background: #27272a;
	margin: 0 4px;
	flex-shrink: 0;
}

/* Editable content area */
.rich-editor__content {
	min-height: 160px;
	max-height: 480px;
	overflow-y: auto;
	padding: 0.875rem 1rem;
	color: #e4e4e7;
	font-size: 0.9375rem;
	line-height: 1.7;
	outline: none;
	box-sizing: border-box;
	scrollbar-width: thin;
	scrollbar-color: #3f3f46 transparent;
}

.rich-editor__content::-webkit-scrollbar {
	width: 6px;
}

.rich-editor__content::-webkit-scrollbar-track {
	background: transparent;
}

.rich-editor__content::-webkit-scrollbar-thumb {
	background-color: #3f3f46;
	border-radius: 999px;
}

.rich-editor__content::-webkit-scrollbar-thumb:hover {
	background-color: #ef4444;
}

.rich-editor__content:empty::before {
	content: attr(data-placeholder);
	color: #3f3f46;
	pointer-events: none;
}

/* Prose inside the editor (mirrors singular .rpt-prose) */
.rich-editor__content h2 {
	font-size: 1.25rem;
	font-weight: 700;
	color: #fafafa;
	margin: 1.5em 0 0.5em;
	line-height: 1.25;
}

.rich-editor__content h3 {
	font-size: 1.0625rem;
	font-weight: 600;
	color: #e4e4e7;
	margin: 1.25em 0 0.4em;
}

.rich-editor__content p  { margin: 0 0 1em; }
.rich-editor__content p:first-child { margin-top: 0; }

.rich-editor__content b,
.rich-editor__content strong { color: #fafafa; }

.rich-editor__content em { color: #a1a1aa; }

.rich-editor__content u { text-decoration-color: #52525b; }

.rich-editor__content ul,
.rich-editor__content ol {
	padding-left: 1.5em;
	margin: 0 0 1em;
}

.rich-editor__content li { margin-bottom: 0.3em; }

.rich-editor__content blockquote {
	border-left: 3px solid #ef4444;
	margin: 1.25em 0;
	padding: 0.375em 0 0.375em 1.25em;
	color: #71717a;
	font-style: italic;
}

/* ─── /Rich text editor ─────────────────────────────────────────────────────── */

.form-hint {
	font-size: 0.75rem;
	color: #3f3f46;
	align-self: flex-end;
}

.form-link {
	background: none;
	border: none;
	color: #52525b;
	font-size: 0.8125rem;
	cursor: pointer;
	padding: 0;
	text-align: left;
	transition: color 0.15s;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.form-link:hover { color: #a1a1aa; }

/* ─── Place autocomplete ───────────────────────────────────────────────────── */

.place-search-wrap {
	position: relative;
}

.place-search-wrap__icon {
	position: absolute;
	left: 0.875rem;
	top: 50%;
	transform: translateY(-50%);
	color: #3f3f46;
	pointer-events: none;
}

.place-suggestions {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: #18181b;
	border: 1px solid #27272a;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(0,0,0,0.5);
	list-style: none;
	margin: 0;
	padding: 0.375rem 0;
	z-index: 200;
}

.place-suggestions li a,
.place-suggestions li button {
	display: block;
	width: 100%;
	padding: 0.625rem 1rem;
	color: #a1a1aa;
	font-size: 0.875rem;
	text-decoration: none;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	transition: background 0.1s, color 0.1s;
	box-sizing: border-box;
}

.place-suggestions li.is-active button,
.place-suggestions li button:hover {
	background: rgba(239,68,68,0.08);
	color: #ef4444;
}

.place-suggestions__name { display: block; font-weight: 500; color: #e4e4e7; }
.place-suggestions__address { display: block; font-size: 0.75rem; color: #52525b; margin-top: 1px; }

.manual-place {
	margin-top: 0.75rem;
	padding: 1.25rem;
	background: #0f0f0f;
	border: 1px solid #27272a;
	border-radius: 10px;
}

/* ─── Rating ───────────────────────────────────────────────────────────────── */

.rating-group {
	display: flex;
	gap: 0.75rem;
}

.rating-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }

.rating-option__box {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 1rem 1.5rem;
	background: #0f0f0f;
	border: 1px solid #27272a;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	min-width: 100px;
}

.rating-option__box:hover {
	border-color: #3f3f46;
}

.rating-option input[type="radio"]:checked + .rating-option__box {
	border-color: #ef4444;
	background: rgba(239,68,68,0.07);
}

.rating-option input[type="radio"]:focus-visible + .rating-option__box {
	outline: 2px solid #ef4444;
	outline-offset: 2px;
}

.rating-option__icon { font-size: 1.75rem; line-height: 1; }

.rating-option__label {
	font-size: 0.75rem;
	font-weight: 500;
	color: #71717a;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.rating-option input[type="radio"]:checked + .rating-option__box .rating-option__label {
	color: #ef4444;
}

/* ─── Photo upload ─────────────────────────────────────────────────────────── */

.photo-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.375rem;
	padding: 2rem;
	border: 1px dashed #27272a;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	color: #52525b;
	text-align: center;
}

.photo-drop:hover,
.photo-drop.is-over {
	border-color: #ef4444;
	background: rgba(239,68,68,0.04);
}

.photo-drop svg { color: #3f3f46; }
.photo-drop__text { font-size: 0.9375rem; color: #71717a; }
.photo-drop__hint { font-size: 0.75rem; color: #3f3f46; }

.photo-previews {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.75rem;
}

.photo-preview {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #27272a;
}

.photo-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.photo-preview__remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 20px;
	height: 20px;
	background: rgba(0,0,0,0.7);
	border: none;
	border-radius: 50%;
	color: #fff;
	font-size: 0.75rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.photo-previews--existing {
	margin-bottom: 0.75rem;
}

.photo-preview--existing {
	opacity: 1;
	transition: opacity 0.2s, transform 0.2s;
}

.photo-preview__badge {
	position: absolute;
	bottom: 4px;
	left: 4px;
	background: rgba(0,0,0,0.72);
	color: #fafafa;
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 1px 5px;
	border-radius: 4px;
	pointer-events: none;
}

/* ─── Submit button ────────────────────────────────────────────────────────── */

.form-actions { padding-top: 0.5rem; }

.form-submit {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.875rem 2rem;
	background: #ef4444;
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
	font-family: inherit;
}

.form-submit:hover:not(:disabled) { background: #dc2626; }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Full-page submission overlay ────────────────────────────────────────── */

.submit-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 10, 0.85);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

/* Prevent display:flex from overriding the [hidden] attribute */
.submit-overlay[hidden] { display: none; }

.submit-overlay__box {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
}

.submit-overlay__spinner {
	display: block;
	width: 52px;
	height: 52px;
	border: 3px solid rgba(239, 68, 68, 0.25);
	border-top-color: #ef4444;
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}

.submit-overlay__msg {
	font-size: 0.9375rem;
	font-weight: 500;
	color: #a1a1aa;
	margin: 0;
	letter-spacing: 0.01em;
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
	.form-row { grid-template-columns: 1fr; }
	.rating-group { flex-direction: column; }
	.rating-option__box { flex-direction: row; justify-content: flex-start; min-width: unset; padding: 0.875rem 1rem; }
}

