/**
 * Eurosoft Hub - Frontend Styles
 *
 * @package Eurosoft_Hub
 * @since   1.0.0
 */

/* General */
.eurosoft-user-dashboard,
.eurosoft-paths-page,
.eurosoft-achievements-page,
.eurosoft-certificates-page,
.eurosoft-ranking-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* Widget Base */
.eurosoft-widget {
	background: #fff;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.eurosoft-widget h3 {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 16px;
	color: #1e1e1e;
}

/* Welcome Widget */
.eurosoft-welcome-header {
	display: flex;
	align-items: center;
	gap: 15px;
}

.eurosoft-avatar {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
}

.eurosoft-welcome-info h2 {
	margin: 0 0 5px 0;
	font-size: 20px;
}

.eurosoft-company-info {
	margin: 0;
	color: #646970;
}

/* Dashboard Grid */
.eurosoft-dashboard-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
}

/* Progress Bar */
.eurosoft-progress-bar {
	background: #e0e0e0;
	border-radius: 10px;
	height: 10px;
	overflow: hidden;
	margin: 10px 0;
}

.eurosoft-progress-fill {
	background: linear-gradient(90deg, #2271b1, #135e96);
	height: 100%;
	border-radius: 10px;
	transition: width 0.3s ease;
}

.eurosoft-progress-text {
	font-size: 13px;
	color: #646970;
	margin: 5px 0 0 0;
}

/* Path Progress */
.eurosoft-path-progress {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #eee;
}

.eurosoft-path-progress:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.eurosoft-path-progress h4 {
	margin: 0 0 10px 0;
	font-size: 14px;
}

/* Points Widget */
.eurosoft-points-value {
	font-size: 48px;
	font-weight: bold;
	color: #2271b1;
	text-align: center;
	line-height: 1.2;
}

.eurosoft-rank-info {
	text-align: center;
	color: #646970;
}

/* Badges Grid */
.eurosoft-badges-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.eurosoft-badge-item {
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f6fc;
	border-radius: 50%;
	transition: transform 0.2s;
}

.eurosoft-badge-item:hover {
	transform: scale(1.1);
}

.eurosoft-badge-item img {
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.eurosoft-badge-item .dashicons {
	font-size: 24px;
	color: #2271b1;
}

/* Full Badges Grid */
.eurosoft-badges-full-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 20px;
}

.eurosoft-badge-card {
	text-align: center;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 8px;
}

.eurosoft-badge-card img {
	width: 60px;
	height: 60px;
	margin-bottom: 10px;
}

.eurosoft-badge-card h4 {
	margin: 10px 0 5px 0;
	font-size: 13px;
}

.eurosoft-badge-date {
	font-size: 11px;
	color: #646970;
	margin: 0;
}

/* Certificates List */
.eurosoft-certificates-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.eurosoft-certificates-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #eee;
}

.eurosoft-certificates-list li:last-child {
	border-bottom: none;
}

.eurosoft-certificates-list .dashicons {
	color: #f0b849;
}

/* Certificates Grid */
.eurosoft-certificates-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}

.eurosoft-certificate-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
}

.eurosoft-certificate-card .dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
	color: #f0b849;
	margin-bottom: 10px;
}

.eurosoft-certificate-card h4 {
	margin: 10px 0 5px 0;
}

.eurosoft-cert-dates {
	font-size: 12px;
	color: #646970;
	margin: 10px 0;
}

/* Path Card */
.eurosoft-path-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
}

.eurosoft-path-card h3 {
	margin-top: 0;
}

/* Course List */
.eurosoft-courses-list {
	margin-top: 15px;
}

.eurosoft-course-item {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 12px 15px;
	background: #f9f9f9;
	border-radius: 6px;
	margin-bottom: 8px;
}

.eurosoft-course-item.eurosoft-course-completed {
	background: #edfaef;
}

.eurosoft-course-item.eurosoft-course-locked {
	background: #f6f7f7;
	opacity: 0.8;
}

.eurosoft-course-item .eurosoft-course-order {
	background: #2271b1;
	color: #fff;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 600;
	flex-shrink: 0;
}

.eurosoft-course-completed .eurosoft-course-order {
	background: #008a20; /* WCAG AA compliant green */
}

.eurosoft-course-locked .eurosoft-course-order {
	background: #646970; /* Improved contrast */
}

.eurosoft-course-info {
	flex: 1;
}

.eurosoft-course-info h4 {
	margin: 0 0 5px 0;
	font-size: 14px;
}

.eurosoft-course-info h4 a {
	color: #1e1e1e;
	text-decoration: none;
}

.eurosoft-course-info h4 a:hover {
	color: #2271b1;
}

