/**
 * ReturnKit Portal Styles
 * Premium, modern UI with smooth transitions and glassmorphism elements.
 */

:root {
	--rk-primary: #111111;
	/* Deep Slate */
	--rk-primary-hover: #334155;
	--rk-secondary: #3b82f6;
	/* Trustworthy Blue */
	--rk-bg: #f8fafc;
	--rk-surface: #ffffff;
	--rk-text: #0f172a;
	--rk-text-muted: #64748b;
	--rk-border: #e2e8f0;
	--rk-radius: 8px;
	/* Professional sharp curves */
	--rk-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	--rk-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);

	/* Status Colors */
	--rk-status-pending: #d97706;
	/* Amber */
	--rk-status-approved: #059669;
	/* Emerald */
	--rk-status-rejected: #dc2626;
	/* Red */
	--rk-status-resolved: #475569;
	/* Slate */
}

.as-returnkit-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: var(--rk-text);
	max-width: 1024px;
	margin: 2rem auto 50px auto;
	padding: 2.5rem;
	background: var(--rk-surface);
	border-radius: var(--rk-radius);
	box-shadow: var(--rk-shadow);
	border: 1px solid var(--rk-border);
	position: relative;
}

.as-returnkit-header {
	display: flex;
	flex-direction: column;
	margin-bottom: 2rem;
}

.as-returnkit-header h2 {
	margin: 0.5rem 0 0;
	font-weight: 700;
	letter-spacing: -0.025em;
}

.as-returnkit-back {
	color: var(--rk-text-muted);
	text-decoration: none;
	font-size: 1rem;
	transition: color 0.2s;
}

.as-returnkit-back:hover {
	color: var(--rk-primary);
}

.as-returnkit-actions {
	margin-bottom: 2rem;
	display: none !important;
}

/* Buttons */
.as-returnkit-btn-primary {
	background: var(--rk-primary) !important;
	color: #fff !important;
	border: none !important;
	padding: 0.75rem 1.5rem !important;
	border-radius: 8px !important;
	font-weight: 600 !important;
	font-size: 0.95rem !important;
	letter-spacing: 0.5px !important;
	transition: none !important;
	box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1) !important;
	text-decoration: none !important;
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	text-align: center !important;
	cursor: pointer !important;
	box-sizing: border-box !important;
	position: relative;
	overflow: hidden;
}

.as-returnkit-btn-primary:hover,
.as-returnkit-trigger-btn:hover {
	background: var(--rk-primary-hover) !important;
	color: #f8fafc !important;
	cursor: pointer;
}

.as-returnkit-trigger-btn {
	background-color: var(--rk-primary) !important;
	    font-size: 20px;
    border: 0;
	color: #fff !important;
	border-color: var(--rk-primary) !important;
	padding: 15px 20px;
}

.as-returnkit-btn-secondary {
	background: var(--rk-surface) !important;
	color: var(--rk-text) !important;
	border: 1px solid var(--rk-border) !important;
	padding: 0.5rem 1rem !important;
	border-radius: 6px !important;
	font-weight: 500 !important;
	transition: all 0.2s ease !important;
	text-decoration: none !important;
}

.as-returnkit-btn-secondary:hover {
	border-color: var(--rk-primary) !important;
	color: var(--rk-primary) !important;
}

.as-returnkit-btn-small {
	padding: 0.4rem 0.8rem !important;
	font-size: 0.85rem !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
}

/* Forms */
.as-returnkit-form .form-row {
	margin-bottom: 1rem;
}

.as-returnkit-form label {
	display: block;
	margin-bottom: 0.4rem;
	font-weight: 600;
	color: var(--rk-text);
	font-size: 0.9rem;
}

.as-returnkit-form select,
.as-returnkit-form textarea,
.as-returnkit-form input[type="text"],
.as-returnkit-form input[type="email"],
.as-returnkit-form input[type="number"],
.as-returnkit-form input[type="tel"],
.as-returnkit-form input[type="file"] {
	width: 100% !important;
	max-width: none !important;
	box-sizing: border-box !important;
	padding: 0.6rem 0.8rem !important;
	border: 1px solid var(--rk-border) !important;
	border-radius: 8px !important;
	background: var(--rk-surface) !important;
	transition: all 0.3s ease !important;
	font-family: inherit !important;
	color: var(--rk-text) !important;
	font-size: 0.9rem !important;
	height: auto !important;
	box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02) !important;
}

.as-returnkit-form select:focus,
.as-returnkit-form textarea:focus,
.as-returnkit-form input:focus {
	outline: none !important;
	border-color: var(--rk-primary) !important;
	background: #FFFFFF !important;
	box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1) !important;
}

