/**
 * AR TMC Public Directory styles
 * Aesthetic: minimalist, geometric, argon (purple/cyan).
 */
.artmc-directory {
	font-family: 'Cairo', 'Segoe UI', system-ui, sans-serif;
	color: #1a1a2e;
	max-width: 1280px;
	margin: 0 auto;
	padding: 24px 16px;
	line-height: 1.6;
}

/* ---------- Header ---------- */
.artmc-dir-header {
	text-align: center;
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 2px solid rgba(111, 66, 193, 0.1);
}
.artmc-dir-header h2 {
	margin: 0 0 12px;
	font-size: 32px;
	font-weight: 700;
	background: linear-gradient(135deg, #6f42c1 0%, #0dcaf0 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.artmc-dir-header p {
	margin: 0;
	color: #64748b;
	font-size: 15px;
	max-width: 700px;
	margin: 0 auto;
}

/* ---------- Toolbar ---------- */
.artmc-dir-toolbar {
	display: grid;
	grid-template-columns: 2fr repeat(5, 1fr);
	gap: 12px;
	margin-bottom: 24px;
	padding: 16px;
	background: #f8fafc;
	border-radius: 14px;
	border: 1px solid #e2e8f0;
}
.search-wrap {
	position: relative;
}
.artmc-dir-search {
	width: 100%;
	padding: 12px 16px 12px 44px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.artmc-dir-search:focus {
	outline: none;
	border-color: #6f42c1;
	box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.15);
}
.search-icon {
	position: absolute;
	top: 50%;
	left: 14px;
	transform: translateY(-50%);
	color: #94a3b8;
	pointer-events: none;
}
.artmc-dir-filter {
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	font-size: 13px;
	font-family: inherit;
	background: #fff;
	cursor: pointer;
}
.artmc-dir-filter:focus {
	outline: none;
	border-color: #6f42c1;
}

.artmc-dir-stats {
	margin-bottom: 16px;
	color: #64748b;
	font-size: 13px;
	text-align: center;
}

/* ---------- Grid ---------- */
.artmc-dir-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	min-height: 200px;
}

.artmc-dir-loading {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 20px;
	color: #6f42c1;
	font-weight: 500;
}
.spinner {
	display: inline-block;
	width: 32px;
	height: 32px;
	border: 3px solid #e9d5ff;
	border-top-color: #6f42c1;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Card ---------- */
.artmc-dir-card {
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
	transition: all 0.2s ease;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
}
.artmc-dir-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 30px rgba(111, 66, 193, 0.15);
	border-color: #d1c4e9;
}

.artmc-card-cover {
	height: 90px;
	background: linear-gradient(135deg, #6f42c1 0%, #0dcaf0 100%);
	position: relative;
}
.artmc-card-cover.trainer { background: linear-gradient(135deg, #0dcaf0 0%, #6f42c1 100%); }

.artmc-card-logo {
	position: absolute;
	bottom: -32px;
	right: 16px;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.artmc-card-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.artmc-card-logo-fallback {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #6f42c1 0%, #0dcaf0 100%);
	color: white;
	font-size: 28px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.artmc-card-body {
	padding: 44px 16px 16px;
	flex: 1;
}

.artmc-card-name {
	font-size: 16px;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0 0 4px;
	line-height: 1.3;
}
.artmc-card-type {
	color: #6f42c1;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 12px;
}
.artmc-card-loc {
	color: #64748b;
	font-size: 13px;
	margin-bottom: 12px;
}
.artmc-card-serial {
	font-family: 'SF Mono', Menlo, monospace;
	font-size: 11px;
	color: #6f42c1;
	background: #faf5ff;
	padding: 4px 10px;
	border-radius: 6px;
	display: inline-block;
	margin-bottom: 12px;
}
.artmc-card-specs {
	margin: 8px 0;
}
.artmc-card-spec {
	display: inline-block;
	padding: 3px 10px;
	margin: 0 0 4px 4px;
	background: #f0f7ff;
	color: #1e40af;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
}

.artmc-card-footer {
	padding: 12px 16px;
	border-top: 1px solid #f1f5f9;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #fafbfc;
}
.artmc-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}
.artmc-badge.active { background: #ecfdf5; color: #065f46; }
.artmc-badge.expired { background: #fef3c7; color: #92400e; }
.artmc-badge.revoked { background: #fef2f2; color: #991b1b; }
.artmc-card-cta {
	font-size: 12px;
	font-weight: 600;
	color: #6f42c1;
}

/* ---------- Empty / no-results ---------- */
.artmc-dir-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 20px;
	color: #94a3b8;
}
.artmc-dir-empty::before {
	content: '🔍';
	display: block;
	font-size: 48px;
	margin-bottom: 12px;
}

/* ---------- Pagination ---------- */
.artmc-dir-pagination {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-top: 32px;
	flex-wrap: wrap;
}
.artmc-dir-pagination button {
	padding: 10px 16px;
	border: 1px solid #cbd5e1;
	background: #fff;
	border-radius: 10px;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #475569;
	transition: all 0.15s;
}
.artmc-dir-pagination button:hover:not(:disabled) {
	background: #f8fafc;
	border-color: #6f42c1;
	color: #6f42c1;
}
.artmc-dir-pagination button.active {
	background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
	color: white;
	border-color: #6f42c1;
}
.artmc-dir-pagination button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.artmc-dir-toolbar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
	.artmc-dir-toolbar { grid-template-columns: 1fr; }
	.artmc-dir-grid { grid-template-columns: 1fr; }
	.artmc-dir-header h2 { font-size: 24px; }
}
