/* Fast profile — custom edit form + view extras.
   Dark theme + orange accent, matching profile-riftmana.css's edit-mode styling. */

/* Success confirmation after a save. Floating toast (bottom-center) that the
   JS auto-dismisses; it's also stripped from the URL on load so a refresh
   never re-shows it. position:fixed keeps it out of flow (no layout shift). */
.rm-profile-updated {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translateX( -50% ) translateY( 12px );
	z-index: 10000;
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	max-width: none;
	padding: 11px 18px;
	background: #16241b;
	border: 1px solid rgba( 74, 222, 128, 0.45 );
	border-radius: 10px;
	color: #6ee7a0;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 12px 30px rgba( 0, 0, 0, 0.5 );
	opacity: 0;
	animation: rm-toast-in 0.25s ease forwards;
}
.rm-profile-updated svg { flex-shrink: 0; }
@keyframes rm-toast-in {
	to { opacity: 1; transform: translateX( -50% ) translateY( 0 ); }
}
.rm-profile-updated.rm-toast-out {
	opacity: 0;
	transform: translateX( -50% ) translateY( 12px );
	transition: opacity 0.3s ease, transform 0.3s ease;
}
@media ( prefers-reduced-motion: reduce ) {
	.rm-profile-updated { animation: none; opacity: 1; transform: translateX( -50% ); }
}

/* Edit form — centered dark card */
.rm-fast-edit {
	max-width: 600px;
	margin: 40px auto;
	padding: 32px;
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.4 );
}

.rm-fast-edit h2 {
	color: #fff;
	font-size: 22px;
	font-weight: 600;
	margin: 0 0 20px;
}

.rm-fast-edit .rm-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}

.rm-fast-edit label {
	color: #d0d0d0;
	font-weight: 600;
	font-size: 13px;
}

.rm-fast-edit input[type="text"],
.rm-fast-edit input[type="url"],
.rm-fast-edit textarea {
	background: #1f1f1f;
	color: #e8e8e8;
	border: 1px solid #333;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 14px;
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
}

.rm-fast-edit input::placeholder,
.rm-fast-edit textarea::placeholder {
	color: #666;
}

.rm-fast-edit input:focus,
.rm-fast-edit textarea:focus {
	/* Override Blocksy's site-wide `input:focus`, which colors the border +
	   outline with the theme focus color (a blue/purple on this theme).
	   !important because that Blocksy rule is stubborn — same reason the
	   register-form focus in style.css uses it. */
	border-color: var(--ps-orange) !important;
	outline: none !important;
}

.rm-fast-edit textarea {
	min-height: 34px;
	resize: vertical;
	line-height: 1.45;
}

/* Two-up grid for the four social fields (stacks on narrow screens) */
.rm-fast-edit .rm-field-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 16px;
}

@media ( max-width: 520px ) {
	.rm-fast-edit .rm-field-grid {
		grid-template-columns: 1fr;
	}
}

/* Native file-picker button — themed to match */
.rm-fast-edit input[type="file"]::file-selector-button {
	background: #2a2a2a;
	color: #e8e8e8;
	border: 1px solid #444;
	border-radius: 6px;
	padding: 8px 14px;
	margin-right: 12px;
	cursor: pointer;
	font-size: 13px;
	transition: background 0.15s ease;
}

.rm-fast-edit input[type="file"]::file-selector-button:hover {
	background: #333;
}

/* Inline error notice (e.g. photo too large) */
.rm-fast-edit .rm-edit-error {
	margin-bottom: 16px;
	padding: 10px 14px;
	background: rgba( 224, 85, 85, 0.12 );
	border: 1px solid rgba( 224, 85, 85, 0.4 );
	border-radius: 6px;
	color: #e05555;
	font-size: 14px;
}

.rm-fast-edit .rm-field-hint {
	color: #888;
	font-size: 12px;
}

.rm-fast-edit-actions {
	display: flex;
	gap: 10px;
	margin-top: 24px;
}

