/**
 * Frontend Stylesheet for WooCommerce Shopee-like Returns
 */

/* General Elements */
.wc-shopee-back-link {
	display: inline-block;
	margin-bottom: 20px;
	color: #ee4d2d; /* Shopee Orange */
	text-decoration: none;
	font-weight: 500;
	transition: opacity 0.2s ease;
}

.wc-shopee-back-link:hover {
	opacity: 0.8;
	text-decoration: underline;
}

.wc-shopee-title {
	font-size: 1.6rem;
	font-weight: 600;
	margin-bottom: 10px;
	color: #222;
}

.wc-shopee-desc {
	font-size: 0.95rem;
	color: #666;
	margin-bottom: 25px;
}

/* Status Badges */
.wc-shopee-status-badge {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: uppercase;
}

.wc-shopee-status-badge.status-pending {
	background-color: #ffe9e3;
	color: #ff5722;
}

.wc-shopee-status-badge.status-approved {
	background-color: #e3f2fd;
	color: #1e88e5;
}

.wc-shopee-status-badge.status-shipping {
	background-color: #e0f2f1;
	color: #00897b;
}

.wc-shopee-status-badge.status-received {
	background-color: #ede7f6;
	color: #5e35b1;
}

.wc-shopee-status-badge.status-completed {
	background-color: #e8f5e9;
	color: #2e7d32;
}

.wc-shopee-status-badge.status-rejected {
	background-color: #ffebee;
	color: #c62828;
}

/* Buttons */
.wc-shopee-cancel-button {
	background-color: #f44336 !important;
	color: #fff !important;
	border: none;
}

.wc-shopee-cancel-button:hover {
	background-color: #d32f2f !important;
}

.wc-shopee-return-button {
	background-color: #ee4d2d !important;
	color: #fff !important;
	border: none;
}

.wc-shopee-return-button:hover {
	background-color: #d73c1d !important;
}

.wc-shopee-track-button {
	background-color: #607d8b !important;
	color: #fff !important;
}

.wc-shopee-track-button:hover {
	background-color: #455a64 !important;
}

/* Form Styles */
.wc-shopee-return-form-container {
	background: #fff;
	padding: 25px;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
	margin-top: 15px;
}

.wc-shopee-form-section {
	margin-bottom: 30px;
	padding-bottom: 25px;
	border-bottom: 1px solid #f0f0f0;
}

.wc-shopee-form-section:last-of-type {
	border-bottom: none;
}

.wc-shopee-form-section .section-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 15px;
	color: #333;
}

/* Item Rows */
.wc-shopee-form-items {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.wc-shopee-item-row {
	display: flex;
	align-items: center;
	padding: 15px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.wc-shopee-item-row:hover {
	border-color: #ee4d2d;
	box-shadow: 0 2px 10px rgba(238, 77, 45, 0.05);
}

.wc-shopee-item-checkbox {
	margin-right: 15px;
}

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

.wc-shopee-item-img {
	margin-right: 15px;
	border: 1px solid #f0f0f0;
	border-radius: 4px;
	overflow: hidden;
}

.wc-shopee-item-img img {
	display: block;
	object-fit: cover;
}

.wc-shopee-item-details {
	flex-grow: 1;
}

.wc-shopee-item-name {
	font-weight: 500;
	color: #333;
	margin-bottom: 5px;
	display: block;
	cursor: pointer;
}

.wc-shopee-item-price {
	font-size: 0.9rem;
	color: #ee4d2d;
	font-weight: 600;
}

.wc-shopee-item-qty-selector {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-left: 20px;
	border-left: 1px solid #f0f0f0;
}

.wc-shopee-qty-select {
	padding: 5px 10px;
	border-radius: 4px;
	border: 1px solid #ccc;
}

.wc-shopee-max-qty-label {
	font-size: 0.8rem;
	color: #999;
}

/* Form Fields */
.wc-shopee-form-field select,
.wc-shopee-form-field textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 0.95rem;
}

.wc-shopee-form-field select:focus,
.wc-shopee-form-field textarea:focus {
	border-color: #ee4d2d;
	outline: none;
}

/* File Upload Zone */
.wc-shopee-upload-tip {
	font-size: 0.85rem;
	color: #888;
	margin-bottom: 12px;
}

.wc-shopee-upload-zone {
	border: 2px dashed #ccc;
	border-radius: 8px;
	padding: 30px;
	text-align: center;
	background: #fafafa;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}

.wc-shopee-upload-zone:hover,
.wc-shopee-upload-zone.dragover {
	background: #fdf5f2;
	border-color: #ee4d2d;
}

.wc-shopee-upload-prompt {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: #666;
}

.wc-shopee-upload-zone:hover .wc-shopee-upload-prompt {
	color: #ee4d2d;
}

.wc-shopee-upload-icon {
	font-size: 2rem;
	font-weight: 300;
}

.wc-shopee-upload-text {
	font-size: 0.95rem;
}

/* Preview Grid */
.wc-shopee-preview-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	gap: 12px;
	margin-top: 15px;
}

.wc-shopee-preview-card {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #e0e0e0;
}

.wc-shopee-preview-card img,
.wc-shopee-preview-card video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wc-shopee-preview-card .remove-btn {
	position: absolute;
	top: 2px;
	right: 2px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	cursor: pointer;
	border: none;
}

.wc-shopee-preview-card .video-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-size: 20px;
	pointer-events: none;
	opacity: 0.8;
}

