/* MB Messages — front-end styles. Mobile-first, responsive.
   All colours are set explicitly (background + text together) everywhere,
   to avoid inheriting mismatched theme colours (e.g. white text on a light
   background, or dark text on a dark background). */

.mb-messages {
	max-width: 900px;
	margin: 0 auto;
	font-size: 15px;
	color: #222;
	background: transparent;
}
.mb-messages a { text-decoration: none; }
.mb-messages * { box-sizing: border-box; }

.mb-notice { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.mb-notice-success { background: #e6f6ea; color: #1a7a34; border: 1px solid #b9e6c4; }
.mb-notice-error   { background: #fdeceb; color: #b3271e; border: 1px solid #f3b9b4; }
.mb-notice-info    { background: #eaf3fb; color: #1c5079; border: 1px solid #bcdcf3; }

.mb-form .mb-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.mb-form label { font-weight: 600; color: #222; }
.mb-form input[type=text],
.mb-form input[type=search],
.mb-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	font-family: inherit;
	font-size: 15px;
	background: #fff;
	color: #222;
}
.mb-form textarea { resize: vertical; }
.mb-field-checkbox label { display: flex; align-items: flex-start; gap: 8px; font-weight: normal; color: #333; }
.mb-charter-notice { font-size: 13px; }

.mb-btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 6px;
	border: 1px solid #cccccc;
	background: #f6f6f6;
	color: #222;
	cursor: pointer;
	font-size: 14px;
}
.mb-btn:hover { background: #ececec; }
.mb-btn-primary { background: #1c5079; border-color: #1c5079; color: #ffffff; }
.mb-btn-primary:hover { background: #163e5f; color: #ffffff; }
.mb-btn-small { padding: 5px 10px; font-size: 12px; }
.mb-btn-muted { background: #eeeeee; border-color: #cccccc; color: #555555; }
.mb-btn-muted:hover { background: #e2e2e2; }
.mb-btn[disabled] { opacity: .6; cursor: not-allowed; }

.mb-link-btn {
	background: none;
	border: none;
	color: #666666;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
	font-size: 12px;
}
.mb-link-btn:hover { color: #333333; }

.mb-user-link { color: #1c5079; font-weight: 600; text-decoration: none; }
.mb-user-link:hover { text-decoration: underline; }

.mb-unread-summary { font-weight: 600; color: #1c5079; margin: 0 0 14px; }

.mb-inbox-tabs { display: flex; gap: 6px; border-bottom: 1px solid #e2e2e2; margin: 0 0 14px; flex-wrap: wrap; }
.mb-tab { padding: 8px 14px; color: #555555; border-bottom: 2px solid transparent; }
.mb-tab.active { color: #1c5079; border-bottom-color: #1c5079; font-weight: 600; }

.mb-search-form { display: flex; gap: 8px; margin-bottom: 16px; }
.mb-search-form input[type=search] { flex: 1; }

.mb-empty { color: #666666; }

.mb-thread-list { list-style: none; margin: 0; padding: 0; }
.mb-thread-item { border-bottom: 1px solid #eeeeee; padding: 4px 0; }
.mb-thread-item.is-unread .mb-thread-from { font-weight: 700; }

.mb-thread-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px; }
.mb-thread-from { color: #222; display: flex; align-items: center; gap: 8px; }
.mb-thread-date { color: #888888; font-size: 12px; white-space: nowrap; }

.mb-thread-excerpt-link { display: block; padding: 0 8px 10px; color: #777777; }
.mb-thread-excerpt { font-size: 13px; }

.mb-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: #b3271e;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.mb-pagination { display: flex; gap: 6px; margin: 18px 0; flex-wrap: wrap; }
.mb-pagination a { padding: 6px 12px; border: 1px solid #dddddd; border-radius: 4px; color: #333333; }
.mb-pagination a.active { background: #1c5079; color: #ffffff; border-color: #1c5079; }

.mb-settings-panel { margin-top: 6px; }
.mb-settings-panel h3 { margin-top: 0; }
.mb-settings-hint { color: #777777; font-size: 13px; margin-top: -4px; }
.mb-checkbox-row { display: flex; align-items: center; gap: 8px; color: #333333; margin-bottom: 10px; }
.mb-prefs-form { margin-bottom: 26px; }

.mb-blocked-list { list-style: none; padding: 0; margin: 0; }
.mb-blocked-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f2f2f2; color: #222; }
.mb-blocked-list form { margin: 0; }

.mb-contact-disabled { padding: 16px; border-radius: 8px; background: #f4f4f4; border: 1px solid #dddddd; }
.mb-contact-disabled-message { color: #555555; font-weight: 600; margin-top: 0; }
.mb-form-disabled textarea { background: #eaeaea; color: #999999; }

.mb-thread-header { margin-bottom: 16px; }
.mb-thread-header h2 { color: #222; margin-bottom: 8px; }
.mb-thread-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mb-inline-form { display: inline-block; margin: 0; }

.mb-thread-messages { display: flex; flex-direction: column; gap: 0; margin: 20px 0; }
.mb-message { padding: 14px 0; border-bottom: 1px solid #eeeeee; background: #ffffff; color: #222; }
.mb-message-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 6px; color: #555555; }
.mb-message-content { white-space: pre-wrap; word-break: break-word; color: #222; }
.mb-message-footer { text-align: right; margin-top: 8px; }
.mb-reported-tag { font-size: 11px; color: #b3271e; }

.mb-reply-zone { margin-top: 24px; }
.mb-reply-form textarea { width: 100%; margin-bottom: 10px; }
.mb-premium-gate { text-align: center; }
.mb-premium-gate .mb-btn { margin-top: 10px; }

@media (max-width: 600px) {
	.mb-thread-row { flex-wrap: wrap; }
	.mb-thread-date { order: 3; width: 100%; }
}