.rm-fast-edit-actions .rm-btn-save,
.rm-fast-edit-actions .rm-btn-cancel {
	padding: 10px 22px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	border: 1px solid;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.rm-fast-edit-actions .rm-btn-save {
	background: var(--ps-orange);
	color: #1a1a1a;
	border-color: var(--ps-orange);
}

.rm-fast-edit-actions .rm-btn-save:hover {
	background: var(--ps-orange-2);
	border-color: var(--ps-orange-2);
}

.rm-fast-edit-actions .rm-btn-cancel {
	background: transparent;
	color: #ccc;
	border-color: #3a3a3a;
}

.rm-fast-edit-actions .rm-btn-cancel:hover {
	background: #2a2a2a;
	color: #fff;
	border-color: #555;
}

/* Profile-photo field — drag-to-reposition preview + controls */
.rm-fast-edit .rm-photo-edit {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.rm-fast-edit .rm-photo-reposition {
	width: 120px;
	height: 120px;
	flex-shrink: 0;
	border-radius: 50%;
	overflow: hidden;
	border: 1px solid #333;
	background: #1f1f1f;
	cursor: grab;
	touch-action: none;
}

.rm-fast-edit .rm-photo-reposition.is-dragging {
	cursor: grabbing;
}

.rm-fast-edit .rm-photo-reposition img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	user-select: none;
	-webkit-user-drag: none;
}

.rm-fast-edit .rm-photo-controls {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 6px;
}

.rm-fast-edit .rm-photo-hint {
	margin: 0;
	color: #888;
	font-size: 12px;
	line-height: 1.5;
}

.rm-fast-edit input[type="file"] {
	color: #ccc;
	font-size: 13px;
}

.rm-fast-edit .rm-photo-remove {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #b8b8b8;
	font-size: 13px;
	font-weight: 400;
}

/* Raise the profile up under the site header. The gap came from THREE things stacked:
   (1) Blocksy's .ct-container-full vertical "content spacing" (top padding),
   (2) an empty leading <p class="wp-block-paragraph"> the block editor inserts,
   (3) WordPress's .is-layout-constrained > * top margin (which overrode a plain
   margin on .rm-fast-profile via higher specificity — why earlier tweaks did nothing).
   Trim all three, scoped via :has() to the profile page so every other page is untouched.
   Tune the 10px to taste (bigger = more gap under the header). */
.ct-container-full:has( .rm-fast-profile ) {
	padding-top: 10px !important;
}
.entry-content:has( .rm-fast-profile ) > .wp-block-paragraph {
	display: none !important;
}
.entry-content:has( .rm-fast-profile ) > .rm-fast-profile {
	margin-top: 0 !important;
}

/* ════════════════════════════════════════════════════════════════════════
   EDIT FORM v2 — grouped sections, icon-tagged social inputs, a tidier photo
   control and a live bio counter. Base styles here apply on BOTH the modal
   and the ?edit=1 page; the modal-only sticky header/footer live in
   profile-background.css.
   ════════════════════════════════════════════════════════════════════════ */

/* Header + subtitle */
.rm-fast-edit .rm-edit-head { margin-bottom: 4px; }
.rm-fast-edit .rm-edit-head h2 { margin: 0; }
.rm-fast-edit .rm-edit-sub {
	margin: 5px 0 0;
	font-size: 13px;
	color: rgba( 255, 255, 255, 0.55 );
}

/* Sections */
.rm-fast-edit .rm-edit-section {
	padding: 13px 0;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.07 );
}
.rm-fast-edit .rm-edit-section:last-child { border-bottom: 0; }
.rm-fast-edit .rm-edit-section-label {
	margin: 0 0 14px;
	font-size: 11px;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	font-weight: 700;
	color: rgba( 255, 255, 255, 0.42 );
}

/* Rounder inputs + orange focus ring (extends the base input rules) */
.rm-fast-edit input[type="text"],
.rm-fast-edit input[type="url"],
.rm-fast-edit textarea {
	border-radius: 9px;
	padding: 11px 13px;
}
.rm-fast-edit input[type="text"]:focus,
.rm-fast-edit input[type="url"]:focus,
.rm-fast-edit textarea:focus {
	box-shadow: 0 0 0 3px rgba( 255, 166, 0, 0.14 ) !important;
}

/* Photo control: hover drag-hint + "Change photo" button (hides the raw file input) */
.rm-fast-edit .rm-photo-reposition { position: relative; }
.rm-fast-edit .rm-photo-drag-hint {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 0, 0, 0, 0.45 );
	color: #fff;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0;
	transition: opacity 0.15s ease;
	pointer-events: none;
}
.rm-fast-edit .rm-photo-reposition:hover .rm-photo-drag-hint { opacity: 1; }
.rm-fast-edit .rm-photo-btn {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: rgba( 255, 255, 255, 0.05 );
	border: 1px solid rgba( 255, 255, 255, 0.14 );
	color: #eee;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 14px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.rm-fast-edit .rm-photo-btn:hover {
	background: rgba( 255, 255, 255, 0.1 );
	border-color: rgba( 255, 255, 255, 0.24 );
}
.rm-fast-edit .rm-photo-btn svg { width: 15px; height: 15px; }
/* Visually hide the native file input; the label above opens the picker. */
.rm-fast-edit .rm-photo-file {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
}
.rm-fast-edit .rm-photo-remove { color: #e07a7a; font-weight: 500; }

/* Bio + live character counter */
.rm-fast-edit .rm-bio-wrap { position: relative; }
.rm-fast-edit .rm-bio-counter {
	position: absolute;
	right: 10px;
	bottom: 9px;
	font-size: 11px;
	color: rgba( 255, 255, 255, 0.4 );
	font-variant-numeric: tabular-nums;
	pointer-events: none;
	background: #1f1f1f;
	padding: 0 3px;
	border-radius: 3px;
}

/* Social inputs with a brand-coloured platform icon prefix */
.rm-fast-edit .rm-social-input { position: relative; }
.rm-fast-edit .rm-social-input > svg {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY( -50% );
	width: 17px;
	height: 17px;
	pointer-events: none;
}
.rm-fast-edit .rm-social-input input { padding-left: 38px; }
.rm-fast-edit .rm-si-youtube > svg { color: #ff4d4d; }
.rm-fast-edit .rm-si-twitter > svg { color: #e9e9ec; }
.rm-fast-edit .rm-si-discord > svg { color: #8a95f5; }
.rm-fast-edit .rm-si-twitch  > svg { color: #b083ff; }

/* Actions — right-aligned, primary on the right */
.rm-fast-edit .rm-fast-edit-actions { justify-content: flex-end; }

/* Compact single-line bio (drag the corner for more room) */
.rm-fast-edit .rm-bio-wrap textarea {
	padding-top: 7px;
	padding-bottom: 7px;
}
