/* ===========================
   APDB TOXICITY PROFILE STYLES
   =========================== */

/* Main Section */
.apdb-toxicity-profile {
	margin: 3rem 0;

}

.apdb-category-title {
	font-size: 1.1rem;
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	color: var(--text-primary);

}

.apdb-section-intro {
	color: var(--text-tertiary);
	margin-bottom: 1.5rem;
	line-height: 1.6;

}

/* ===========================
   TOXICITY CARDS
   =========================== */

.apdb-toxicity-card {
	border: 1px solid var(--border-light);
	border-radius: 8px;
	margin-bottom: 1.5rem;
	overflow: hidden;
	background: var(--bg-primary);

}

.apdb-toxicity-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.5rem;
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-light);

}

.apdb-toxicity-name {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--text-primary);

}

.apdb-icon {
	font-size: 1.5rem;

}

.apdb-toxicity-body {
	padding: 1.5rem;

}

.apdb-toxicity-description {
	margin-bottom: 1rem;
	color: var(--text-primary);
	line-height: 1.6;

}

/* ===========================
   SEVERITY BADGES
   =========================== */

.apdb-severity-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-size: 0.875rem;
	font-weight: 600;

}

.apdb-severity-not-defined {
	background: #d1fae5;
	color: #065f46;

}

.apdb-severity-negligible {
	background: #d1fae5;
	color: #065f46;

}

.apdb-severity-mild {
	background: #fef3c7;
	color: #92400e;

}

.apdb-severity-moderate {
	background: #fed7aa;
	color: #9a3412;

}

.apdb-severity-severe {
	background: #fecaca;
	color: #991b1b;

}

.apdb-severity-fatal {
	background: #fca5a5;
	color: #7f1d1d;

}

/* ===========================
   DETAIL ROWS
   =========================== */

.apdb-toxicity-details {
	margin: 1rem 0;

}

.apdb-detail-row {
	display: flex;
	gap: 1rem;
	margin-bottom: 0.75rem;
	align-items: baseline;

}

.apdb-detail-label {
	font-weight: 600;
	color: var(--text-tertiary);
	min-width: 100px;
	flex-shrink: 0;

}

.apdb-detail-value {
	color: var(--text-primary);
	flex: 1;

}

/* ===========================
   EVIDENCE & CONFIDENCE
   =========================== */

.apdb-evidence-box {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	align-items: center;
	padding: 1rem;
	background: var(--success-alpha);
	border-radius: 6px;
	margin-top: 1rem;

}

.apdb-evidence-badge {
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 500;
	background: var(--info-alpha);
	color: var(--info);

}

.apdb-confidence-badge {
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 500;

}

.apdb-confidence-a {
	background: #d1fae5;
	color: #065f46;

}

.apdb-confidence-b {
	background: #fef3c7;
	color: #92400e;

}

.apdb-confidence-c {
	background: #fed7aa;
	color: #9a3412;

}

.apdb-source {
	font-size: 0.875rem;
	color: var(--text-tertiary);
	font-style: italic;

}

/* ===========================
   INFO & WARNING BOXES
   =========================== */

.apdb-info-note {
	background: var(--info-alpha);
	padding: 1rem;
	border-radius: 6px;
	margin-top: 1rem;
	border-left: 3px solid var(--info);
	font-size: 0.95rem;
	color: var(--text-primary);

}

.apdb-warning-box {
	background: var(--warning-alpha);
	padding: 1rem;
	border-radius: 6px;
	margin-top: 0.75rem;
	border-left: 3px solid var(--warning);
	font-size: 0.95rem;
	color: var(--text-primary);

}

/* ===========================
   POPULATION VULNERABILITIES
   =========================== */

.apdb-vulnerability-section {
	margin-top: 2rem;

}

.apdb-vulnerability-card {
	border: 1px solid var(--border-light);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 1rem;
	background: var(--bg-primary);

}

.apdb-vulnerability-header {
	display: flex;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.5rem;
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-light);

}

.apdb-population {
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--text-primary);
	flex: 1;

}

.apdb-vulnerability-body {
	padding: 1.5rem;

}

.apdb-vulnerability-description {
	margin-bottom: 1rem;
	line-height: 1.6;
	color: var(--text-primary);

}

.apdb-vulnerability-details {
	margin-top: 1rem;

}

/* ===========================
   RISK BADGES
   =========================== */

.apdb-risk-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-size: 0.875rem;
	font-weight: 600;

}

.apdb-risk-safe {
	background: #d1fae5;
	color: #065f46;

}

.apdb-risk-caution {
	background: #fef3c7;
	color: #92400e;

}

.apdb-risk-high-risk {
	background: #fed7aa;
	color: #9a3412;

}

.apdb-risk-contraindicated {
	background: #fca5a5;
	color: #7f1d1d;

}

/* ===========================
   REGULATORY RESTRICTIONS
   =========================== */

.apdb-regulatory-section {
	margin-top: 2rem;

}

.apdb-regulation-card {
	border: 1px solid var(--border-light);
	border-radius: 8px;
	margin-bottom: 1.5rem;
	overflow: hidden;
	background: var(--bg-primary);

}

.apdb-regulation-header {
	display: flex;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.5rem;
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-light);

}

.apdb-regulatory-body {
	flex: 1;

}

.apdb-body-name {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0 0 0.25rem 0;
	color: var(--text-primary);

}

.apdb-country-code {
	font-size: 0.875rem;
	font-weight: 400;
	color: var(--text-tertiary);
	margin-left: 0.5rem;

}

