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

/* Success banner after a save (?updated=1) */
.rm-profile-updated {
	max-width: 1200px;
	margin: 0 auto 16px;
	padding: 10px 16px;
	background: rgba( 34, 197, 94, 0.12 );
	border: 1px solid rgba( 34, 197, 94, 0.4 );
	border-radius: 6px;
	color: #22c55e;
	font-size: 14px;
}

/* 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 {
	border-color: var(--ps-orange);
	outline: 0;
}

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

/* 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;
}