/* Timeline Cards */
.wc-shopee-return-details-container {
	margin-top: 15px;
}

.wc-shopee-header-card,
.wc-shopee-timeline-card,
.wc-shopee-detail-card {
	background: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
	margin-bottom: 20px;
	border: 1px solid #f0f0f0;
}

.wc-shopee-header-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.wc-shopee-header-title h3 {
	margin: 0;
	font-size: 1.3rem;
}

.wc-shopee-header-meta {
	font-size: 0.85rem;
	color: #888;
	margin: 0;
}

/* Timeline Progress (Shopee style) */
.wc-shopee-timeline-wrapper {
	position: relative;
	padding: 15px 0;
	margin: 10px 0;
}

.wc-shopee-timeline-line-background {
	position: absolute;
	top: 31px;
	left: 12.5%;
	right: 12.5%;
	height: 4px;
	background: #e5e5e5;
	z-index: 1;
}

.wc-shopee-timeline-line-progress-container {
	position: absolute;
	top: 31px;
	left: 12.5%;
	right: 12.5%;
	height: 4px;
	z-index: 2;
}

.wc-shopee-timeline-line-progress {
	height: 100% !important;
	background: #ee4d2d; /* Shopee Orange */
	z-index: 2;
	transition: width 0.4s ease;
}

.wc-shopee-timeline-line-progress.is-rejected {
	background: #e74c3c;
}

.wc-shopee-timeline {
	display: flex;
	justify-content: space-between;
	position: relative;
	z-index: 3;
}

.wc-shopee-timeline-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 23%;
	z-index: 2;
	position: relative;
	text-align: center;
}

.wc-shopee-timeline-step .step-icon {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 0.95rem;
	margin-bottom: 8px;
	transition: background 0.3s, border-color 0.3s;
	box-sizing: border-box;
}

/* Checked step icon: Orange with checkmark inside */
.wc-shopee-timeline-step .step-icon.icon-checked {
	background: #ee4d2d;
	border: 2px solid #ee4d2d;
	color: #fff;
}

/* Active current step icon: white circle with an orange dot inside */
.wc-shopee-timeline-step .step-icon.icon-dot {
	background: #fff;
	border: 2px solid #ee4d2d;
	color: #ee4d2d;
}

.wc-shopee-timeline-step .step-icon.icon-dot::after {
	content: '';
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ee4d2d;
}

/* Inactive step icon: white circle with a grey dot inside */
.wc-shopee-timeline-step .step-icon.icon-inactive {
	background: #fff;
	border: 2px solid #e0e0e0;
	color: #bbb;
}

.wc-shopee-timeline-step .step-icon.icon-inactive::after {
	content: '';
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #e0e0e0;
}

/* Rejected step icon: red with white X cross */
.wc-shopee-timeline-step .step-icon.icon-rejected {
	background: #e74c3c;
	border: 2px solid #e74c3c;
	color: #fff;
}

.wc-shopee-timeline-step .step-label {
	font-size: 0.8rem;
	font-weight: 400;
	color: #888;
	margin-bottom: 4px;
	transition: color 0.3s, font-weight 0.3s;
}

