/**
 * Frontend Styles for Easy Return Management for WooCommerce.
 * Matches the modern customer return form and guest lookup UI.
 */

.ermw-return-form-container,
.ermw-guest-lookup-container {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #1f2937;
	max-width: 820px;
	margin: 0 auto 40px;
	box-sizing: border-box;
}

.ermw-return-form-container *,
.ermw-guest-lookup-container * {
	box-sizing: border-box;
}

.ermw-form-heading {
	font-size: 18px;
	font-weight: 600;
	color: #111827;
	margin: 0 0 20px 0;
	line-height: 1.4;
}

/* Product Selection Cards */
.ermw-product-cards-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 20px;
}

.ermw-product-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 18px 22px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	position: relative;
	gap: 16px;
}

.ermw-product-card.is-checked {
	border-color: #374151;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ermw-product-card.is-restricted {
	background-color: #fafafa;
	border-color: #e5e7eb;
}

.ermw-card-left {
	display: flex;
	align-items: center;
	gap: 18px;
	flex: 1;
}

.ermw-card-checkbox-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ermw-item-checkbox {
	width: 18px;
	height: 18px;
	accent-color: #111827;
	cursor: pointer;
	margin: 0;
	border-radius: 4px;
}

.ermw-item-checkbox:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.ermw-card-thumb-wrap {
	width: 82px;
	height: 82px;
	border: 1px solid #f1f5f9;
	border-radius: 8px;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
	cursor: pointer;
	padding: 4px;
}

.ermw-card-thumb {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.ermw-card-meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ermw-card-title {
	font-size: 14.5px;
	font-weight: 500;
	color: #111827;
	cursor: pointer;
	margin: 0 0 2px 0;
	line-height: 1.3;
}

.ermw-card-pills {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.ermw-meta-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background-color: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 3px 12px;
	font-size: 12.5px;
	color: #374151;
	line-height: 1.4;
}

.ermw-meta-badge strong {
	font-weight: 600;
	color: #111827;
}

.ermw-card-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	align-self: stretch;
}

.ermw-qty-selector-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: auto 0;
}

.ermw-qty-label {
	font-size: 13px;
	color: #374151;
	margin: 0;
	white-space: nowrap;
}

.ermw-item-qty-input {
	width: 68px !important;
	height: 38px !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 6px !important;
	background: #ffffff !important;
	text-align: center;
	font-size: 14px !important;
	font-weight: 500;
	color: #111827 !important;
	padding: 4px 8px !important;
}

.ermw-item-qty-input:focus {
	outline: none;
	border-color: #111827 !important;
}

.ermw-non-returnable-badge {
	margin-top: auto;
	background-color: #feb2b2;
	color: #742a2a;
	font-size: 11.5px;
	font-weight: 600;
	padding: 5px 14px;
	border-radius: 6px;
	white-space: nowrap;
}

/* Summary Pills */
.ermw-summary-pills-section {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 28px;
}

.ermw-summary-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 8px 16px;
	font-size: 13px;
	color: #374151;
}

.ermw-summary-pill strong {
	font-weight: 700;
	color: #111827;
	font-size: 13.5px;
}

/* Form Groups & Inputs */
.ermw-form-group {
	margin-bottom: 24px;
}

.ermw-field-label {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: #111827;
	margin-bottom: 10px;
}

.ermw-required {
	color: #ef4444;
	margin-left: 2px;
}

.ermw-select-wrapper {
	position: relative;
	max-width: 260px;
}

.ermw-select-control,
.ermw-input-control {
	width: 100%;
	height: 42px;
	padding: 8px 14px;
	font-size: 13.5px;
	color: #111827;
	background-color: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	transition: border-color 0.15s ease;
}

.ermw-select-control:focus,
.ermw-input-control:focus,
.ermw-textarea-control:focus {
	outline: none;
	border-color: #111827;
}

.ermw-textarea-control {
	width: 100%;
	min-height: 96px;
	padding: 12px 14px;
	font-size: 13.5px;
	color: #111827;
	background-color: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	resize: vertical;
}

.ermw-char-counter-hint {
	font-size: 11.5px;
	color: #6b7280;
	margin-top: 6px;
	display: flex;
	justify-content: space-between;
}

/* Visual Evidence Uploader */
.ermw-evidence-uploader-area {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 6px;
	margin-bottom: 10px;
}

.ermw-evidence-previews {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.ermw-preview-item {
	width: 68px;
	height: 68px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #ffffff;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
}

.ermw-preview-item img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 4px;
}

.ermw-remove-preview-btn {
	position: absolute;
	top: -7px;
	right: -7px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #ef4444;
	color: #ffffff;
	border: none;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ermw-add-evidence-btn {
	width: 68px;
	height: 68px;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	background-color: #ffffff;
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
	padding: 0;
}

.ermw-add-evidence-btn:hover {
	border-color: #111827;
	color: #111827;
	background-color: #f8fafc;
}

.ermw-evidence-hint {
	font-size: 12px;
	color: #6b7280;
}

/* Error & Feedback Box */
.ermw-form-error-box {
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 13.5px;
	margin-bottom: 20px;
}

/* Submit Button */
.ermw-submit-row {
	display: flex;
	justify-content: flex-end;
	margin-top: 28px;
}

.ermw-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: #141414;
	color: #ffffff !important;
	font-size: 13.5px;
	font-weight: 600;
	padding: 12px 32px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	text-decoration: none !important;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.ermw-submit-btn:hover {
	background-color: #262626;
	color: #ffffff !important;
}

.ermw-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Guest Lookup Card & Success Notice Card */
.ermw-guest-lookup-card,
.ermw-success-notice-card {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 32px;
	max-width: 540px;
	margin: 20px auto;
}

.ermw-guest-lookup-desc {
	font-size: 14px;
	color: #4b5563;
	margin: 0 0 24px 0;
	line-height: 1.5;
}

.ermw-success-notice-card {
	text-align: center;
	max-width: 600px;
	padding: 40px 32px;
}

.ermw-success-icon {
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background-color: #ecfdf5;
	color: #10b981;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
}

.ermw-success-title {
	font-size: 20px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 16px 0;
}

.ermw-success-meta {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.ermw-success-desc {
	font-size: 14px;
	color: #4b5563;
	line-height: 1.6;
	margin: 0 0 28px 0;
}

.ermw-success-actions {
	display: flex;
	justify-content: center;
}

@media (max-width: 640px) {
	.ermw-product-card {
		flex-direction: column;
		align-items: flex-start;
	}

	.ermw-card-right {
		width: 100%;
		align-items: flex-start;
		border-top: 1px solid #f1f5f9;
		padding-top: 12px;
	}

	.ermw-qty-selector-wrap {
		width: 100%;
		justify-content: space-between;
	}
}