.eurosoft-lock-reason,
.eurosoft-completed-info {
	font-size: 12px;
	color: #646970;
	margin: 0;
}

.eurosoft-course-status {
	flex-shrink: 0;
}

.eurosoft-course-status .dashicons-yes-alt {
	color: #008a20; /* WCAG AA compliant green */
}

.eurosoft-course-status .dashicons-lock {
	color: #646970; /* Improved contrast */
}

.eurosoft-course-status .dashicons-arrow-right-alt {
	color: #2271b1;
}

/* Ranking Page */
.eurosoft-my-ranking {
	background: #fff;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
	text-align: center;
}

.eurosoft-ranking-stats {
	display: flex;
	gap: 40px;
	justify-content: center;
	margin: 20px 0;
}

.eurosoft-rank-item {
	text-align: center;
}

.eurosoft-rank-number {
	display: block;
	font-size: 36px;
	font-weight: bold;
	color: #2271b1;
	line-height: 1.2;
}

.eurosoft-rank-label {
	font-size: 13px;
	color: #646970;
}

/* Leaderboard Table */
.eurosoft-leaderboard,
.eurosoft-leaderboard-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
}

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

.eurosoft-leaderboard th,
.eurosoft-leaderboard-table th {
	background: #f9f9f9;
	font-weight: 600;
}

.eurosoft-leaderboard .eurosoft-current-user,
.eurosoft-leaderboard-table .eurosoft-current-user {
	background: #f0f6fc;
}

.eurosoft-avatar-small,
.eurosoft-avatar-tiny {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	vertical-align: middle;
	margin-right: 10px;
}

.eurosoft-avatar-tiny {
	width: 24px;
	height: 24px;
}

/* Points Summary */
.eurosoft-points-summary {
	background: linear-gradient(135deg, #2271b1, #135e96);
	border-radius: 8px;
	padding: 30px;
	text-align: center;
	color: #fff;
	margin-bottom: 20px;
}

.eurosoft-points-summary h3 {
	margin: 0 0 10px 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: 14px;
}

.eurosoft-points-big {
	font-size: 56px;
	font-weight: bold;
	line-height: 1;
}

/* Shortcode Widgets */
.eurosoft-paths-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

.eurosoft-paths-list .eurosoft-path-card {
	display: flex;
	flex-direction: column;
}

.eurosoft-path-image {
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: 6px;
	margin-bottom: 15px;
}

.eurosoft-path-content h3 {
	margin: 0 0 10px 0;
}

.eurosoft-path-meta {
	color: #646970;
	font-size: 13px;
	margin: 0 0 10px 0;
}

/* Progress Summary */
.eurosoft-progress-summary {
	display: flex;
	gap: 30px;
	justify-content: center;
	text-align: center;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
	margin-bottom: 20px;
}

.eurosoft-stat {
	text-align: center;
}

.eurosoft-stat-value {
	display: block;
	font-size: 32px;
	font-weight: bold;
	color: #2271b1;
}

.eurosoft-stat-label {
	font-size: 13px;
	color: #646970;
}

/* Badges Widget */
.eurosoft-badges-widget .eurosoft-badges-list {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}

.eurosoft-badges-widget .eurosoft-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
}

.eurosoft-badges-widget .eurosoft-badge img {
	width: 50px;
	height: 50px;
}

.eurosoft-badges-widget .eurosoft-badge-title {
	font-size: 11px;
	color: #646970;
}

/* Certificates Widget */
.eurosoft-certificates-widget .eurosoft-certificates-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.eurosoft-certificates-widget .eurosoft-certificate {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #eee;
}

.eurosoft-certificates-widget .eurosoft-certificate:last-child {
	border-bottom: none;
}

.eurosoft-certificates-widget .eurosoft-certificate-info h4 {
	margin: 0 0 5px 0;
	font-size: 14px;
}

.eurosoft-certificates-widget .eurosoft-certificate-info p {
	margin: 0;
	font-size: 12px;
	color: #646970;
}

.eurosoft-cert-validity {
	font-size: 11px;
	color: #646970;
}

/* Accessibility - Focus Styles */
.eurosoft-user-dashboard a:focus,
.eurosoft-paths-page a:focus,
.eurosoft-achievements-page a:focus,
.eurosoft-certificates-page a:focus,
.eurosoft-ranking-page a:focus,
.eurosoft-widget a:focus,
.eurosoft-path-card a:focus,
.eurosoft-course-info h4 a:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.eurosoft-badge-item:focus,
.eurosoft-badge-card:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Focus visible for buttons and interactive elements */
.eurosoft-user-dashboard button:focus-visible,
.eurosoft-paths-page button:focus-visible,
.eurosoft-ranking-page button:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Skip link for keyboard navigation */
.eurosoft-skip-link {
	position: absolute;
	top: -40px;
	left: 0;
	padding: 8px 16px;
	background: #2271b1;
	color: #fff;
	text-decoration: none;
	z-index: 100000;
	transition: top 0.3s;
}

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

