/**
 * Review Disputes & Reporting — styles (Phase 1).
 *
 * Covers:
 *  - Report / dispute action links on review cards.
 *  - Shared modal overlay + inner modal shell.
 *  - Modal form fields (reason select, details textarea, char counter, feedback).
 *  - Admin badges for report/dispute type in the moderation queue.
 *  - Review eligibility note banner.
 *
 * @version 1.0.0
 */

/* ==========================================================================
   Review card action area
   ========================================================================== */

.mc-rd-review-actions {
	display: flex;
	gap: 12px;
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid #f0f0f0;
	align-items: center;
	flex-wrap: wrap;
}

.mc-rd-action-link {
	background: none;
	border: none;
	padding: 0;
	font-size: 0.78rem;
	color: #8a8a8a;
	cursor: pointer;
	line-height: 1.4;
	text-decoration: underline;
	transition: color 0.15s ease;
}

.mc-rd-action-link:hover,
.mc-rd-action-link:focus {
	color: #555;
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ==========================================================================
   Modal overlay
   ========================================================================== */

.mc-rd-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.55 );
	z-index: 10000;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.mc-rd-overlay--open {
	display: flex;
}

/* Scroll lock applied to <body> while modal is open */
.mc-rd-scroll-lock {
	overflow: hidden;
}

/* ==========================================================================
   Modal inner container
   ========================================================================== */

.mc-rd-modal {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba( 0, 0, 0, 0.18 );
	max-width: 520px;
	width: 100%;
	padding: 28px 28px 24px;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
}

.mc-rd-modal__title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 14px;
	padding-right: 32px; /* space for close button */
	line-height: 1.3;
}

.mc-rd-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 1.1rem;
	color: #888;
	cursor: pointer;
	line-height: 1;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background 0.15s, color 0.15s;
}

.mc-rd-modal__close:hover,
.mc-rd-modal__close:focus {
	background: #f3f3f3;
	color: #333;
	outline: 2px solid #888;
	outline-offset: 1px;
}

/* ==========================================================================
   Modal body / form
   ========================================================================== */

.mc-rd-modal__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mc-rd-modal__note {
	font-size: 0.84rem;
	color: #666;
	line-height: 1.5;
	margin: 0;
	padding: 10px 12px;
	background: #f8f8f8;
	border-radius: 4px;
}

.mc-rd-modal__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mc-rd-modal__field label {
	font-size: 0.85rem;
	font-weight: 500;
	color: #333;
}

.mc-rd-modal__field select {
	font-size: 0.9rem;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	color: #333;
	width: 100%;
	appearance: auto;
}

.mc-rd-modal__field select:focus {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
}

.mc-rd-modal__textarea {
	font-size: 0.88rem;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	resize: vertical;
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
	color: #333;
	line-height: 1.5;
}

.mc-rd-modal__textarea:focus {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
}

.mc-rd-char-counter {
	font-size: 0.75rem;
	color: #999;
	text-align: right;
}

.mc-rd-modal__feedback {
	font-size: 0.85rem;
	color: #d32f2f;
	min-height: 20px;
	line-height: 1.4;
}

.mc-rd-modal__feedback:empty {
	display: none;
}

.mc-rd-modal__submit {
	align-self: flex-start;
	font-size: 0.9rem;
	padding: 9px 20px;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-weight: 500;
	transition: background 0.15s;
}

.mc-rd-modal__submit:hover {
	background: #1d4ed8;
}

.mc-rd-modal__submit:disabled {
	background: #94a3b8;
	cursor: not-allowed;
}

/* ==========================================================================
   Admin: report/dispute type badges
   ========================================================================== */

.mc-rd-type-badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 10px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.mc-rd-type-badge--review_report {
	background: #fff3cd;
	color: #7a5700;
}

.mc-rd-type-badge--review_dispute {
	background: #e0e7ff;
	color: #3730a3;
}

/* ==========================================================================
   Review eligibility note (seller profile)
   ========================================================================== */

.mc-rd-eligibility-note {
	margin-top: 10px;
	margin-bottom: 4px;
}

.mc-rd-eligibility-note__text {
	font-size: 0.84rem;
	color: #666;
	line-height: 1.5;
	margin: 0;
	padding: 8px 12px;
	background: #f8faff;
	border-left: 3px solid #93c5fd;
	border-radius: 0 4px 4px 0;
}

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */

@media ( max-width: 540px ) {
	.mc-rd-modal {
		padding: 20px 16px 18px;
	}

	.mc-rd-review-actions {
		gap: 10px;
	}

	.mc-rd-modal__title {
		font-size: 1rem;
	}

	.mc-rd-modal__submit {
		width: 100%;
		text-align: center;
	}
}
