/**
 * Errand System Frontend Styles
 */

/* =============================================================================
   Global Styles
   ============================================================================= */

   :root {
	--primary-color: #0073aa;
	--primary-dark: #005a87;
	--secondary-color: #666666;
	--text-primary: #1e293b;
	--text-secondary: #64748b;
	--text-muted: #94a3b8;
	--success-color: #28a745;
	--warning-color: #ffc107;
	--danger-color: #dc3545;
	--info-color: #17a2b8;
	--light-color: #f8f9fa;
	--dark-color: #343a40;
	--border-color: #dee2e6;
	--border-light: #f1f5f9;
	--border-radius: 4px;
	--box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	--container-max-width: 1200px;
	--gutter: 20px;
}
:root {
	--primary-color: #2563eb;
	--primary-dark: #1d4ed8;
	--primary-light: #3b82f6;
	--secondary-color: #64748b;
	--accent-color: #06b6d4;
	--success-color: #10b981;
	--warning-color: #f59e0b;
	--danger-color: #ef4444;
	--text-primary: #1e293b;
	--text-secondary: #64748b;
	--text-muted: #94a3b8;
	--bg-primary: #ffffff;
	--bg-secondary: #f8fafc;
	--bg-accent: #f1f5f9;
	--border-color: #e2e8f0;
	--border-light: #f1f5f9;
	--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
	--radius-sm: 0.375rem;
	--radius-base: 0.5rem;
	--radius-md: 0.75rem;
	--radius-lg: 1rem;
}

.post, .page {
    margin: 0;
}