/* Radio Group (Glassmorphism look) */
.as-returnkit-radio-group {
	display: flex;
	gap: 1rem;
}

.as-returnkit-radio-group label {
	flex: 1;
	background: #FFFFFF;
	border: 1px solid var(--rk-border);
	padding: 0.6rem;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	font-weight: 600;
	color: var(--rk-text-muted);
	font-size: 0.9rem;
}

.as-returnkit-radio-group label:has(input:checked) {
	border-color: var(--rk-primary);
	background: #FFFFFF;
	color: var(--rk-primary);
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
	transform: scale(1.02);
}

.as-returnkit-radio-group input {
	display: none;
}

/* Helper Text */
.as-returnkit-form .description {
	font-size: 0.8rem;
	color: #f59e0b;
	margin-top: 0.5rem;
}

/* Items Grid */
.as-returnkit-items-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
}

.as-returnkit-item-card {
	background: #FFFFFF;
	border: 2px solid var(--rk-border);
	border-radius: 16px;
	padding: 1.25rem;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	text-align: center;
	position: relative;
	overflow: hidden;
}

.as-returnkit-item-card:hover {
	border-color: var(--rk-primary);
	box-shadow: var(--rk-shadow-hover);
	transform: translateY(-5px);
}

.as-returnkit-item-card.selected {
	border-color: var(--rk-primary);
	background: #f8fafc;
	box-shadow: 0 0 0 2px var(--rk-primary);
}

.as-returnkit-item-card img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin-bottom: 1rem;
	transition: transform 0.3s ease;
}

.as-returnkit-item-card:hover img {
	transform: scale(1.05);
}

/* Tables */
.as-returnkit-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--rk-surface);
	border-radius: var(--rk-radius);
	overflow: hidden;
	box-shadow: var(--rk-shadow);
}

.as-returnkit-table th,
.as-returnkit-table td {
	padding: 1rem;
	text-align: left;
	border-bottom: 1px solid var(--rk-border);
}

.as-returnkit-table th {
	background: #f3f4f6;
	font-weight: 600;
	color: var(--rk-text-muted);
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.as-returnkit-table tr:last-child td {
	border-bottom: none;
}

/* Exchange Variants Alert */
.as-returnkit-exchange-variants {
	background: #f8fafc;
	border-left: 4px solid var(--rk-secondary);
	padding: 0.75rem 1rem;
	border-radius: 0 8px 8px 0;
	color: var(--rk-text);
	font-weight: 600;
	margin-bottom: 1rem;
	font-size: 0.85rem;
}

.as-returnkit-exchange-variants p {
	margin: 0;
}

/* Badges */
.as-returnkit-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
}

.as-returnkit-badge--pending {
	background: #fef3c7;
	color: #d97706;
}

.as-returnkit-badge--approved {
	background: #d1fae5;
	color: #059669;
}

.as-returnkit-badge--rejected {
	background: #fee2e2;
	color: #dc2626;
}

.as-returnkit-badge--resolved {
	background: #f3f4f6;
	color: #4b5563;
}

/* Tracking Timeline */
.rk-timeline {
	font-family: inherit;
	margin: 15px 0;
	padding: 0;
	list-style: none;
}

.rk-timeline-item {
	position: relative;
	padding-left: 36px;
	padding-bottom: 24px;
}

.rk-timeline-item:last-child {
	padding-bottom: 0;
}

/* The Vertical Line */
.rk-timeline-item::before {
	content: '';
	position: absolute;
	left: 11px;
	top: 24px;
	bottom: -8px;
	width: 2px;
	background-color: #e2e8f0;
}

.rk-timeline-item:last-child::before {
	display: none;
}

/* The Circle Node */
.rk-timeline-node {
	position: absolute;
	left: 0;
	top: 0;
	width: 24px;
	height: 24px;
	background: #fff;
	border: 3px solid #cbd5e1;
	border-radius: 50%;
	z-index: 2;
	box-sizing: border-box;
}

