/**
 * WooCommerce Exchange Request — Frontend Styles
 * Apparel store focused, clean and minimal.
 */

/* ── Section wrapper ─────────────────────────────────────────────────────── */

.wer-exchange-section {
	margin-top: 40px;
	padding-top: 30px;
	border-top: 2px solid #f0f0f0;
}

.wer-section-title {
	font-size: 1.3em;
	font-weight: 600;
	margin-bottom: 8px;
	color: #2c2c2c;
}

.wer-section-intro {
	color: #666;
	margin-bottom: 24px;
	font-size: 0.95em;
}

/* ── Exchange window notices ─────────────────────────────────────────────── */

.wer-window-notice {
	padding: 12px 16px;
	border-radius: 5px;
	font-size: 0.9em;
	margin-bottom: 20px;
}

.wer-window-expired {
	background: #fff3cd;
	border: 1px solid #ffc107;
	color: #856404;
}

.wer-days-remaining {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 10px;
	background: #e8f5e9;
	border: 1px solid #a5d6a7;
	border-radius: 12px;
	font-size: 0.82em;
	font-weight: 600;
	color: #2e7d32;
}

.wer-days-urgent {
	background: #fff3e0;
	border-color: #ffb74d;
	color: #e65100;
}

/* ── Item card ───────────────────────────────────────────────────────────── */

.wer-item-card {
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	margin-bottom: 16px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.2s ease;
}

.wer-item-card:hover {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.wer-item-summary {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
}

.wer-item-thumb {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #eee;
	flex-shrink: 0;
}

.wer-item-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wer-item-name {
	font-size: 1em;
	font-weight: 600;
	color: #2c2c2c;
}

.wer-item-variation {
	font-size: 0.85em;
	color: #777;
}

.wer-item-qty {
	font-size: 0.85em;
	color: #999;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.wer-toggle-btn {
	flex-shrink: 0;
	background: #2c2c2c !important;
	color: #fff !important;
	border-color: #2c2c2c !important;
	border-radius: 4px !important;
	padding: 8px 18px !important;
	font-size: 0.875em !important;
	cursor: pointer;
	transition: background 0.2s ease !important;
	white-space: nowrap;
}

.wer-toggle-btn:hover,
.wer-toggle-btn.wer-btn-active {
	background: #444 !important;
	border-color: #444 !important;
}

/* ── Status badge ────────────────────────────────────────────────────────── */

.wer-existing-badge {
	flex-shrink: 0;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wer-status-pending   { background: #fff3cd; color: #856404; }
.wer-status-approved  { background: #d1e7dd; color: #155724; }
.wer-status-rejected  { background: #f8d7da; color: #721c24; }
.wer-status-completed { background: #cce5ff; color: #004085; }

/* ── Exchange form ───────────────────────────────────────────────────────── */

.wer-form-wrapper {
	padding: 0 20px 20px;
	background: #fafafa;
	border-top: 1px solid #f0f0f0;
}

.wer-form-title {
	margin: 20px 0 16px;
	font-size: 1em;
	font-weight: 600;
	color: #2c2c2c;
}

.wer-variation-label {
	margin-bottom: 12px;
	color: #555;
	font-size: 0.9em;
}

.wer-form-field {
	margin-bottom: 16px;
}

.wer-form-field label {
	display: block;
	font-weight: 500;
	font-size: 0.875em;
	margin-bottom: 6px;
	color: #444;
}

.wer-form-field label abbr {
	color: #c0392b;
	margin-left: 2px;
	text-decoration: none;
}

.wer-form-field select,
.wer-form-field textarea {
	width: 100%;
	max-width: 480px;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 9px 12px;
	font-size: 0.9em;
	color: #2c2c2c;
	background: #fff;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

.wer-form-field select:focus,
.wer-form-field textarea:focus {
	outline: none;
	border-color: #2c2c2c;
	box-shadow: 0 0 0 2px rgba(44, 44, 44, 0.08);
}

.wer-note-textarea {
	resize: vertical;
	min-height: 80px;
}

/* ── Variation grid (attribute selects laid out in 2 columns on wider screens) */

.wer-attr-field {
	display: inline-block;
	width: 48%;
	margin-right: 2%;
	vertical-align: top;
}

@media ( max-width: 600px ) {
	.wer-attr-field { width: 100%; margin-right: 0; }
	.wer-item-summary { flex-wrap: wrap; }
	.wer-toggle-btn { width: 100%; text-align: center !important; margin-top: 8px; }
}

/* ── Form actions ────────────────────────────────────────────────────────── */

.wer-form-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.wer-submit-btn {
	background: #2c2c2c !important;
	color: #fff !important;
	border-color: #2c2c2c !important;
	padding: 10px 24px !important;
	font-size: 0.9em !important;
	border-radius: 4px !important;
}

.wer-submit-btn:hover:not(:disabled) {
	background: #444 !important;
}

.wer-submit-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed !important;
}

.wer-cancel-btn {
	background: transparent !important;
	color: #666 !important;
	border-color: #ccc !important;
	padding: 10px 20px !important;
	font-size: 0.9em !important;
	border-radius: 4px !important;
}

/* ── Messages ────────────────────────────────────────────────────────────── */

.wer-form-message {
	margin-top: 14px;
	padding: 10px 14px;
	border-radius: 4px;
	font-size: 0.9em;
	max-width: 480px;
}

.wer-message-error {
	background: #fdf2f2;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

.wer-message-success {
	background: #f0fff4;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.wer-loading {
	color: #888;
	font-style: italic;
	font-size: 0.875em;
}

.wer-error {
	color: #c0392b;
	font-size: 0.875em;
}