.container {
	max-width: var(--container-max-width);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* =============================================================================
   Hero Section
   ============================================================================= */

.errand-hero-section {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 80px 0;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.errand-hero-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
	pointer-events: none;
}

.hero-content {
	position: relative;
	z-index: 1;
	max-width: 900px;
	margin: 0 auto;
}

.hero-title {
	font-size: 3rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	line-height: 1.2;
}

.hero-description {
	font-size: 1.25rem;
	margin-bottom: 2.5rem;
	line-height: 1.6;
	opacity: 0.9;
}

.hero-actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

/* =============================================================================
   Buttons
   ============================================================================= */

.btn {
	display: inline-block;
	padding: 12px 24px;
	border: none;
	border-radius: var(--border-radius);
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s ease;
	vertical-align: middle;
	user-select: none;
	line-height: 1.5;
}

.btn-primary {
	background: var(--primary-color);
	color: white;
}

.btn-primary:hover {
	background: var(--primary-dark);
	color: white;
}

.btn-primary:hover {
	background: var(--primary-dark);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.btn-secondary {
	background: transparent;
	color: white;
	border: 2px solid white;
}

.btn-secondary:hover {
	background: white;
	color: var(--primary-color);
	transform: translateY(-2px);
}

/* Enhanced Button Styles */
.hero-actions {
	display: flex;
	gap: 1.25rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 3rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 2rem;
	border: 2px solid transparent;
	border-radius: var(--radius-md);
	font-size: 1.125rem;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	vertical-align: middle;
	user-select: none;
	line-height: 1.4;
	position: relative;
	overflow: hidden;
	min-width: 160px;
}

.btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	transition: left 0.5s;
}

.btn:hover::before {
	left: 100%;
}

.btn-primary {
	background: var(--primary-color);
	color: white;
	border-color: var(--primary-color);
	box-shadow: var(--shadow-md);
}

.btn-primary:hover {
	background: var(--primary-dark);
	border-color: var(--primary-dark);
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.btn-secondary {
	background: rgba(255, 255, 255, 0.1);
	color: white;
	border-color: rgba(255, 255, 255, 0.3);
	backdrop-filter: blur(10px);
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.5);
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

/* =============================================================================
   Global Links & Transitions (moved from homepage enhancements for consistency)
   ============================================================================= */

/* Base link styles */
a { color: var(--primary-color); text-decoration: none; transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease; }
a:hover { color: var(--primary-dark); }
a:visited { color: var(--primary-color); }
a:visited:hover { color: var(--primary-dark); }

/* Links within main content */
.site-main a { color: var(--primary-color); text-decoration: none; transition: all 0.3s ease; }
.site-main a:hover, .site-main a:focus { color: var(--primary-dark); }

/* Focus visible outline for interactive elements */
a:focus, button:focus, input:focus, select:focus, textarea:focus { outline: none; outline-offset: 2px; }

/* Smooth transitions baseline */
* { transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }

/* =============================================================================
   Global Typography Enhancements (from homepage for consistency)
   ============================================================================= */

/* Enhanced body typography for better readability */
body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
	line-height: 1.6;
	color: var(--text-primary);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Enhanced heading typography */
h1, h2, h3, h4, h5, h6 {
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.3;
	color: var(--text-primary);
}


/* Refined paragraph spacing */
p {
	margin-bottom: 1.25rem;
	color: var(--text-secondary);
	line-height: 1.7;
}

/* Enhanced link styling with subtle hover effects */
a {
	color: var(--primary-color);
	text-decoration: none;
	transition: all 0.3s ease;
}

a:hover {
	color: var(--primary-dark);
	text-decoration: none;
}

/* Override WordPress default visited link color globally */
a:visited {
	color: var(--primary-color);
}

a:visited:hover {
	color: var(--primary-dark);
}

/* Ensure content links don't inherit problematic colors */
.site-main a,
.site-main a:link,
.site-main a:visited {
	color: var(--primary-color);
}

.site-main a:hover,
.site-main a:active,
.site-main a:focus {
	color: var(--primary-dark);
}

.btn-large {
	padding: 16px 32px;
	font-size: 18px;
}

.btn-block {
	display: block;
	width: 100%;
}

.errand-submit-btn {
	background: var(--primary-color);
	color: #fff;
	padding: 1rem 2.5rem;
	border: none;
	border-radius: var(--border-radius);
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.errand-submit-btn:hover:not(:disabled) {
	background: var(--primary-dark);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.errand-submit-btn:disabled {
	background: var(--secondary-color);
	cursor: not-allowed;
	opacity: 0.7;
}

/* =============================================================================
   Services Grid
   ============================================================================= */

.errand-services-container {
	margin: 2rem 0;
}

.errand-services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
	gap: 2rem;
}

.errand-service-item {
	background: #fff;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: var(--box-shadow);
	transition: all 0.3s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.errand-service-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.errand-service-image {
	position: relative;
	overflow: hidden;
	height: 200px;
}

.errand-service-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.errand-service-item:hover .errand-service-image img {
	transform: scale(1.05);
}

.errand-service-content {
	padding: 1.5rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.errand-service-title {
	margin: 0 0 1rem 0;
	font-size: 1.25rem;
	font-weight: 600;
}

.errand-service-title a {
	color: var(--dark-color);
	text-decoration: none;
	transition: color 0.3s ease;
}

.errand-service-title a:hover {
	color: var(--primary-color);
}

.errand-service-excerpt {
	color: var(--secondary-color);
	margin-bottom: 1.5rem;
	line-height: 1.6;
	flex: 1;
}

.errand-service-meta {
	border-top: 1px solid var(--border-color);
	padding-top: 1rem;
	margin-top: auto;
}

.errand-service-category {
	display: inline-block;
	background: var(--light-color);
	color: var(--dark-color);
	padding: 0.25rem 0.75rem;
	margin-right: 0.5rem;
	margin-bottom: 0.5rem;
	border-radius: 15px;
	font-size: 0.8rem;
	font-weight: 500;
	transition: all 0.3s ease;
}

.errand-service-category:hover {
	background: var(--primary-color);
	color: white;
}

/* =============================================================================
   User Center
   ============================================================================= */

.errand-user-center {
	max-width: 1000px;
	margin: 0 auto;
}

.errand-user-info {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 2rem;
	margin-bottom: 2rem;
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
}

.errand-user-info h3 {
	margin: 0 0 1.5rem 0;
	color: white;
	font-size: 1.5rem;
}

.errand-user-info p {
	margin-bottom: 0.75rem;
}

.errand-user-info a {
	color: white;
	text-decoration: underline;
}

.errand-user-orders h3 {
	margin: 0 0 1.5rem 0;
	color: var(--dark-color);
	font-size: 1.5rem;
	font-weight: 600;
}

.errand-orders-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	overflow: hidden;
	box-shadow: var(--box-shadow);
}

.errand-orders-table th,
.errand-orders-table td {
	padding: 1rem;
	text-align: left;
	border-bottom: 1px solid var(--border-color);
	vertical-align: middle;
}

.errand-orders-table th {
	background: var(--light-color);
	font-weight: 600;
	color: var(--dark-color);
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.errand-orders-table tbody tr {
	transition: background-color 0.3s ease;
}

.errand-orders-table tbody tr:hover {
	background: var(--light-color);
}

.errand-orders-table tbody tr:last-child td {
	border-bottom: none;
}

.errand-view-order {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.3s ease;
}

.errand-view-order:hover {
	color: var(--primary-dark);
	text-decoration: underline;
}

/* =============================================================================
   Submit Service Order
   ============================================================================= */

.service-info-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--border-color);
}

.service-info-item:last-child {
	border-bottom: none;
}

.service-info-item strong {
	color: var(--dark-color);
	font-weight: 600;
}

.service-info-item span {
	color: var(--primary-color);
	font-weight: 600;
}

.service-areas {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.service-area-tag {
	background: var(--primary-color);
	color: white;
	padding: 0.25rem 0.75rem;
	border-radius: 15px;
	font-size: 0.8rem;
	font-weight: 500;
}

.errand-submit-btn {
	background: #0073aa;
	color: #fff;
	padding: 12px 30px;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	cursor: pointer;
	transition: background 0.3s ease;
}

.errand-submit-btn:hover {
	background: #005a87;
}

.errand-submit-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Service Detail Sidebar Spacing */
.service-detail-sidebar .service-areas-title {
	margin-bottom: 10px;
}

.service-detail-sidebar .service-info-item.service-info-price {
	border-bottom: 1px solid #eee;
	padding-bottom: 15px;
	margin-bottom: 15px;
}

/* Service Price Display Styling */
.service-price-display {
	/* margin-top: 5px; */
}

.service-price-display .service-price-primary {
	display: block;
	font-size: 1.2em;
	font-weight: 600;
	color: var(--primary-color);
	margin-bottom: 0px;
}

.service-price-display .service-price-secondary {
	display: block;
	font-size: 0.9em;
	color: #666;
	font-weight: normal;
}

/* Services Grid */
.errand-services-container {
	margin: 20px 0;
}

.errand-services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
}

.errand-service-item {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
}

.errand-service-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Service item link wrapper */
.errand-service-item-link {
	display: block;
	text-decoration: none;
	color: inherit;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

.errand-service-item-link:hover,
.errand-service-item-link:focus {
	text-decoration: none;
	color: inherit;
}

.errand-service-image img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.errand-service-item:hover .errand-service-image img {
	transform: scale(1.05);
}

.errand-service-content {
	padding: 20px;
}

.errand-service-title {
	margin: 0 0 10px 0;
	font-size: 18px;
	line-height: 1.4;
	transition: color 0.3s ease;
}

.errand-service-title,
.errand-service-title * {
	color: var(--primary-color);
	display: flex;
	align-items: center;
	gap: 0.5em;
	transition: color 0.3s ease;
}

/* Service Icon Styles */
.service-title-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
	color: var(--primary-color);
	transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Image Icon Styles */
.service-title-image-icon .service-icon {
	width: 1.2em;
	height: 1.2em;
	object-fit: contain;
	display: block;
	transition: transform 0.3s ease;
	filter: brightness(0) saturate(100%) invert(39%) sepia(69%) saturate(5617%) hue-rotate(194deg) brightness(93%) contrast(101%) !important;
}

/* Font Icon Styles */
.service-title-font-icon {
	font-size: 1.1em;
	color: var(--primary-color);
}

.service-title-font-icon i,
.service-title-font-icon span {
	transition: transform 0.3s ease;
	display: block;
	line-height: 1;
}

/* Dashicons specific adjustments */
.service-title-font-icon .dashicons {
	width: 1em;
	height: 1em;
	font-size: 1em;
	line-height: 1;
	vertical-align: baseline;
	color: var(--primary-color);
}

.service-title-text {
	flex: 1;
	line-height: inherit;
	transition: color 0.3s ease;
}

/* Hover Effects - 只保持图标放大效果 */
.errand-service-item:hover .service-title-icon {
	transform: scale(1.1);
}

.errand-service-item:hover .service-title-font-icon i,
.errand-service-item:hover .service-title-font-icon span {
	transform: scale(1.1);
}

.errand-service-item:hover .service-title-image-icon .service-icon {
	transform: scale(1.1);
}

.errand-service-excerpt {
	color: #666;
	margin-bottom: 15px;
	line-height: 1.6;
}

.errand-service-meta {
	border-top: 1px solid #eee;
	padding-top: 15px;
}

.errand-service-category {
	display: inline-block;
	background: #f0f0f0;
	color: #333;
	padding: 4px 8px;
	margin-right: 5px;
	border-radius: 3px;
	font-size: 12px;
}

/* User Center */
.errand-user-center {
	max-width: 1000px;
	margin: 0 auto;
}

.errand-user-info {
	background: #f9f9f9;
	padding: 20px;
	margin-bottom: 30px;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.errand-user-info h3 {
	margin: 0 0 15px 0;
	color: #333;
}

.errand-user-orders h3 {
	margin: 0 0 20px 0;
	color: #333;
}

.errand-orders-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

.errand-orders-table th,
.errand-orders-table td {
	padding: 12px 15px;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.errand-orders-table th {
	background: #f8f9fa;
	font-weight: 600;
	color: #333;
}

.errand-orders-table tbody tr:hover {
	background: #f8f9fa;
}

.errand-view-order {
	color: #0073aa;
	text-decoration: none;
}

.errand-view-order:hover {
	text-decoration: underline;
}

/* =============================================================================
   Responsive Design
   ============================================================================= */

/* Tablet Styles */
@media (max-width: 1024px) {
	.hero-title {
		font-size: 2.5rem;
	}
	
	.hero-description {
		font-size: 1.1rem;
	}
	
	.errand-services-grid {
		grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	}
}

/* Mobile Styles */
@media (max-width: 768px) {
	:root {
		--gutter: 15px;
	}
	
	.errand-hero-section {
		padding: 60px 0;
	}
	
	.hero-title {
		font-size: 2rem;
		margin-bottom: 1rem;
	}
	
	.hero-description {
		font-size: 1rem;
		margin-bottom: 2rem;
	}
	
	.hero-actions {
		flex-direction: column;
		align-items: center;
	}
	
	.hero-actions .btn {
		width: 100%;
		max-width: 300px;
	}
	
	.errand-form {
		padding: 2rem 1.5rem;
		margin: 0 10px;
	}
	
	/*.errand-form-section h3 {*/
	/*	font-size: 1.1rem;*/
	/*}*/
	
	.errand-services-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
	
	.errand-orders-table {
		font-size: 0.85rem;
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
	
	.errand-orders-table th,
	.errand-orders-table td {
		padding: 0.75rem 0.5rem;
	}
	
	/*.errand-order-detail {*/
	/*	flex-direction: column;*/
	/*	align-items: flex-start;*/
	/*}*/
	
	/*.errand-order-detail strong {*/
	/*	width: auto;*/
	/*	margin-bottom: 0.25rem;*/
	/*}*/
}

/* Small Mobile Styles */
@media (max-width: 480px) {
	.errand-form {
		padding: 1.5rem 1rem;
		margin: 0 5px;
	}
	
	.hero-title {
		font-size: 1.75rem;
	}
	
	.hero-description {
		font-size: 0.95rem;
	}
	
	.btn {
		padding: 0.75rem 1.5rem;
		font-size: 0.9rem;
	}
	
	.btn-large {
		padding: 1rem 2rem;
		font-size: 1rem;
	}
	
	.errand-service-content {
		padding: 1rem;
	}
	
	/* Service icon responsive adjustments */
	.errand-service-title {
		font-size: 16px;
	}
	
	.errand-service-title a {
		gap: 0.4em;
	}
	
	.service-title-font-icon {
		font-size: 1em;
	}
	
	.errand-user-info {
		padding: 1.5rem 1rem;
	}
}

/* =============================================================================
   Loading States and Animations
   ============================================================================= */

.errand-loading {
	text-align: center;
	padding: 3rem 1rem;
	color: var(--secondary-color);
}

.errand-loading::after {
	content: "";
	display: inline-block;
	width: 24px;
	height: 24px;
	border: 3px solid var(--border-color);
	border-top: 3px solid var(--primary-color);
	border-radius: 50%;
	animation: errand-spin 1s linear infinite;
	margin-left: 10px;
	vertical-align: middle;
}

@keyframes errand-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Fade in animation */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/*.errand-order-result {*/
/*	animation: fadeIn 0.5s ease-out;*/
/*}*/

/* Pulse animation for loading buttons */
@keyframes pulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
	100% {
		transform: scale(1);
	}
}

.errand-submit-btn:disabled {
	animation: pulse 2s infinite;
}

/* =============================================================================
   Error and Success Messages
   ============================================================================= */

.errand-message {
	padding: 1rem 1.5rem;
	margin: 1.5rem 0;
	border-radius: var(--border-radius);
	font-weight: 500;
	position: relative;
	animation: fadeIn 0.3s ease-out;
}

.errand-message::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	border-radius: var(--border-radius) 0 0 var(--border-radius);
}

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

.errand-message.success::before {
	background: var(--success-color);
}

.errand-message.error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f1b0b7;
}

.errand-message.error::before {
	background: var(--danger-color);
}

.errand-message.warning {
	background: #fff3cd;
	color: #856404;
	border: 1px solid #ffeaa7;
}

.errand-message.warning::before {
	background: var(--warning-color);
}

.errand-message.info {
	background: #cce5ff;
	color: #004085;
	border: 1px solid #99d3ff;
}

.errand-message.info::before {
	background: var(--info-color);
}

.errand-message-close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	background: none;
	border: none;
	color: inherit;
	cursor: pointer;
	padding: 0.25rem;
	border-radius: 4px;
	opacity: 0.7;
	transition: opacity 0.3s ease;
}

.errand-message-close:hover {
	opacity: 1;
}

.errand-success-message,
.errand-error-message {
	text-align: center;
	padding: var(--auth-spacing-xl);
	border-radius: var(--auth-border-radius);
	margin-bottom: var(--auth-spacing-lg);
}

.errand-success-message {
	background: rgba(40, 167, 69, 0.1);
	border: 1px solid rgba(40, 167, 69, 0.2);
	color: var(--auth-success);
}

.errand-error-message {
	background: rgba(220, 53, 69, 0.1);
	border: 1px solid rgba(220, 53, 69, 0.2);
	color: var(--auth-danger);
}

.success-icon,
.error-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: currentColor;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto var(--auth-spacing-md);
	font-size: 1.5rem;
}

.error-actions {
	display: flex;
	gap: var(--auth-spacing-md);
	justify-content: center;
	margin-top: var(--auth-spacing-lg);
	align-items: center;
}

/* =============================================================================
   Print Styles
   ============================================================================= */

@media print {
	.errand-hero-section,
	.hero-actions {
		display: none;
	}
	
	.errand-form {
		box-shadow: none;
		border: 1px solid #000;
	}
	
	/*.errand-order-result {*/
	/*	page-break-inside: avoid;*/
	/*	border: 1px solid #000;*/
	/*	box-shadow: none;*/
	/*}*/
	
	.errand-orders-table {
		page-break-inside: avoid;
	}
	
	a {
		color: #000 !important;
		text-decoration: underline;
	}
}

/* =============================================================================
   Accessibility Improvements
   ============================================================================= */

/* Focus styles */
.btn:focus,
input:focus,
select:focus,
textarea:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	:root {
		--primary-color: #000080;
		--border-color: #000;
		--secondary-color: #000;
	}
	
	.errand-service-item {
		border: 2px solid #000;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Screen reader only content */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Skip to content link */
.skip-link {
	position: absolute;
	top: -40px;
	left: 6px;
	background: var(--primary-color);
	color: white;
	padding: 8px 16px;
	text-decoration: none;
	border-radius: 0 0 4px 4px;
	z-index: 9999;
}

.skip-link:focus {
	top: 0;
}

/* =============================================================================
   Language-specific styles
   ============================================================================= */

/* Chinese fonts */
.lang-hk {
	font-family: "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei", "WenQuanYi Micro Hei", sans-serif;
}

/* English fonts */
.lang-en {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.lang-zh,
.lang-hk,
.lang-en {
	font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
}

/* Right-to-left language support (for future use) */
.lang-ar,
.lang-he {
	direction: rtl;
	text-align: right;
}

/*.lang-ar .errand-form-row,*/
/*.lang-he .errand-form-row {*/
/*	text-align: right;*/
/*}*/

/*.lang-ar .errand-order-detail,*/
/*.lang-he .errand-order-detail {*/
/*	flex-direction: row-reverse;*/
/*}*/

.lang-zh button, .lang-hk button,
.lang-zh input, .lang-hk input,
.lang-zh select, .lang-hk select,
.lang-zh optgroup, .lang-hk optgroup,
.lang-zh textarea, .lang-hk textarea {
	font-family: inherit;
}

/* =============================================================================
   Dark Mode Support (for future implementation)
   ============================================================================= */

@media (prefers-color-scheme: dark) {
	/* Dark mode styles can be added here in the future */
}

/* =============================================================================
   Utility Classes
   ============================================================================= */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }

.bg-light { background-color: var(--light-color); }
.bg-primary { background-color: var(--primary-color); color: white; }

.border-radius { border-radius: var(--border-radius); }
.box-shadow { box-shadow: var(--box-shadow); }

/* =============================================================================
   Service Tabs Order Form
   ============================================================================= */

.errand-service-tabs-order-container {
	max-width: 1000px;
	margin: 0 auto;
	background: white;
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
	overflow: hidden;
}

/* Service Tabs Navigation */
.service-tabs-header {
	border-bottom: 1px solid var(--border-color);
	background: var(--light-color);
}

.service-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	padding: 1rem;
	justify-content: center;
}

.service-tab {
	background: white;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius) var(--border-radius) 0 0;
	padding: 1rem 1.5rem;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	min-width: 120px;
	max-width: 160px;
	flex: 1;
	margin: 0 2px;
	position: relative;
	top: 1px;
}

.service-tab:hover {
	background: var(--primary-color);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 115, 170, 0.2);
}

