/**
 * yarni Returns — Customer My Account styles.
 */

/* ── Retouren list table ──────────────────────────────────────── */

.yr-returns-table {
	margin-top: 1em;
}

.yr-returns-table .yr-download-label {
	font-size: 0.85em;
	padding: 0.3em 0.8em;
}

/* ── Return request form ──────────────────────────────────────── */

.yr-return-form {
	max-width: 720px;
}

.yr-return-form h2 {
	margin-bottom: 0.3em;
}

.yr-return-form .yr-form-intro {
	margin-bottom: 1.5em;
	color: #555;
	font-size: 0.95em;
}

/* ── Product items list ───────────────────────────────────────── */

.yr-return-items-list {
	border: 1px solid #d5d5d5;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.yr-return-item {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	align-items: center;
	padding: 1.2em 1.4em;
	border-bottom: 1px solid #e8e8e8;
	transition: background-color 0.15s;
}

.yr-return-item:last-child {
	border-bottom: none;
}

.yr-return-item:hover {
	background-color: #fafafa;
}

.yr-return-item.yr-selected {
	background-color: #f5f5f5;
}

/* ── Checkbox ─────────────────────────────────────────────────── */

.yr-item-checkbox {
	flex: 0 0 auto;
}

.yr-item-checkbox input[type="checkbox"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
	accent-color: #333;
}

/* ── Product image ────────────────────────────────────────────── */

.yr-item-image {
	flex: 0 0 64px;
}

.yr-item-image img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #e5e5e5;
}

/* ── Product details ──────────────────────────────────────────── */

.yr-item-details {
	flex: 1 1 200px;
}

.yr-item-name {
	font-weight: 600;
	font-size: 1em;
	margin-bottom: 0.15em;
	color: #1a1a1a;
}

.yr-item-meta {
	font-size: 0.88em;
	color: #777;
}

/* ── Quantity + Reason fields ─────────────────────────────────── */

.yr-item-fields {
	flex: 0 0 100%;
	display: none;
	margin-top: 0.5em;
	padding: 1em 1.2em;
	margin-left: -1.4em;
	margin-right: -1.4em;
	margin-bottom: -1.2em;
	background: #f8f8f8;
	border-top: 1px solid #e8e8e8;
}

.yr-return-item.yr-selected .yr-item-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2em;
	align-items: flex-end;
}

.yr-field-qty,
.yr-field-reason {
	flex: 0 1 auto;
}

.yr-item-fields label {
	display: block;
	font-size: 0.82em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 0.4em;
	color: #555;
}

.yr-item-fields select,
.yr-item-fields input[type="number"] {
	display: block;
	width: 100%;
	min-width: 100px;
	padding: 0.55em 0.75em;
	font-size: 0.95em;
	font-family: inherit;
	border: 1px solid #ccc;
	border-radius: 5px;
	background-color: #fff;
	color: #333;
	appearance: auto;
	-webkit-appearance: auto;
	transition: border-color 0.15s;
}

.yr-field-reason select {
	min-width: 220px;
}

.yr-item-fields select:focus,
.yr-item-fields input[type="number"]:focus {
	border-color: #333;
	outline: none;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* ── Bundle note (non-refundable PDF) ─────────────────────────── */

.yr-bundle-note {
	margin-top: 0.4em;
	font-size: 0.85em;
	color: #996600;
	font-style: italic;
}

/* ── Refunded / partially refunded items ──────────────────────── */

.yr-item-meta del {
	color: #999;
	text-decoration: line-through;
	margin-right: 0.3em;
}

.yr-item-refunded {
	opacity: 0.45;
	pointer-events: none;
}

.yr-item-refunded::after {
	content: "Bereits erstattet";
	display: block;
	color: #999;
	font-style: italic;
	font-size: 0.85em;
	padding-left: 2em;
	margin-top: 0.3em;
}

/* ── Notes field ──────────────────────────────────────────────── */

.yr-notes-field {
	margin-top: 1.8em;
}

.yr-notes-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.5em;
	color: #333;
}

.yr-notes-field textarea {
	width: 100%;
	min-height: 90px;
	padding: 0.7em 0.9em;
	font-size: 0.95em;
	font-family: inherit;
	border: 1px solid #ccc;
	border-radius: 6px;
	background-color: #fff;
	color: #333;
	resize: vertical;
	transition: border-color 0.15s;
}

.yr-notes-field textarea:focus {
	border-color: #333;
	outline: none;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* ── Submit button ────────────────────────────────────────────── */

.yr-submit-row {
	margin-top: 1.8em;
}

.yr-submit-row .button,
.yr-submit-row .yr-submit-btn {
	min-width: 220px;
	padding: 0.75em 2em;
	font-size: 1em;
}

/* ── Label download / confirmation page ───────────────────────── */

.yr-label-download {
	max-width: 640px;
}

/* Success banner */
.yr-confirm-banner {
	text-align: center;
	padding: 2em 1.5em 1.5em;
	margin-bottom: 1.5em;
	background: #f7fdf8;
	border: 1px solid #c8e6c9;
	border-radius: 8px;
}

.yr-confirm-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #333;
	color: #fff;
	font-size: 1.5em;
	margin-bottom: 0.6em;
}