.apdb-body-link {
	color: var(--link-primary);
	text-decoration: none;
	font-size: 0.875rem;

}

.apdb-body-link:hover {
	color: var(--link-hover);
	text-decoration: underline;

}

.apdb-regulation-body {
	padding: 1.5rem;

}

.apdb-regulation-item {
	margin-bottom: 1.5rem;

}

.apdb-regulation-item:last-child {
	margin-bottom: 0;

}

.apdb-regulation-type {
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 0.5rem;

}

.apdb-regulation-description {
	margin-bottom: 0.75rem;
	line-height: 1.6;
	color: var(--text-primary);

}

.apdb-regulation-details {
	margin-top: 0.75rem;

}

/* ===========================
   DARK MODE - User Selected
   =========================== */

[data-theme="dark"] .apdb-severity-negligible {
	background: rgba(16, 185, 129, 0.2);
	color: #6ee7b7;

}

[data-theme="dark"] .apdb-severity-mild {
	background: rgba(251, 191, 36, 0.2);
	color: #fcd34d;

}

[data-theme="dark"] .apdb-severity-moderate {
	background: rgba(251, 146, 60, 0.2);
	color: #fdba74;

}

[data-theme="dark"] .apdb-severity-severe {
	background: rgba(239, 68, 68, 0.2);
	color: #fca5a5;

}

[data-theme="dark"] .apdb-severity-fatal {
	background: rgba(220, 38, 38, 0.2);
	color: #f87171;

}

[data-theme="dark"] .apdb-evidence-badge {
	background: rgba(109, 91, 112, 0.3);
	color: var(--info-light);

}

[data-theme="dark"] .apdb-confidence-a {
	background: rgba(16, 185, 129, 0.2);
	color: #6ee7b7;

}

[data-theme="dark"] .apdb-confidence-b {
	background: rgba(251, 191, 36, 0.2);
	color: #fcd34d;

}

[data-theme="dark"] .apdb-confidence-c {
	background: rgba(251, 146, 60, 0.2);
	color: #fdba74;

}

[data-theme="dark"] .apdb-risk-safe {
	background: rgba(16, 185, 129, 0.2);
	color: #6ee7b7;

}

[data-theme="dark"] .apdb-risk-caution {
	background: rgba(251, 191, 36, 0.2);
	color: #fcd34d;

}

[data-theme="dark"] .apdb-risk-high-risk {
	background: rgba(251, 146, 60, 0.2);
	color: #fdba74;

}

[data-theme="dark"] .apdb-risk-contraindicated {
	background: rgba(220, 38, 38, 0.2);
	color: #f87171;

}

/* ===========================
   BROWSER DARK MODE PREFERENCE
   =========================== */

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .apdb-severity-negligible {
		background: rgba(16, 185, 129, 0.2);
		color: #6ee7b7;

	}

	:root:not([data-theme="light"]) .apdb-severity-mild {
		background: rgba(251, 191, 36, 0.2);
		color: #fcd34d;

	}

	:root:not([data-theme="light"]) .apdb-severity-moderate {
		background: rgba(251, 146, 60, 0.2);
		color: #fdba74;

	}

	:root:not([data-theme="light"]) .apdb-severity-severe {
		background: rgba(239, 68, 68, 0.2);
		color: #fca5a5;

	}

	:root:not([data-theme="light"]) .apdb-severity-fatal {
		background: rgba(220, 38, 38, 0.2);
		color: #f87171;

	}

	:root:not([data-theme="light"]) .apdb-evidence-badge {
		background: rgba(109, 91, 112, 0.3);
		color: var(--info-light);

	}

	:root:not([data-theme="light"]) .apdb-confidence-a {
		background: rgba(16, 185, 129, 0.2);
		color: #6ee7b7;

	}

	:root:not([data-theme="light"]) .apdb-confidence-b {
		background: rgba(251, 191, 36, 0.2);
		color: #fcd34d;

	}

	:root:not([data-theme="light"]) .apdb-confidence-c {
		background: rgba(251, 146, 60, 0.2);
		color: #fdba74;

	}

	:root:not([data-theme="light"]) .apdb-risk-safe {
		background: rgba(16, 185, 129, 0.2);
		color: #6ee7b7;

	}

	:root:not([data-theme="light"]) .apdb-risk-caution {
		background: rgba(251, 191, 36, 0.2);
		color: #fcd34d;

	}

	:root:not([data-theme="light"]) .apdb-risk-high-risk {
		background: rgba(251, 146, 60, 0.2);
		color: #fdba74;

	}

	:root:not([data-theme="light"]) .apdb-risk-contraindicated {
		background: rgba(220, 38, 38, 0.2);
		color: #f87171;

	}

}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
	.apdb-toxicity-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;

	}

	.apdb-vulnerability-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;

	}

	.apdb-regulation-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;

	}

	.apdb-detail-row {
		flex-direction: column;
		gap: 0.25rem;

	}

	.apdb-detail-label {
		min-width: auto;

	}

	.apdb-evidence-box {
		flex-direction: column;
		align-items: flex-start;

	}

}

/* ===========================
   PRINT STYLES
   =========================== */

@media print {
	.apdb-toxicity-profile {
		page-break-inside: avoid;

	}

	.apdb-toxicity-card,
	.apdb-vulnerability-card,
	.apdb-regulation-card {
		page-break-inside: avoid;
		border: 1px solid #000;

	}

	.apdb-severity-badge,
	.apdb-risk-badge,
	.apdb-evidence-badge,
	.apdb-confidence-badge {
		border: 1px solid #000;

	}

}