.wc-shopee-timeline-step.active .step-label {
	color: #333;
	font-weight: 500;
}

/* Active dot step labels: highlight in Shopee Orange */
.wc-shopee-timeline-step .step-icon.icon-dot ~ .step-label {
	color: #ee4d2d;
	font-weight: 600;
}

/* Rejected step labels: highlight in red */
.wc-shopee-timeline-step .step-icon.icon-rejected ~ .step-label {
	color: #e74c3c;
	font-weight: 600;
}

.wc-shopee-timeline-step .step-date {
	font-size: 0.75rem;
	color: #bbb;
}

/* Address and Forms in Timeline Details */
.wc-shopee-address-box {
	background: #fafafa;
	border: 1px solid #e0e0e0;
	padding: 15px;
	border-radius: 6px;
	margin-bottom: 20px;
}

.wc-shopee-address-box h5 {
	margin-top: 0;
	margin-bottom: 10px;
	font-weight: 600;
}

.wc-shopee-address-box pre {
	margin: 0;
	font-family: inherit;
	white-space: pre-wrap;
	font-size: 0.9rem;
}

.wc-shopee-shipping-form {
	border-top: 1px solid #f0f0f0;
	padding-top: 20px;
}

.wc-shopee-form-row {
	display: flex;
	gap: 15px;
	margin-bottom: 15px;
}

.wc-shopee-form-row .form-group {
	flex: 1;
}

.wc-shopee-form-row label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	font-size: 0.9rem;
}

.wc-shopee-form-row input {
	width: 100%;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.wc-shopee-form-row input:focus {
	border-color: #ee4d2d;
	outline: none;
}

/* Details and Media grid */
.wc-shopee-details-items {
	margin-bottom: 20px;
}

.wc-shopee-details-items h5,
.wc-shopee-details-media h5 {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 0.95rem;
	font-weight: 600;
	color: #444;
}

.wc-shopee-details-item-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px dashed #f0f0f0;
}

.wc-shopee-details-item-row:last-of-type {
	border-bottom: none;
}

.wc-shopee-details-item-row .item-name {
	font-weight: 500;
}

.wc-shopee-details-item-row .item-qty {
	color: #888;
	margin-left: 8px;
}

.wc-shopee-details-item-row .item-price {
	color: #ee4d2d;
	font-weight: 600;
}

.wc-shopee-info-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

.wc-shopee-info-table th,
.wc-shopee-info-table td {
	text-align: left;
	padding: 10px 0;
	border-bottom: 1px solid #f9f9f9;
}

.wc-shopee-info-table th {
	width: 30%;
	font-weight: 600;
	color: #666;
}

.wc-shopee-info-table td {
	color: #333;
}

.wc-shopee-admin-notes {
	color: #ff5722 !important;
	font-weight: 500;
}

.wc-shopee-media-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 15px;
	margin-top: 10px;
}

.wc-shopee-media-card {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	height: 100px;
	position: relative;
	background: #f9f9f9;
}

.wc-shopee-media-card img,
.wc-shopee-media-card video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wc-shopee-media-card img {
	cursor: zoom-in;
}

/* Responsiveness */
@media screen and (max-width: 768px) {
	.wc-shopee-timeline {
		flex-direction: column;
		gap: 20px;
		padding-left: 20px;
	}

	.wc-shopee-timeline-line-background {
		top: 20px;
		bottom: 20px;
		left: 31px;
		width: 4px;
		height: auto;
		right: auto;
	}

	.wc-shopee-timeline-line-progress-container {
		top: 20px;
		bottom: 20px;
		left: 31px;
		width: 4px;
		height: auto;
		right: auto;
	}

	.wc-shopee-timeline-line-progress {
		top: 20px;
		left: 31px;
		width: 4px !important;
		height: 0%;
		right: auto;
		transition: height 0.4s ease;
	}

	.wc-shopee-timeline-step {
		flex-direction: row;
		width: 100%;
		text-align: left;
		gap: 15px;
	}

	.wc-shopee-timeline-step .step-icon {
		margin-bottom: 0;
	}

	.wc-shopee-form-row {
		flex-direction: column;
		gap: 10px;
	}

	.wc-shopee-info-table th {
		width: 40%;
	}
}
