/* ==========================================================================
   Rocheport Community — Styles
   Colors: clay #c1683c | gold #d9a441 | border #e6dcc9
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Shared utilities
   --------------------------------------------------------------------------- */

.rc-notice {
	padding: 1em 1.25em;
	background: #f3ecdd;
	border: 1px solid #e6dcc9;
	border-radius: 6px;
	color: #6f6152;
	font-size: 0.95em;
}

.rc-notice a {
	color: #9d4f28;
	font-weight: 600;
	text-decoration: underline;
}

.rc-section-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #c1683c;
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #e6dcc9;
}

.rc-avatar {
	border-radius: 50%;
	flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */

.rc-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	padding: 0.45em 1em;
	border: none;
	border-radius: 4px;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.4;
	transition: opacity 0.15s ease, background 0.15s ease;
}

.rc-btn:hover {
	opacity: 0.88;
}

.rc-btn--accept {
	background: #9d4f28;
	color: #fff;
}

.rc-btn--decline {
	background: #f3ecdd;
	color: #3b3129;
	border: 1px solid #d8cdb8;
}

.rc-btn--unfriend {
	background: #f3ecdd;
	color: #6f6152;
	border: 1px solid #d8cdb8;
	font-weight: 400;
}

.rc-btn--add-friend {
	background: #d9a441;
	color: #3b3129;
}

.rc-btn--pending {
	background: #e6dcc9;
	color: #6f6152;
	cursor: default;
}

.rc-btn--send {
	background: #9d4f28;
	color: #fff;
	margin-top: 0.5rem;
	padding: 0.6em 1.5em;
}

.rc-btn--small {
	padding: 0.3em 0.75em;
	font-size: 0.8rem;
}

.rc-friend-status {
	color: #16a34a;
	font-weight: 600;
	font-size: 0.875rem;
	margin-right: 0.5em;
}

/* ---------------------------------------------------------------------------
   Community feed
   --------------------------------------------------------------------------- */

.rc-community-feed {
	max-width: 680px;
}

.rc-pagination {
	display: flex;
	gap: 0.5rem;
	margin-top: 1.5rem;
	flex-wrap: wrap;
}

.rc-pagination a {
	padding: 0.4em 0.85em;
	border: 1px solid #e6dcc9;
	border-radius: 4px;
	color: #9d4f28;
	text-decoration: none;
	font-size: 0.875rem;
}

.rc-pagination a:hover,
.rc-pagination a.rc-page-current {
	background: #9d4f28;
	color: #fff;
	border-color: #9d4f28;
}

/* ---------------------------------------------------------------------------
   Friend requests
   --------------------------------------------------------------------------- */

.rc-requests-section {
	margin-bottom: 2rem;
}

.rc-request-card {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.875rem 1rem;
	background: #fffaf0;
	border: 1px solid #e6dcc9;
	border-left: 4px solid #5b7b6f;
	border-radius: 6px;
	margin-bottom: 0.625rem;
}

.rc-request-info {
	flex: 1;
}

.rc-request-name {
	font-weight: 600;
	color: #9d4f28;
	text-decoration: none;
	font-size: 0.95rem;
}

.rc-request-name:hover {
	text-decoration: underline;
}

