/* Prediction Form Container */
.aact-prediction-container {
	max-width: 800px; /* Increased for better display */
	margin: 0 auto;
	padding: 20px;
}

.aact-prediction-title {
	text-align: center;
	margin-bottom: 20px;
	color: #1d2327;
}

/* Stats Display */
.aact-prediction-stats {
	background: #f0f6fc;
	border: 1px solid #0783c7;
	border-radius: 4px;
	padding: 15px;
	margin-bottom: 20px;
}

.aact-stats-unlimited {
	margin: 0;
	color: #0a7340;
	display: flex;
	align-items: center;
	gap: 8px;
}

.aact-stats-unlimited .dashicons {
	color: #0a7340;
}

.aact-stats-remaining {
	display: flex;
	align-items: center;
	gap: 12px;
}

.aact-stats-icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	background: #2271b1;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.aact-stats-icon .dashicons {
	color: #fff;
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.aact-stats-info {
	display: flex;
	flex-direction: column;
}

.aact-stats-count {
	font-weight: 600;
	color: #1d2327;
	font-size: 16px;
}

.aact-stats-subtext {
	font-size: 13px;
	color: #646970;
}

.aact-limit-reached {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #0783c7;
	text-align: center;
}

.aact-limit-reached p {
	margin: 0 0 10px 0;
	color: #d63638;
}

.aact-register-button {
	display: inline-block;
	background: #2271b1;
	color: #fff;
	padding: 8px 16px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 500;
	transition: background 0.2s;
}

.aact-register-button:hover {
	background: #135e96;
	color: #fff;
}

/* Form Styles */
.aact-prediction-form {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.aact-form-group {
	margin-bottom: 0;
}

.aact-form-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #1d2327;
}

.aact-form-label .required {
	color: #d63638;
}

.aact-input-wrapper {
	display: flex;
	gap: 10px;
}

.aact-form-input {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 16px;
	text-transform: uppercase;
}

.aact-form-input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.aact-form-input:disabled {
	background: #f6f7f7;
	cursor: not-allowed;
}

.aact-submit-button {
	padding: 10px 20px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}

.aact-submit-button:hover:not(:disabled) {
	background: #135e96;
}

.aact-submit-button:disabled {
	background: #dcdcde;
	cursor: not-allowed;
}

.aact-button-loading {
	display: flex;
	align-items: center;
	gap: 8px;
}

.aact-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255,255,255,0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: aact-spin 0.6s linear infinite;
}

@keyframes aact-spin {
	to { transform: rotate(360deg); }
}

.aact-form-help {
	margin: 8px 0 0 0;
	font-size: 13px;
	color: #646970;
}

/* Message Display */
.aact-message {
	margin-top: 15px;
	padding: 12px;
	border-radius: 4px;
	font-size: 14px;
}

.aact-message.error {
	background: #fcf0f1;
	border-left: 4px solid #d63638;
	color: #3c434a;
}

.aact-message.success {
	background: #edfaef;
	border-left: 4px solid #00a32a;
	color: #1d2327;
}

/* Results Display */
.aact-prediction-results {
	margin-top: 30px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.aact-results-title {
	margin-top: 0;
	padding-bottom: 15px;
	border-bottom: 2px solid #2271b1;
	color: #1d2327;
}

.aact-results-content {
	margin-top: 15px;
}

.aact-result-item {
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f1;
}

.aact-result-item:last-child {
	border-bottom: none;
}

.aact-result-label {
	font-weight: 600;
	color: #646970;
	display: block;
	margin-bottom: 4px;
}

.aact-result-value {
	color: #1d2327;
	font-size: 16px;
}

/* ===== NEW COLLAPSIBLE SECTION STYLES ===== */

/* Collapsible Sections */
.aact-collapsible-section {
	margin-bottom: 15px;
	border: 1px solid #ddd;
	border-radius: 5px;
	overflow: hidden;
	background: #fff;
}

.aact-section-header {
	display: flex;
	align-items: center;
	padding: 15px;
	background: #f5f5f5;
	cursor: pointer;
	user-select: none;
	transition: background 0.2s;
}

.aact-section-header:hover {
	background: #e8e8e8;
}

.aact-toggle-icon {
	margin-right: 10px;
	font-size: 12px;
	transition: transform 0.3s;
	min-width: 16px;
}

.aact-section-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
}

.aact-section-content {
	padding: 20px;
	background: white;
}

.aact-section-content.aact-collapsed {
	display: none;
}

/* Trial Header */
.aact-trial-header {
	background: #f9f9f9;
	padding: 20px;
	margin-bottom: 20px;
	border-radius: 5px;
	border: 1px solid #ddd;
}

.aact-trial-header .aact-section-title {
	margin-bottom: 15px;
	color: #2271b1;
}

/* Alerts */
.aact-alert-section {
	margin-bottom: 20px;
}

.aact-alert {
	padding: 12px 15px;
	margin-bottom: 10px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	font-size: 14px;
}

.aact-alert-info {
	background: #e3f2fd;
	border-left: 4px solid #2196F3;
	color: #1565C0;
}

.aact-alert-warning {
	background: #fff3e0;
	border-left: 4px solid #FF9800;
	color: #E65100;
}

.aact-alert-icon {
	margin-right: 10px;
	font-size: 18px;
}

/* Prediction Cards */
.aact-prediction-card {
	background: #f8f9fa;
	padding: 20px;
	margin-bottom: 15px;
	border-radius: 8px;
	border: 1px solid #dee2e6;
}