.service-tab.active {
	background: var(--primary-color);
	color: white;
	border-bottom-color: var(--primary-color);
	box-shadow: 0 -2px 8px rgba(0, 115, 170, 0.2);
	outline: none;
}

.service-tab-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	transition: all 0.3s ease;
}

.service-tab.active .service-tab-icon,
.service-tab:hover .service-tab-icon {
	background: rgba(255, 255, 255, 0.2);
	transform: scale(1.1);
}

.service-tab-icon i,
.service-tab-icon span {
	font-size: 1.25rem;
	color: inherit;
}

.service-tab-image {
	width: 1.5rem;
	height: 1.5rem;
	object-fit: contain;
	filter: brightness(0) invert(0.7);
	transition: filter 0.3s ease;
}

.service-tab.active .service-tab-image,
.service-tab:hover .service-tab-image {
	filter: brightness(0) invert(1);
}

.service-tab-title {
	font-size: 0.85rem;
	font-weight: 600;
	text-align: center;
	line-height: 1.2;
	color: inherit;
}

/* Service Details Content */
.service-details-content {
	position: relative;
}

.service-detail-panel {
	display: none;
	padding: 2rem;
	animation: fadeIn 0.5s ease-out;
}

.service-detail-panel.active {
	display: block;
}

.service-detail-wrapper {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 2rem;
	align-items: start;
}