.rc-request-actions {
	display: flex;
	gap: 0.5rem;
	flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   Friends list
   --------------------------------------------------------------------------- */

.rc-friends-page {
	max-width: 640px;
}

.rc-friends-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.rc-friend-card {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 1rem;
	background: #fffaf0;
	border: 1px solid #e6dcc9;
	border-radius: 6px;
}

.rc-friend-avatar-link {
	flex-shrink: 0;
}

.rc-friend-info {
	flex: 1;
}

.rc-friend-name {
	font-weight: 600;
	color: #9d4f28;
	text-decoration: none;
	font-size: 0.95rem;
}

.rc-friend-name:hover {
	text-decoration: underline;
}

.rc-friend-actions {
	flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   Inbox / conversation list
   --------------------------------------------------------------------------- */

.rc-inbox {
	max-width: 640px;
}

.rc-conversation-list {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.rc-conv-row {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.875rem 1rem;
	background: #fffaf0;
	border: 1px solid #e6dcc9;
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
	transition: background 0.1s ease;
}

.rc-conv-row:hover {
	background: #faf6ee;
}

.rc-conv-row--unread {
	background: #f3ecdd;
}

.rc-conv-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	overflow: hidden;
}

.rc-conv-name {
	font-size: 0.95rem;
	color: #3b3129;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rc-conv-name--unread {
	font-weight: 700;
	color: #9d4f28;
}

.rc-conv-preview {
	font-size: 0.825rem;
	color: #6f6152;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rc-unread-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	background: #d9a441;
	color: #3b3129;
	border-radius: 11px;
	font-size: 0.75rem;
	font-weight: 700;
	flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   Message thread
   --------------------------------------------------------------------------- */

.rc-thread {
	max-width: 640px;
}

.rc-thread-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid #e6dcc9;
}

.rc-back-link {
	color: #9d4f28;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 600;
}

.rc-back-link:hover {
	text-decoration: underline;
}

.rc-thread-with {
	font-size: 1.1rem;
	font-weight: 700;
	color: #9d4f28;
}

.rc-thread-messages {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
	max-height: 480px;
	overflow-y: auto;
	padding: 0.75rem;
	background: #faf6ee;
	border: 1px solid #e6dcc9;
	border-radius: 6px;
}

/* Sent messages: right-aligned, navy bg */
.rc-msg--sent {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

.rc-msg--sent .rc-msg-bubble {
	background: #9d4f28;
	color: #fff;
	border-radius: 16px 16px 4px 16px;
}

/* Received messages: left-aligned, white bg */
.rc-msg--received {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.rc-msg--received .rc-msg-bubble {
	background: #fffaf0;
	color: #3b3129;
	border: 1px solid #e6dcc9;
	border-radius: 16px 16px 16px 4px;
}

.rc-msg-bubble {
	padding: 0.6em 1em;
	max-width: 80%;
	font-size: 0.9rem;
	line-height: 1.5;
	word-break: break-word;
}

.rc-msg-bubble a {
	color: inherit;
	text-decoration: underline;
}

.rc-msg-date {
	font-size: 0.725rem;
	color: #6f6152;
	margin-top: 0.2em;
	padding: 0 4px;
}

/* Reply form */
.rc-reply-form {
	padding-top: 0.75rem;
	border-top: 1px solid #e6dcc9;
}

.rc-reply-textarea {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #d8cdb8;
	border-radius: 6px;
	font-size: 0.9rem;
	font-family: inherit;
	resize: vertical;
	box-sizing: border-box;
	line-height: 1.5;
}

.rc-reply-textarea:focus {
	outline: 2px solid #9d4f28;
	outline-offset: 1px;
}

/* ---------------------------------------------------------------------------
   Admin bar badge
   --------------------------------------------------------------------------- */

#wpadminbar .rc-messages-badge > .ab-item {
	color: #f3ecdd !important;
	font-weight: 600;
}

/* Unread count pill inside the admin-bar Messages node. Written live by
   modules/messaging/assets/dm-badge.js (integration fix 2026-09-18 — the
   count used to be baked into the node's own label, which the poller could
   only clobber). [hidden] wins over the inline-block at zero unread. */
#wpadminbar .rc-messages-badge .rt-dm-badge {
	display: inline-block;
	min-width: 16px;
	margin-left: 2px;
	padding: 0 5px;
	border-radius: 8px;
	background: #d9a441;
	color: #3b3129 !important;
	font-size: 11px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

#wpadminbar .rc-messages-badge .rt-dm-badge[hidden] {
	display: none;
}