/* Latest item circle */
.rk-timeline-item.latest .rk-timeline-node {
	border-color: #10b981;
	background: #10b981;
	box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.rk-timeline-item.latest .rk-timeline-node::after {
	content: '';
	position: absolute;
	top: 4px;
	left: 4px;
	width: 10px;
	height: 10px;
	background: #fff;
	border-radius: 50%;
}

.rk-timeline-content {
	display: flex;
	flex-direction: column;
}

.rk-timeline-status {
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.rk-timeline-date {
	font-size: 12px;
	color: #64748b;
	margin-top: 4px;
	font-weight: 500;
}

.rk-timeline-location {
	font-size: 12px;
	color: #94a3b8;
	margin-top: 2px;
}

/* Detail Card */
.as-returnkit-detail-card {
	background: var(--rk-surface);
	border: 1px solid var(--rk-border);
	border-radius: var(--rk-radius);
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.as-returnkit-detail-full p {
	margin: 0;
}

.as-returnkit-detail-row {
	margin-bottom: 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #f3f4f6;
}

/* .as-returnkit-detail-row:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
} */
.as-returnkit-detail-full {
	flex-direction: column;
}

/* Horizontal Progress Bar */
.rk-progress-bar {
	display: flex;
	justify-content: space-between;
	margin: 20px 0 30px;
	position: relative;
}

.rk-progress-bar::before {
	content: '';
	position: absolute;
	top: 14px;
	left: 10%;
	right: 10%;
	height: 3px;
	background: #e2e8f0;
	z-index: 1;
}

.rk-progress-step {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	width: 20%;
}

.rk-progress-icon {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #cbd5e1;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 8px;
	transition: all 0.3s;
}

.rk-progress-step.completed .rk-progress-icon {
	border-color: #10b981;
	background: #10b981;
}

.rk-progress-step.completed .rk-progress-icon::after {
	content: '';
	width: 10px;
	height: 10px;
	background: #fff;
	border-radius: 50%;
}

.rk-progress-step.active .rk-progress-icon {
	border-color: #10b981;
	background: #fff;
	box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.rk-progress-step.active .rk-progress-icon::after {
	content: '';
	width: 12px;
	height: 12px;
	background: #10b981;
	border-radius: 50%;
}

.rk-progress-label {
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.rk-progress-step.completed .rk-progress-label,
.rk-progress-step.active .rk-progress-label {
	color: #0f172a;
}

/* Modal Styles */
.rk-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.5);
	backdrop-filter: blur(4px);
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.rk-modal-overlay.rk-modal-show {
	display: flex;
	opacity: 1;
}

.rk-modal-content {
	background: #fff;
	border-radius: 12px;
	width: 90%;
	max-width: 500px;
	max-height: 80vh;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateY(20px);
	transition: transform 0.3s ease;
}

.rk-modal-overlay.rk-modal-show .rk-modal-content {
	transform: translateY(0);
}

.rk-modal-header {
	padding: 20px 24px;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.rk-modal-header h3 {
	margin: 0;
	font-size: 18px;
	color: #0f172a;
}

.rk-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #64748b;
	cursor: pointer;
	line-height: 1;
	padding: 0;
}

.rk-modal-close:hover {
	color: #0f172a;
}

.rk-modal-body {
	padding: 24px;
	overflow-y: auto;
}

.as-returnkit-detail-full {
	flex-direction: column;
	align-items: flex-start;
}

/* Tracking Container Styles */
.rk-tracking-wrapper {
	width: 100%;
}

.rk-mt-15 {
	margin-top: 15px;
}

.rk-tracking-container {
	margin-top: 15px;
	padding: 20px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	width: 100%;
	box-sizing: border-box;
}

.as-returnkit-detail-full strong {
	margin-bottom: 0.5rem;
}

.as-returnkit-label-box {
	background: rgba(16, 185, 129, 0.05);
	border: 1px solid rgba(16, 185, 129, 0.2);
	padding: 1rem;
	border-radius: 8px;
	margin-top: 1rem;
}

.as-returnkit-admin-note-bubble {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 1.25rem;
	border-radius: 0 12px 12px 12px;
	margin-top: 1rem;
	position: relative;
}

.as-returnkit-admin-note-bubble strong {
	display: block;
	color: var(--rk-primary);
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.as-returnkit-admin-note-bubble p {
	margin: 0;
	color: #334155;
	line-height: 1.5;
}


@media (max-width: 600px) {
	.rk-tracking-container {
		padding: 10px;
	}

	.rk-progress-bar {
		flex-direction: column;
		align-items: flex-start;
		margin: 10px 0 20px 10px;
	}

	.rk-progress-bar::before {
		top: 16px;
		bottom: 16px;
		left: 15px;
		/* center of 32px icon is 16px. line width is 3px. */
		right: auto;
		height: auto;
		width: 3px;
	}

	.rk-progress-step {
		width: 100%;
		flex-direction: row;
		text-align: left;
		margin-bottom: 20px;
	}

	.rk-progress-step:last-child {
		margin-bottom: 0;
	}

	.rk-progress-icon {
		margin-bottom: 0;
		margin-right: 15px;
		flex-shrink: 0;
	}

	.as-returnkit-wrapper {
		padding: 1.25rem;
	}

}