.yr-confirm-banner h2 {
	margin: 0 0 0.2em;
	font-size: 1.4em;
}

.yr-confirm-order {
	color: #555;
	margin: 0;
}

/* Sections */
.yr-confirm-section {
	padding: 1.2em 1.4em;
	margin-bottom: 1em;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
}

.yr-confirm-section h4 {
	margin: 0 0 0.7em;
	font-size: 0.95em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #333;
}

/* Returned items table */
.yr-confirm-items-table {
	width: 100%;
	border-collapse: collapse;
}

.yr-confirm-items-table td {
	padding: 0.45em 0;
	font-size: 0.95em;
	vertical-align: top;
}

.yr-confirm-items-table tr:not(:last-child) td {
	border-bottom: 1px solid #f0f0f0;
}

.yr-confirm-items-table .yr-confirm-item-qty {
	font-weight: 600;
	white-space: nowrap;
	width: 2.5em;
}

.yr-confirm-items-table .yr-confirm-item-name {
	padding-left: 0.3em;
}

.yr-confirm-items-table .yr-confirm-item-amount {
	text-align: right;
	white-space: nowrap;
	color: #333;
}

.yr-confirm-items-total td {
	border-top: 2px solid #333 !important;
	padding-top: 0.7em;
}

/* Steps */
.yr-confirm-steps ol {
	margin: 0;
	padding-left: 1.4em;
}

.yr-confirm-steps li {
	padding: 0.3em 0;
	font-size: 0.95em;
	color: #444;
}

/* Download button */
.yr-confirm-download {
	text-align: center;
	padding: 1.5em 0;
	margin-bottom: 1em;
}

.yr-label-download .yr-download-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 2.5em;
	font-size: 1em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 0;
	text-decoration: none;
	line-height: 1;
	transition: background-color 0.15s;
}

.yr-label-download .yr-download-btn:hover {
	background: #333;
	color: #fff;
}

/* Return address */
.yr-return-address {
	background: #f8f8f8;
	padding: 0.6em 1.2em;
	border: 1px solid #eee;
	border-radius: 6px;
	font-size: 0.95em;
	line-height: 1.3;
	color: #333;
}

.yr-return-address p {
	margin: 0.15em 0;
}

/* Footer */
.yr-confirm-email-note {
	text-align: center;
	color: #777;
	font-size: 0.9em;
	margin: 1.5em 0 0.5em;
}

.yr-confirm-actions {
	text-align: center;
	padding: 0.5em 0 1em;
}

/* ── Return status on order detail ────────────────────────────── */

.yr-return-status-section {
	margin: 2em 0;
	padding: 1.5em;
	background: #f8f9fa;
	border-radius: 6px;
	border-left: 4px solid #7f54b3;
}

.yr-return-status-section h3 {
	margin-top: 0;
	margin-bottom: 1em;
}

.yr-status-timeline {
	list-style: none;
	padding: 0;
	margin: 0 0 1em 0;
}

.yr-status-timeline li {
	position: relative;
	padding: 0.4em 0 0.4em 2em;
	font-size: 0.95em;
}

.yr-status-timeline li::before {
	content: "";
	position: absolute;
	left: 0.4em;
	top: 0.65em;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #7f54b3;
}

.yr-status-timeline li.yr-step-pending::before {
	background: #ccc;
	border: 2px dashed #999;
}

.yr-status-timeline li.yr-step-active::before {
	background: #7f54b3;
	box-shadow: 0 0 0 3px rgba(127, 84, 179, 0.2);
}

/* Return items table in status section */
.yr-return-requested-items {
	margin-bottom: 1em;
}

.yr-return-requested-items p {
	margin-bottom: 0.4em;
}

.yr-return-items-table {
	width: 100%;
	border-collapse: collapse;
}

.yr-return-items-table td {
	padding: 0.35em 0;
	font-size: 0.93em;
}

.yr-return-items-table .yr-rit-qty {
	font-weight: 600;
	white-space: nowrap;
	width: 2.5em;
}

.yr-return-items-table .yr-rit-name {
	padding-left: 0.3em;
}

.yr-return-items-table .yr-rit-amount {
	text-align: right;
	white-space: nowrap;
	color: #555;
}

.yr-return-status-section .yr-actions {
	margin-top: 1em;
	display: flex;
	gap: 0.5em;
	flex-wrap: wrap;
}

.yr-mark-shipped-btn {
	cursor: pointer;
}

.yr-mark-shipped-btn.yr-disabled {
	opacity: 0.5;
	pointer-events: none;
}

/* ── WooCommerce order detail fixes ────────────────────────────── */

.woocommerce-table--order-details tfoot td {
	text-align: right;
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 600px) {
	.yr-return-item {
		flex-direction: column;
		padding: 1em;
	}

	.yr-item-fields {
		padding: 0.8em;
		margin-left: -1em;
		margin-right: -1em;
	}

	.yr-return-item.yr-selected .yr-item-fields {
		flex-direction: column;
	}

	.yr-field-reason select {
		min-width: 0;
		width: 100%;
	}
}