.service-detail-title {
	margin: 0 0 1.5rem 0;
	color: var(--primary-color);
	font-size: 1.75rem;
	font-weight: 700;
	border-bottom: 2px solid var(--primary-color);
	padding-bottom: 0.5rem;
}

.service-detail-description {
	color: var(--secondary-color);
	line-height: 1.6;
	margin-bottom: 1.5rem;
	font-size: 1.1rem;
}

.service-detail-full-content {
	color: var(--dark-color);
	line-height: 1.7;
}

.service-detail-full-content h4,
.service-detail-full-content h5 {
	color: var(--primary-color);
	margin: 1.5rem 0 1rem 0;
}

.service-detail-sidebar {
	background: var(--light-color);
	padding: 1.5rem;
	border-radius: var(--border-radius);
	border: 1px solid var(--border-color);
}

.service-detail-sidebar .service-info-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--border-color);
}

.service-detail-sidebar .service-info-item:last-child {
	border-bottom: none;
}

.service-detail-sidebar .service-areas {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	justify-content: flex-start;
	margin: 1rem 0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Order Submit Button */
.service-order-submit {
	padding: 2rem;
	text-align: center;
	border-top: 1px solid var(--border-color);
	background: var(--light-color);
}

.service-order-link {
	padding: 1rem 2.5rem;
	font-size: 1.1rem;
	font-weight: 600;
	border-radius: var(--border-radius);
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
	background: var(--primary-color);
	color: white;
	text-decoration: none;
	display: inline-block;
}

.service-order-link:link,
.service-order-link:visited,
.service-order-link:hover,
.service-order-link:active,
.service-order-link:focus {
	color: white;
	background: var(--primary-color);
}

.site-main .service-order-link:link,
.site-main .service-order-link:visited,
.site-main .service-order-link:hover,
.site-main .service-order-link:active,
.site-main .service-order-link:focus {
	color: white;
	background: var(--primary-color);
}

a:visited:hover .service-order-link {
	color: white;
	background: var(--primary-color);
}

.service-order-link:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 115, 170, 0.3);
	background: var(--primary-dark);
	color: white;
}