/* Screen reader only class */
.eurosoft-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;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.eurosoft-progress-fill {
		transition: none;
	}

	.eurosoft-badge-item {
		transition: none;
	}

	.eurosoft-badge-item:hover {
		transform: none;
	}

	.eurosoft-skip-link {
		transition: none;
	}
}

/* Print Styles */
@media print {
	.eurosoft-user-dashboard,
	.eurosoft-paths-page,
	.eurosoft-achievements-page,
	.eurosoft-certificates-page,
	.eurosoft-ranking-page {
		max-width: 100%;
		padding: 0;
	}

	.eurosoft-widget {
		box-shadow: none;
		border: 1px solid #ddd;
		page-break-inside: avoid;
	}

	.eurosoft-skip-link,
	.eurosoft-download-cert,
	.eurosoft-certificate-card .button {
		display: none;
	}

	.eurosoft-progress-fill {
		background: #2271b1 !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.eurosoft-leaderboard,
	.eurosoft-leaderboard-table {
		border: 1px solid #ddd;
	}

	.eurosoft-leaderboard th,
	.eurosoft-leaderboard td,
	.eurosoft-leaderboard-table th,
	.eurosoft-leaderboard-table td {
		border: 1px solid #ddd;
	}
}

/* Responsive */
@media screen and (max-width: 768px) {
	.eurosoft-dashboard-grid {
		grid-template-columns: 1fr;
	}

	.eurosoft-ranking-stats {
		flex-direction: column;
		gap: 20px;
	}

	.eurosoft-progress-summary {
		flex-direction: column;
		gap: 15px;
	}

	.eurosoft-paths-list {
		grid-template-columns: 1fr;
	}

	.eurosoft-badges-full-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ========================================
   Single Learning Path (Route) Page Styles
   Issue #30 Fix - Improved UI
   ======================================== */

/* Route Metadata Section */
.eurosoft-path-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	padding: 15px 20px;
	background: #f8f9fa;
	border-radius: 8px;
	margin-bottom: 25px;
	border-left: 4px solid #0073aa;
}

.eurosoft-path-meta > div {
	display: flex;
	align-items: center;
	gap: 8px;
}

.eurosoft-path-meta .dashicons {
	color: #0073aa;
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.eurosoft-path-meta strong {
	color: #1e1e1e;
}

/* Default Description Styling */
.eurosoft-path-default-description {
	background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
	padding: 20px;
	border-radius: 8px;
	border-left: 4px solid #0073aa;
	margin-bottom: 20px;
}

.eurosoft-path-default-description p {
	margin: 0;
	color: #444;
	font-size: 15px;
	line-height: 1.6;
}

/* Empty State for No Courses */
.eurosoft-path-empty-state {
	text-align: center;
	padding: 50px 30px;
	background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
	border-radius: 12px;
	border: 2px dashed #e0c060;
	margin: 30px 0;
}

.eurosoft-path-empty-state .eurosoft-empty-icon {
	font-size: 64px;
	width: 64px;
	height: 64px;
	color: #c09030;
	margin-bottom: 15px;
	display: block;
}

.eurosoft-path-empty-state h3 {
	margin: 0 0 10px 0;
	color: #8b6914;
	font-size: 22px;
}

.eurosoft-path-empty-state p {
	margin: 0 0 20px 0;
	color: #6b5a2e;
	font-size: 15px;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

.eurosoft-edit-path-button {
	display: inline-block;
	padding: 10px 25px;
	background: #0073aa;
	color: #fff !important;
	text-decoration: none;
	border-radius: 5px;
	font-weight: 500;
	transition: background 0.2s ease;
}

.eurosoft-edit-path-button:hover {
	background: #005a87;
	color: #fff !important;
}

/* Debug Panel Styling */
.eurosoft-path-debug {
	margin-top: 30px;
}

.eurosoft-path-debug h4 {
	border-bottom: 1px solid #ddd;
	padding-bottom: 10px;
	margin-bottom: 15px;
}

/* Mobile Responsive for Route Page */
@media screen and (max-width: 600px) {
	.eurosoft-path-meta {
		flex-direction: column;
		gap: 12px;
	}

	.eurosoft-path-empty-state {
		padding: 30px 20px;
	}

	.eurosoft-path-empty-state .eurosoft-empty-icon {
		font-size: 48px;
		width: 48px;
		height: 48px;
	}

	.eurosoft-path-empty-state h3 {
		font-size: 18px;
	}
}