.aact-prediction-card:last-child {
	margin-bottom: 0;
}

.aact-model-name {
	margin: 0 0 15px 0;
	color: #495057;
	font-size: 16px;
	font-weight: 600;
}

.aact-prediction-main {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	margin-bottom: 20px;
}

.aact-prediction-class,
.aact-prediction-confidence {
	background: white;
	padding: 15px;
	border-radius: 6px;
	border: 1px solid #dee2e6;
}

.aact-prediction-class .aact-label,
.aact-prediction-confidence .aact-label {
	display: block;
	font-size: 13px;
	color: #6c757d;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.aact-prediction-badge {
	display: inline-block;
	padding: 6px 16px;
	/* background: #28a745; */
	color: white;
	border-radius: 20px;
	font-weight: 600;
	font-size: 15px;
}

.aact-prediction-confidence .aact-value {
	font-size: 20px;
	font-weight: 700;
	color: #2271b1;
}

/* Probabilities */
.aact-probabilities {
	margin-top: 15px;
	background: white;
	padding: 15px;
	border-radius: 6px;
	border: 1px solid #dee2e6;
}

.aact-probabilities h5 {
	margin: 0 0 12px 0;
	font-size: 14px;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.aact-probability-bar,
.aact-feature-bar {
	margin-bottom: 12px;
}

.aact-probability-bar:last-child,
.aact-feature-bar:last-child {
	margin-bottom: 0;
}

.aact-prob-label,
.aact-feature-label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	color: #495057;
	font-weight: 500;
}

.aact-prob-container,
.aact-feature-container {
	display: flex;
	align-items: center;
	background: #e9ecef;
	border-radius: 4px;
	overflow: hidden;
	height: 28px;
	position: relative;
}

.aact-prob-fill,
.aact-feature-fill {
	height: 100%;
	background: #2271b1;
	transition: width 0.5s ease;
}

.aact-prob-value,
.aact-feature-value {
	position: absolute;
	right: 8px;
	font-size: 12px;
	font-weight: 600;
	color: #495057;
	z-index: 1;
}

/* Detail Groups */
.aact-detail-group {
	margin-bottom: 25px;
}

.aact-detail-group:last-child {
	margin-bottom: 0;
}

.aact-detail-group h4 {
	margin: 0 0 15px 0;
	font-size: 16px;
	color: #495057;
	border-bottom: 2px solid #dee2e6;
	padding-bottom: 8px;
	font-weight: 600;
}

/* Feature Importance */
.aact-feature-group {
	margin-bottom: 25px;
}

.aact-feature-group:last-child {
	margin-bottom: 0;
}

.aact-feature-group h4 {
	margin: 0 0 15px 0;
	font-size: 14px;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Feature Importance inside prediction cards */
.aact-feature-importance-section {
	margin-top: 15px;
	background: white;
	padding: 15px;
	border-radius: 6px;
	border: 1px solid #dee2e6;
}

.aact-feature-importance-section h5 {
	margin: 0 0 12px 0;
	font-size: 14px;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Facilities */
.aact-facility-group {
	margin-bottom: 20px;
}

.aact-facility-group:last-child {
	margin-bottom: 0;
}

.aact-facility-group h4 {
	margin: 0 0 10px 0;
	font-size: 14px;
	color: #495057;
	font-weight: 600;
}

.aact-facility-list {
	margin: 0;
	padding-left: 20px;
	list-style-type: disc;
}

.aact-facility-list li {
	margin-bottom: 6px;
	color: #6c757d;
	font-size: 13px;
	line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
	.aact-prediction-container {
		max-width: 100%;
		padding: 15px;
	}
	
	.aact-input-wrapper {
		flex-direction: column;
	}
	
	.aact-submit-button {
		width: 100%;
	}
	
	.aact-prediction-main {
		grid-template-columns: 1fr;
	}
	
	.aact-section-title {
		font-size: 16px;
	}
}

@media (max-width: 600px) {
	.aact-prediction-card {
		padding: 15px;
	}
	
	.aact-section-content {
		padding: 15px;
	}
	
	.aact-probabilities,
	.aact-prediction-class,
	.aact-prediction-confidence {
		padding: 12px;
	}

	/* Feature Importance Collapsible */
	.aact-feature-importance-collapsible {
		margin-top: 15px;
	}

	.aact-feature-header {
		display: flex;
		align-items: center;
		padding: 10px 15px;
		background: #f8f9fa;
		border-radius: 6px;
		cursor: pointer;
		user-select: none;
		transition: background 0.2s;
		border: 1px solid #dee2e6;
	}

	.aact-feature-header:hover {
		background: #e9ecef;
	}

	.aact-feature-toggle-icon {
		margin-right: 8px;
		font-size: 12px;
		transition: transform 0.3s;
		min-width: 16px;
	}

	.aact-feature-header-title {
		font-size: 14px;
		color: #6c757d;
		text-transform: uppercase;
		letter-spacing: 0.5px;
		font-weight: 600;
	}

	/* Update existing Feature Importance section styles */
	.aact-feature-importance-section {
		margin-top: 0;
		background: white;
		padding: 15px;
		border-radius: 0 0 6px 6px;
		border: 1px solid #dee2e6;
		border-top: none;
	}

	.aact-feature-importance-section.aact-collapsed {
		display: none;
	}
}