.service-order-link:hover,
.service-order-link:active,
.service-order-link:focus {
	color: white;
	background: var(--primary-dark);
}

.service-order-link:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

/* Responsive Design for Service Tabs */
@media (max-width: 768px) {
	.service-tabs-nav {
		padding: 0.75rem;
		gap: 0.25rem;
	}
	
	.service-tab {
		padding: 0.75rem 1rem;
		min-width: 100px;
		max-width: 120px;
		margin: 0 1px;
	}
	
	.service-tab-title {
		font-size: 0.75rem;
	}
	
	.service-tab-icon {
		width: 2rem;
		height: 2rem;
	}
	
	.service-detail-wrapper {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
	
	.service-detail-panel {
		padding: 1.5rem;
	}
	
	.service-order-submit {
		padding: 1.5rem;
	}
}

@media (max-width: 480px) {
	.service-tabs-nav {
		flex-direction: column;
		gap: 0.5rem;
	}
	
	.service-tab {
		flex-direction: row;
		max-width: 100%;
		margin: 0;
		border-radius: var(--border-radius);
		position: static;
	}
	
	.service-tab-icon {
		width: 1.75rem;
		height: 1.75rem;
		margin-right: 0.75rem;
	}
	
	.service-tab-title {
		font-size: 0.9rem;
		text-align: left;
	}
}

/* =============================================================================
   Authentication System Styles - MOVED TO DEDICATED AUTH FILES
   ============================================================================= */

/*
   Auth styles have been moved to dedicated files:
   - css/auth/auth.css (base styles)
   - css/auth/login.css (login page specific)
   - css/auth/register.css (register page specific)
   - css/auth/forget-password.css (forgot password page specific)
   - css/auth/reset-password.css (reset password page specific)
   
   This ensures better organization and maintainability.
*/

/*
   All auth styles below have been moved to dedicated auth files.
   Keeping them commented for reference.
*/

/* =============================================================================
   Accessibility and Motion Preferences
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms;
		animation-iteration-count: 1;
		transition-duration: 0.01ms;
		scroll-behavior: auto;
	}
}

@media (prefers-contrast: high) {
	:root {
		--border-color: #000000;
		--border-light: #666666;
		--text-secondary: #000000;
		--bg-secondary: #ffffff;
		--bg-accent: #ffffff;
	}
}
