/* ==================== Dashboard Styles ==================== */

/* Hero Section */
.dashboard-hero {
	background: linear-gradient(135deg, #e8f1fd 0%, #d1e3f8 100%);
	border-bottom: 2px solid #217FF9;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Documentation Hero Section - Same background as dashboard */
.docs-hero {
	background: linear-gradient(135deg, #e8f1fd 0%, #d1e3f8 100%);
	border-bottom: 2px solid #217FF9;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.docs-hero h1 {
	color: #000000;
	font-weight: 700;
	margin-top: 0;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.docs-hero .text-muted {
	color: #444444 !important;
	font-weight: 500;
}

.dashboard-hero h1 {
	color: #000000;
	font-weight: 700;
	margin-top: 0;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dashboard-hero .lead {
	color: #444444;
	font-size: 1.1rem;
	font-weight: 500;
}

/* Stats Cards */
.dashboard-stat-card {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #e0e0e0;
	background: #ffffff;
}

.dashboard-stat-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
	border-color: #217FF9;
}

.dashboard-stat-card h3 {
	font-size: 2rem;
	color: #000000;
	font-weight: 700;
}

.dashboard-stat-card .stat-icon {
	border-radius: 12px;
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 3px solid;
}

.dashboard-stat-card .stat-icon.bg-primary {
	background-color: #217FF9 !important;
	border-color: #1a6ad8;
	color: #ffffff !important;
}

.dashboard-stat-card .stat-icon.bg-success {
	background-color: #198754 !important;
	border-color: #146c43;
	color: #ffffff !important;
}

.dashboard-stat-card .stat-icon.bg-warning {
	background-color: #ffc107 !important;
	border-color: #cc9a06;
	color: #000000 !important;
}

/* Main Dashboard Card */
.dashboard-content .card {
	border-radius: 12px;
	overflow: hidden;
	border: 2px solid #e0e0e0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-content .card-header {
	padding: 1.25rem 1.5rem;
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	border-bottom: 2px solid #e0e0e0;
}

/* Table Styles */
.dashboard-table {
	font-size: 0.95rem;
	width: 100%;
	table-layout: auto;
}

.dashboard-table thead th {
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.8px;
	padding: 1rem 1.5rem;
	color: #000000;
	background: #f8f9fa;
	border-bottom: 2px solid #217FF9;
	text-align: left;
}

.dashboard-table tbody td {
	padding: 1rem 1.5rem;
	vertical-align: middle;
	color: #222222;
	font-weight: 500;
	text-align: left;
}

.dashboard-table tbody tr {
	transition: all 0.2s ease;
	border-bottom: 1px solid #dee2e6;
}

.dashboard-table tbody tr:hover {
	background-color: #e8f1fd;
	box-shadow: 0 2px 8px rgba(33, 127, 249, 0.1);
}

.dashboard-table tbody tr:last-child {
	border-bottom: 1px solid #dee2e6;
}

.dashboard-table .name-cell {
	width: 50%;
}

.dashboard-table .status-cell {
	width: 25%;
}

.dashboard-table .actions-cell {
	width: 25%;
	text-align: right;
}

.dashboard-table .actions-cell .d-flex {
	justify-content: flex-end;
}

/* Avatar Circle */
.avatar-circle {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.875rem;
	border: 3px solid #217FF9;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
	background-color: #217FF9 !important;
	color: #ffffff !important;
}

.avatar-circle-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	color: #ffffff !important;
}

.avatar-circle-link:hover {
	color: #ffffff !important;
	opacity: 0.9;
}

/* Bot Name Link */
.bot-name-link {
	transition: all 0.2s ease;
	color: #000000 !important;
}

.bot-name-link:hover {
	color: #217FF9 !important;
	text-decoration: underline !important;
}

/* Custom Badge Colors - Light Background Style */
.bg-success-soft {
	background-color: #d4edda !important;
	border: 2px solid #c3e6cb;
}

.text-success {
	color: #155724 !important;
	font-weight: 600;
}

.bg-danger-soft {
	background-color: #f8d7da !important;
	border: 2px solid #f5c6cb;
}

.text-danger {
	color: #721c24 !important;
	font-weight: 600;
}

.bg-primary-soft {
	background-color: #cfe2ff !important;
	border: 2px solid #b6d4fe;
}

.text-primary {
	color: #084298 !important;
	font-weight: 600;
}

.bg-warning-soft {
	background-color: #fff3cd !important;
	border: 2px solid #ffecb5;
}

.text-warning {
	color: #856404 !important;
	font-weight: 600;
}

.bg-secondary-soft {
	background-color: #e2e3e5 !important;
	border: 2px solid #d6d8db;
}

.text-secondary {
	color: #383d41 !important;
	font-weight: 600;
}

/* Buttons */
.btn-primary {
	background-color: #217FF9;
	border: 2px solid #217FF9;
	color: #ffffff;
	font-weight: 600;
	transition: all 0.3s ease;
	box-shadow: 0 2px 6px rgba(33, 127, 249, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
	background-color: #1a6ad8;
	border-color: #1a6ad8;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(33, 127, 249, 0.4);
}

.btn-outline-primary {
	color: #217FF9;
	border: 2px solid #217FF9;
	font-weight: 600;
	background-color: #ffffff;
	transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
	background-color: #217FF9;
	border-color: #217FF9;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(33, 127, 249, 0.3);
}

.btn-outline-secondary {
	color: #495057;
	border: 2px solid #6C757D;
	background-color: #ffffff;
	font-weight: 600;
	transition: all 0.3s ease;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
	background-color: #6C757D;
	border-color: #6C757D;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-sm {
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
	border-radius: 6px;
	font-weight: 600;
}

/* Empty State */
.empty-state-icon {
	opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 991px) {
	.dashboard-hero .col-md-4 {
		text-align: center !important;
		margin-top: 1rem;
	}
}

@media (max-width: 767px) {
	.dashboard-hero {
		padding: 2rem 0 !important;
	}
	
	.dashboard-hero h1 {
		font-size: 1.75rem;
		margin-bottom: 1rem;
	}
	
	.dashboard-hero .lead {
		font-size: 0.95rem;
		margin-bottom: 1rem;
	}
	
	.dashboard-hero .btn-lg {
		width: 100%;
		margin-top: 0.5rem;
	}
	
	.dashboard-stat-card {
		margin-bottom: 1rem;
	}
	
	.dashboard-stat-card h3 {
		font-size: 1.5rem;
	}
	
	.dashboard-stat-card .stat-icon {
		width: 48px;
		height: 48px;
	}
	
	.avatar-circle {
		width: 32px;
		height: 32px;
		font-size: 0.75rem;
		display: none; /* Hide on mobile to save space */
	}
	
	.dashboard-table {
		font-size: 0.875rem;
	}
	
	.dashboard-table thead th {
		padding: 0.75rem 0.5rem;
		font-size: 0.7rem;
	}
	
	.dashboard-table tbody td {
		padding: 0.75rem 0.5rem;
	}
	
	.btn-sm {
		padding: 0.25rem 0.5rem;
		font-size: 0.75rem;
	}
	
	.btn-sm i {
		font-size: 0.875rem;
	}
	
	/* Stack action buttons vertically on mobile */
	.dashboard-table .d-flex.gap-2 {
		flex-direction: column;
		gap: 0.5rem !important;
	}
	
	.dashboard-table .btn-sm {
		width: 100%;
		justify-content: center;
	}
	
	/* Adjust card header */
	.card-header h4 {
		font-size: 1.1rem;
	}
	
	/* Empty state adjustments */
	.empty-state-icon i {
		font-size: 3rem !important;
	}
}

@media (max-width: 576px) {
	.dashboard-table thead th:last-child {
		min-width: 150px; /* Ensure actions column has enough space */
	}
	
	/* Hide "Status" column header and data on very small screens */
	.dashboard-table thead th:nth-child(2),
	.dashboard-table tbody td:nth-child(2) {
		display: none;
	}
}

/* Animation */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.dashboard-content > .row,
.dashboard-content > .card {
	animation: fadeInUp 0.5s ease;
}

/* Shadow Variants */
.shadow-sm {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Badge Improvements */
.badge.rounded-pill {
	font-weight: 500;
	font-size: 0.8rem;
	padding: 0.5rem 1rem;
}

/* Card Header Icon */
.card-header i.bi-robot {
	font-size: 1.25rem;
}

/* ==================== Edit Chat Page Styles ==================== */

/* Hero Section for Edit Chat */
.edit-chat-hero {
	background: linear-gradient(135deg, #e8f1fd 0%, #d1e3f8 100%);
	border-bottom: 2px solid #217FF9;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.edit-chat-hero h1 {
	color: #000000;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.edit-chat-hero .text-muted {
	color: #444444 !important;
	font-weight: 500;
}

.avatar-circle-large {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.5rem;
	border: 3px solid #217FF9;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	background-color: #217FF9 !important;
	color: #ffffff !important;
}

/* Breadcrumb Styling */
.breadcrumb {
	background: none;
	padding: 0;
}

.breadcrumb-item a {
	color: #217FF9;
	text-decoration: none;
	transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
	color: #1a6ad8;
}

.breadcrumb-item.active {
	color: #666666;
}

/* Form Sections */
.form-section {
	margin-bottom: 2rem;
}

.form-section h6 {
	font-size: 1rem;
	margin-bottom: 1rem;
}

/* Input Groups with Icons */
.input-group-text {
	background-color: #e8f1fd;
	border: 2px solid #ced4da;
	border-right: 0;
}

.form-control {
	border: 2px solid #ced4da;
	transition: all 0.3s ease;
	color: #000000;
	font-weight: 500;
}

/* Left border only removed inside input groups (paired with .input-group-text) */
.input-group .form-control,
.input-group .form-select {
	border-left: 0;
}

.form-control::placeholder {
	color: #6c757d;
	font-weight: 400;
}

.form-control:focus {
	border-color: #217FF9;
	border-width: 2px;
	box-shadow: 0 0 0 0.25rem rgba(33, 127, 249, 0.25);
}

.input-group:focus-within .input-group-text {
	border-color: #217FF9;
	border-width: 2px;
	background-color: #217FF9 !important;
}

.input-group:focus-within .input-group-text i {
	color: #ffffff !important;
}

/* Textarea Styling */
textarea.form-control {
	border: 2px solid #ced4da;
	resize: vertical;
	min-height: 120px;
	color: #000000;
	font-weight: 500;
}

textarea.form-control:focus {
	border-color: #217FF9;
	border-width: 2px;
	box-shadow: 0 0 0 0.25rem rgba(33, 127, 249, 0.25);
}

/* Form Labels */
.form-label {
	display: block;
	color: #000000;
	margin-bottom: 0.5rem;
	font-size: 0.925rem;
	font-weight: 600;
}

.form-label .text-danger {
	font-size: 0.875rem;
	font-weight: 700;
}

/* Form Text (Help Text) */
.form-text {
	color: #6c757d;
	font-size: 0.875rem;
	margin-top: 0.25rem;
}

/* Error Messages */
.text-danger.small {
	font-size: 0.875rem;
	margin-top: 0.25rem;
}

/* Quick Actions Card */
.edit-chatbot-form .card:last-child {
	background: linear-gradient(135deg, #fff3cd 0%, #ffffff 100%);
	border: 2px solid #ffc107;
}

/* Status Info Cards (at top of edit page) */
.stat-icon {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 3px solid;
}

.stat-icon.bg-info {
	background-color: #0dcaf0 !important;
	border-color: #0aa2c0;
	color: #000000 !important;
}

.stat-icon.bg-primary {
	background-color: #217FF9 !important;
	border-color: #1a6ad8;
	color: #ffffff !important;
}

.stat-icon.bg-success {
	background-color: #198754 !important;
	border-color: #146c43;
	color: #ffffff !important;
}

/* Responsive for Edit Chat */

/* Action buttons: flex + wrap so they never overlap on wide screens */
@media (min-width: 768px) {
	.edit-chat-hero .col-md-4.text-md-end {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-end;
		align-items: center;
		gap: 0.5rem;
	}

	.edit-chat-hero .col-md-4.text-md-end .btn {
		margin-top: 0 !important;
		margin-right: 0 !important;
		flex-shrink: 0;
		white-space: nowrap;
	}
}

/* Tablet: stack vertically in the sidebar column */
@media (min-width: 768px) and (max-width: 991px) {
	.edit-chat-hero .col-md-4.text-md-end {
		flex-direction: column;
		align-items: flex-end;
		gap: 0.75rem;
	}
	
	.edit-chat-hero .col-md-4.text-md-end .btn {
		width: 220px;
		min-width: 220px;
		justify-content: center;
	}
}

/* Mobile styles */
@media (max-width: 767px) {
	.avatar-circle-large {
		width: 48px;
		height: 48px;
		font-size: 1.2rem;
	}
	
	.edit-chat-hero h1 {
		font-size: 1.5rem;
	}
	
	.edit-chat-hero .btn {
		width: 100%;
		margin-top: 0.5rem;
	}
	
	.edit-chat-hero .d-flex.justify-content-between {
		flex-direction: column;
	}
	
	.form-section .row .col-md-6 {
		margin-bottom: 1rem;
	}
	
	.d-flex.justify-content-between.align-items-center.pt-3 {
		flex-direction: column;
		gap: 1rem;
	}
	
	.d-flex.justify-content-between.align-items-center.pt-3 > div {
		width: 100%;
	}
	
	.d-flex.justify-content-between.align-items-center.pt-3 .btn {
		width: 100%;
	}
}

