/**
 * Abilities Bridge Progress Styles
 *
 * @package Abilities_Bridge
 */

/* Activity Log Container */
#abilities-bridge-activity-log {
	position: relative;
	margin: 10px 20px 15px 20px;
	background: #f8f9fa;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 15px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
	z-index: 10;
	flex-shrink: 0;
	max-height: 150px;
	overflow: hidden;
}

.activity-header {
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid #dee2e6;
	color: #495057;
	font-size: 14px;
}

.activity-list {
	max-height: 100px;
	overflow-y: auto;
	overflow-x: hidden;
}

.activity-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	margin: 4px 0;
	background: white;
	border-left: 3px solid #2196F3;
	border-radius: 4px;
	font-size: 13px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.activity-icon {
	font-size: 16px;
	flex-shrink: 0;
}

.activity-text {
	color: #495057;
	line-height: 1.4;
	word-break: break-word;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateX(-10px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Scrollbar styling for activity list */
.activity-list::-webkit-scrollbar {
	width: 6px;
}

.activity-list::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

/* Main Progress Bar */
.abilities-bridge-progress-bar {
	width: 100%;
	height: 24px;
	background: #e9ecef;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	margin-bottom: 10px;
}

.progress-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, #2196F3 0%, #21CBF3 100%);
	border-radius: 12px;
	transition: width 0.3s ease;
	position: relative;
	overflow: hidden;
}

/* Animated stripes for active progress */
.progress-bar-fill::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: linear-gradient(
		45deg,
		rgba(255, 255, 255, 0.15) 25%,
		transparent 25%,
		transparent 50%,
		rgba(255, 255, 255, 0.15) 50%,
		rgba(255, 255, 255, 0.15) 75%,
		transparent 75%,
		transparent
	);
	background-size: 30px 30px;
	animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
	from { background-position: 0 0; }
	to { background-position: 30px 30px; }
}

/* Progress Info */
.progress-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	font-size: 14px;
}

.progress-message {
	color: #495057;
	font-weight: 500;
}

.progress-percentage {
	color: #2196F3;
	font-weight: bold;
	font-size: 16px;
}

/* Progress Steps */
.progress-steps {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #dee2e6;
}

.step-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.step-list li {
	padding: 6px 0;
	font-size: 13px;
	color: #6c757d;
	display: flex;
	align-items: center;
	gap: 8px;
}

.step-list li.step-completed {
	color: #28a745;
}

.step-list li.step-active {
	color: #2196F3;
	font-weight: 500;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.6; }
}

.step-list li.step-pending {
	color: #adb5bd;
}

/* ETA Display */
.progress-eta {
	margin-top: 10px;
	padding: 8px 12px;
	background: #e7f3ff;
	border-radius: 6px;
	font-size: 13px;
	color: #0c5ea8;
	display: inline-block;
}

.eta-time {
	font-weight: 600;
}

/* Error State */
#abilities-bridge-progress-container.error {
	background: #fff5f5;
	border-color: #f56565;
}

#abilities-bridge-progress-container.error .progress-bar-fill {
	background: linear-gradient(90deg, #f56565 0%, #ed8936 100%);
}

/* Success State */
#abilities-bridge-progress-container.success .progress-bar-fill {
	background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
}

/* Loading State for Chat */
.abilities-bridge-chat-container.loading {
	position: relative;
}

.abilities-bridge-chat-container.loading::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.7);
	z-index: 10;
	pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
	#abilities-bridge-progress-container {
		padding: 15px;
	}

	.progress-info {
		font-size: 13px;
	}

	.progress-percentage {
		font-size: 14px;
	}

	.step-list li {
		font-size: 12px;
	}
}

/* Activity History Dropdown */
.abilities-bridge-activity-history {
	flex-shrink: 0;
	margin: 10px 20px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.activity-history-header {
	padding: 12px 15px;
	background: #f6f7f7;
	border-bottom: 1px solid #c3c4c7;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	user-select: none;
}

.activity-history-header:hover {
	background: #eaebec;
}

.activity-history-title {
	font-weight: 600;
	font-size: 13px;
	color: #2c3338;
}

.activity-history-arrow {
	font-size: 12px;
	transition: transform 0.2s ease;
}

.activity-history-arrow.rotated {
	transform: rotate(-180deg);
}

.activity-history-content {
	display: none;
	max-height: 400px;
	overflow-y: auto;
	padding: 10px;
}

.activity-history-empty {
	padding: 20px;
	text-align: center;
	color: #646970;
	font-size: 13px;
}

.activity-history-item {
	padding: 10px;
	margin: 5px 0;
	background: #f9f9f9;
	border-left: 3px solid #2271b1;
	border-radius: 3px;
}

.activity-history-item.error {
	border-left-color: #d63638;
	background: #fff5f5;
}

.activity-history-header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 5px;
}

.activity-history-icon {
	font-size: 14px;
	margin-right: 5px;
}

.activity-history-function {
	font-weight: 600;
	font-size: 12px;
	color: #2271b1;
	font-family: monospace;
}

.activity-history-timestamp {
	font-size: 11px;
	color: #646970;
	margin-left: auto;
}

.activity-history-description {
	font-size: 12px;
	color: #2c3338;
	margin-top: 5px;
}

.activity-history-error {
	font-size: 12px;
	color: #d63638;
	margin-top: 5px;
	padding: 5px;
	background: #ffebeb;
	border-radius: 2px;
}

/* Scrollbar for activity history */
.activity-history-content::-webkit-scrollbar {
	width: 6px;
}

.activity-history-content::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 3px;
}

.activity-history-content::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 3px;
}

.activity-history-content::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}