/**
 * RADAR DSA Metadata Admin Styles
 */

/* Meta Box Styles */
.radar-dsa-meta-box {
	max-width: 100%;
}

.radar-quick-actions {
	margin: 15px 0;
	padding: 10px 15px;
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.radar-quick-actions .button {
	margin: 0;
}

.radar-selection-count {
	margin-left: auto;
	font-weight: 600;
	color: #2271b1;
}

.radar-selection-count .count {
	font-size: 1.1em;
}

/* Categories Container */
.radar-categories-container {
	margin-top: 20px;
}

.radar-category {
	margin-bottom: 20px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.2s;
}

.radar-category:hover {
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.radar-category-header {
	padding: 15px;
	background: #f6f7f7;
	border-bottom: 1px solid #dcdcde;
	cursor: pointer;
	user-select: none;
}

.radar-category-header:hover {
	background: #f0f0f1;
}

.radar-category-header h4 {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	line-height: 1.4;
}

.radar-toggle-icon {
	transition: transform 0.2s;
	display: inline-block;
	width: 20px;
	text-align: center;
	color: #50575e;
}

.radar-category.collapsed .radar-toggle-icon {
	transform: rotate(-90deg);
}

.radar-category.collapsed .radar-infringements {
	display: none;
}

.radar-category-id {
	color: #50575e;
	font-weight: normal;
	font-size: 0.9em;
}

.radar-category-count {
	margin-left: auto;
	background: #2271b1;
	color: #fff;
	padding: 2px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: normal;
}

.radar-category-count .selected {
	font-weight: 600;
}

.radar-category-description {
	margin: 8px 0 0 0;
	color: #50575e;
	font-size: 13px;
	line-height: 1.5;
}

/* Infringements */
.radar-infringements {
	padding: 15px;
	max-height: 600px;
	overflow-y: auto;
}

.radar-infringement {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f0f0f1;
}

.radar-infringement:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.radar-infringement label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	cursor: pointer;
	line-height: 1.4;
}

.radar-infringement label:hover .radar-infringement-name {
	color: #2271b1;
}

.radar-infringement input[type="checkbox"] {
	margin-right: 8px;
}

.radar-infringement-id {
	color: #2271b1;
	margin-right: 5px;
	font-family: Consolas, Monaco, monospace;
	font-size: 0.95em;
}

.radar-infringement-name {
	transition: color 0.2s;
}

.radar-infringement-details {
	margin-left: 24px;
	margin-top: 8px;
}

.radar-infringement-details .description {
	margin: 5px 0;
	color: #3c434a;
	line-height: 1.6;
	font-size: 13px;
}

.radar-dsa-articles {
	margin: 8px 0;
	font-size: 12px;
	color: #50575e;
}

.radar-dsa-articles strong {
	color: #3c434a;
}

/* Observables */
.radar-observables {
	margin-top: 10px;
	background: #f6f7f7;
	padding: 10px;
	border-radius: 4px;
	border: 1px solid #dcdcde;
}

.radar-observables summary {
	cursor: pointer;
	font-weight: 600;
	color: #3c434a;
	font-size: 12px;
	padding: 5px;
}

.radar-observables summary:hover {
	color: #2271b1;
}

.radar-observables ul {
	margin: 10px 0 0 20px;
	list-style-type: disc;
}

.radar-observables li {
	margin: 5px 0;
	line-height: 1.5;
	font-size: 12px;
	color: #50575e;
}

/* Metadata Info */
.radar-metadata-info {
	margin-top: 20px;
	padding: 10px 15px;
	background: #f0f0f1;
	border-radius: 4px;
	text-align: center;
}

.radar-metadata-info .description {
	margin: 0;
	color: #50575e;
	font-size: 12px;
}

/* Settings Page Styles */
.radar-framework-info {
	background: #f6f7f7;
	padding: 20px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	margin: 20px 0;
}

.radar-framework-info p {
	margin: 8px 0;
}

.radar-framework-info strong {
	color: #1d2327;
}

.radar-categories-preview {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 15px;
	margin-top: 15px;
}

.radar-category-preview {
	background: #fff;
	padding: 15px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.radar-category-preview h4 {
	margin: 0 0 10px 0;
	color: #1d2327;
	font-size: 14px;
}

.radar-category-preview p {
	margin: 5px 0;
	color: #50575e;
	font-size: 13px;
	line-height: 1.5;
}

/* Responsive Design */
@media screen and (max-width: 782px) {
	.radar-quick-actions {
		flex-wrap: wrap;
	}
	
	.radar-selection-count {
		width: 100%;
		margin-top: 10px;
		text-align: center;
	}
	
	.radar-categories-preview {
		grid-template-columns: 1fr;
	}
	
	.radar-infringements {
		max-height: 400px;
	}
}

/* Loading State */
.radar-loading {
	opacity: 0.6;
	pointer-events: none;
}

.radar-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #f3f3f3;
	border-top: 2px solid #2271b1;
	border-radius: 50%;
	animation: radar-spin 1s linear infinite;
}

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

/* Accessibility */
.radar-category-header:focus,
.radar-observables summary:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Print Styles */
@media print {
	.radar-quick-actions,
	.radar-toggle-icon {
		display: none;
	}
	
	.radar-category {
		page-break-inside: avoid;
	}
	
	.radar-infringements {
		max-height: none;
	}
}