/**
 * Settings page styles for Agentorie Chat.
 *
 * @package    Agentorie_Chat
 * @subpackage Agentorie_Chat/admin/css
 * @since      1.0.0
 */

/* ==========================================================================
   Layout
   ========================================================================== */

.agentorie-wrap {
	max-width: 900px;
}

.agentorie-wrap h1 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}

.agentorie-wrap h1 .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.agentorie-wrap .nav-tab-wrapper {
	border-bottom: 2px solid #e2e8f0;
	margin-bottom: 0;
}

.agentorie-wrap .nav-tab {
	padding: 12px 20px;
	border: none;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	background: transparent;
	color: #64748b;
	font-weight: 500;
	transition: all 0.2s ease;
}

.agentorie-wrap .nav-tab:hover {
	color: #6366f1;
	background: rgba(99, 102, 241, 0.05);
}

.agentorie-wrap .nav-tab-active {
	color: #6366f1;
	border-bottom-color: #6366f1;
	background: transparent;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.agentorie-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	margin: 20px 0;
	overflow: visible;
}

.agentorie-card .card-header {
	padding: 15px 20px;
	border-bottom: 1px solid #e2e8f0;
	background: #f8fafc;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.agentorie-card .card-header h2 {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #1e293b;
	display: flex;
	align-items: center;
	gap: 8px;
}

.agentorie-card .card-body {
	padding: 20px;
}

.agentorie-card-info {
	border-left: 4px solid #6366f1;
}

.agentorie-card-info .card-body {
	background: #f5f3ff;
}

.agentorie-card-warning {
	border-left: 4px solid #f59e0b;
}

/* ==========================================================================
   License Status
   ========================================================================== */

.license-status-box {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
	border-radius: 8px;
	margin-bottom: 20px;
}

.license-status-box .status-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}

.license-status-box .status-content {
	flex: 1;
}

.license-status-box .status-label {
	font-size: 13px;
	color: #64748b;
	margin-bottom: 2px;
}

.license-status-box .status-value {
	font-size: 16px;
	font-weight: 600;
}

.license-status-box.status-active {
	background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
}

.license-status-box.status-active .status-icon {
	background: #10b981;
	color: #fff;
}

.license-status-box.status-active .status-value {
	color: #166534;
}

.license-status-box.status-inactive {
	background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
}

.license-status-box.status-inactive .status-icon {
	background: #f59e0b;
	color: #fff;
}

.license-status-box.status-inactive .status-value {
	color: #92400e;
}

.license-status-box.status-expired {
	background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.license-status-box.status-expired .status-icon {
	background: #ef4444;
	color: #fff;
}

.license-status-box.status-expired .status-value {
	color: #991b1b;
}

/* ==========================================================================
   Toggle Switch
   ========================================================================== */

.agentorie-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.agentorie-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #cbd5e1;
	border-radius: 24px;
	transition: 0.3s;
}

.toggle-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	border-radius: 50%;
	transition: 0.3s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.agentorie-toggle input:checked + .toggle-slider {
	background-color: #6366f1;
}

.agentorie-toggle input:checked + .toggle-slider:before {
	transform: translateX(20px);
}

.agentorie-toggle input:disabled + .toggle-slider {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ==========================================================================
   Form Table
   ========================================================================== */

.agentorie-wrap .form-table th {
	padding: 15px 10px 15px 0;
	width: 200px;
	font-weight: 500;
	vertical-align: top;
}

.agentorie-wrap .form-table td {
	padding: 15px 10px;
}

.agentorie-wrap .form-table .description {
	margin-top: 6px;
	color: #64748b;
	font-size: 13px;
}

/* ==========================================================================
   Tooltips
   ========================================================================== */

.tooltip-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #e2e8f0;
	color: #64748b;
	font-size: 12px;
	font-weight: 600;
	cursor: help;
	margin-left: 6px;
	position: relative;
}

.tooltip-trigger:hover {
	background: #6366f1;
	color: #fff;
}

.tooltip-trigger .tooltip-content {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	width: 5rem;
	transform: translateX(-50%);
	background: #1e293b;
	color: #fff;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 400;
	max-width: 280px;
	white-space: normal;
	text-align: left;
	line-height: 1.5;
	opacity: 0;
	visibility: hidden;
	transition: all 0.2s ease;
	z-index: 1000;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tooltip-trigger .tooltip-content::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #1e293b;
}

.tooltip-trigger:hover .tooltip-content {
	opacity: 1;
	visibility: visible;
}

/* ==========================================================================
   Alert Boxes
   ========================================================================== */

.alert-box {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px;
	border-radius: 8px;
	margin-bottom: 20px;
}

.alert-box .alert-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.alert-box .alert-content {
	flex: 1;
}

.alert-box .alert-title {
	font-weight: 600;
	margin-bottom: 4px;
}

.alert-box .alert-text {
	font-size: 14px;
	line-height: 1.5;
}

.alert-box .alert-text a {
	font-weight: 600;
}

.alert-box-warning {
	background: #fef3c7;
	border: 1px solid #fcd34d;
}

.alert-box-warning .alert-title {
	color: #92400e;
}

.alert-box-warning .alert-text {
	color: #a16207;
}

.alert-box-info {
	background: #e0e7ff;
	border: 1px solid #a5b4fc;
}

.alert-box-info .alert-title {
	color: #3730a3;
}

.alert-box-info .alert-text {
	color: #4338ca;
}

/* ==========================================================================
   License Input
   ========================================================================== */

.license-input-group {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.license-input-group input {
	font-family: 'Consolas', 'Monaco', monospace;
	letter-spacing: 1px;
	font-size: 14px;
}

.license-key-display {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: #f1f5f9;
	padding: 10px 16px;
	border-radius: 8px;
	margin-bottom: 15px;
}

.license-key-display code {
	font-family: 'Consolas', 'Monaco', monospace;
	font-size: 14px;
	color: #475569;
	background: none;
	padding: 0;
}

.license-key-display .dashicons {
	color: #10b981;
}

/* ==========================================================================
   Feature Locked
   ========================================================================== */

.feature-locked {
	position: relative;
	min-height: 200px;
}

.feature-locked::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.8);
	z-index: 1;
}

.feature-locked .lock-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	text-align: center;
	background: #fff;
	padding: 30px 40px;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.lock-overlay .lock-icon {
	font-size: 40px;
	margin-bottom: 15px;
}

.lock-overlay h3 {
	margin: 0 0 10px;
	font-size: 16px;
	color: #1e293b;
}

.lock-overlay p {
	margin: 0 0 20px;
	color: #64748b;
	font-size: 14px;
}

/* ==========================================================================
   Quick Links
   ========================================================================== */

.quick-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 15px;
}

.quick-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	color: #475569;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.quick-link:hover {
	border-color: #6366f1;
	color: #6366f1;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.quick-link .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.agentorie-toast {
	position: fixed;
	bottom: 30px;
	right: 30px;
	padding: 14px 20px;
	border-radius: 8px;
	background: #1e293b;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 10px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	transform: translateY(100px);
	opacity: 0;
	transition: all 0.3s ease;
	z-index: 100000;
	max-width: 400px;
}

.agentorie-toast.show {
	transform: translateY(0);
	opacity: 1;
}

.agentorie-toast.toast-success {
	background: linear-gradient(135deg, #10b981, #059669);
}

.agentorie-toast.toast-error {
	background: linear-gradient(135deg, #ef4444, #dc2626);
}

.agentorie-toast.toast-info {
	background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.toast-success .toast-icon::before {
	content: '✓';
}

.toast-error .toast-icon::before {
	content: '✕';
}

.toast-info .toast-icon::before {
	content: 'ℹ';
}

/* ==========================================================================
   Confirm Modal
   ========================================================================== */

.agentorie-confirm-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s;
}

.agentorie-confirm-modal.show {
	opacity: 1;
}

.agentorie-confirm-modal .confirm-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
}

.agentorie-confirm-modal .confirm-box {
	position: relative;
	background: #fff;
	border-radius: 16px;
	padding: 30px;
	text-align: center;
	max-width: 400px;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
	transform: scale(0.9);
	transition: transform 0.3s;
}

.agentorie-confirm-modal.show .confirm-box {
	transform: scale(1);
}

.confirm-icon {
	font-size: 48px;
	margin-bottom: 15px;
}

.confirm-box h3 {
	margin: 0 0 10px;
	font-size: 18px;
	color: #1e293b;
}

.confirm-box p {
	margin: 0 0 25px;
	color: #64748b;
	font-size: 14px;
	line-height: 1.5;
}

.confirm-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
}

.confirm-actions .button {
	min-width: 100px;
}

.button-danger {
	background: #ef4444 !important;
	border-color: #dc2626 !important;
	color: #fff !important;
}

.button-danger:hover {
	background: #dc2626 !important;
}

/* ==========================================================================
   Form States
   ========================================================================== */

.input-error {
	border-color: #ef4444 !important;
	box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

.spinner-inline {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	vertical-align: middle;
	margin-right: 6px;
}

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

/* ==========================================================================
   Form Elements
   ========================================================================== */

.agentorie-wrap select {
	min-width: 200px;
	padding: 6px 12px;
	border-radius: 4px;
}

/* Avatar Selector */
.avatar-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.avatar-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.avatar-option:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.avatar-option.selected,
.avatar-option input:checked + .avatar-emoji {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.avatar-option input {
    display: none;
}

.avatar-emoji {
    font-size: 24px;
    line-height: 1;
}

.avatar-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    padding-left: 16px;
    border-left: 1px solid #e2e8f0;
}

.avatar-custom input {
    width: 48px !important;
    height: 48px;
    text-align: center;
    font-size: 20px;
    padding: 0;
    border-radius: 12px;
}

.avatar-custom .description {
    font-size: 12px;
    color: #64748b;
}
	.log-actions {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: 5px;
	}
	
	.log-size-info {
		color: #50575e;
	}
	.log-actions .button .dashicons {
		font-size: 16px;
		width: 16px;
		height: 16px;
		margin-right: 4px;
	}
	
	.index-status-box {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}
.status-indicator {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
}
.status-indicator.status-active {
	background-color: #00a32a;
}
.status-indicator.status-pending {
	background-color: #dba617;
}
.status-indicator.status-inactive {
	background-color: #999;
}
.spin {
	animation: spin 1s linear infinite;
}
@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.toggle-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.toggle-separator {
	width: 1px;
	height: 24px;
	background: #dcdcde;
	margin: 0 8px;
}
.toggle-label-inline {
	font-size: 13px;
	color: #1d2327;
	display: flex;
	align-items: center;
	gap: 4px;
}
.toggle-label-inline.disabled {
	color: #a7aaad;
}
.admin-only-toggle input:disabled + .toggle-slider {
	opacity: 0.5;
	cursor: not-allowed;
}
/* Completely hide checkbox input - use toggle slider instead */
.toggle-row .agentorie-toggle input[type="checkbox"] {
	position: absolute !important;
	opacity: 0 !important;
	width: 0 !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	pointer-events: none !important;
}

	.avatar-preview-row {
		display: flex;
		align-items: center;
		gap: 12px;
	}
	.avatar-preview {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		font-size: 28px;
		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
		border-radius: 50%;
		color: #fff;
		box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
	}
	.emoji-suggestions {
		display: flex;
		gap: 6px;
		margin-top: 10px;
		flex-wrap: wrap;
	}
	.emoji-btn {
		padding: 6px 10px;
		font-size: 18px;
		border: 1px solid #ddd;
		border-radius: 6px;
		background: #fff;
		cursor: pointer;
		transition: all 0.2s;
	}
	.emoji-btn:hover:not(:disabled) {
		background: #f0f0f0;
		border-color: #667eea;
		transform: scale(1.1);
	}
	.emoji-btn:disabled {
		opacity: 0.5;
		cursor: not-allowed;
	}
	
		.log-actions {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: 5px;
	}
	.log-size-info {
		color: #50575e;
	}
	.log-actions .button .dashicons {
		font-size: 16px;
		width: 16px;
		height: 16px;
		margin-right: 4px;
	}
/* ==========================================================================
   Utility Classes
   ========================================================================== */

.agentorie-hidden {
	display: none;
}

.agentorie-mt-0 {
	margin-top: 0;
}

.agentorie-mb-20 {
	margin-bottom: 20px;
}

.agentorie-ml-15 {
	margin-left: 15px;
}

.agentorie-ml-5 {
	margin-left: 5px;
}

.agentorie-icon-inline {
	vertical-align: middle;
}

.agentorie-icon-inline-mr {
	vertical-align: middle;
	margin-right: 2px;
}

.agentorie-text-muted {
	color: #646970;
}

.language-info-box {
	margin: 15px 0;
	padding: 12px 15px;
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
}

.language-info-box .description {
	margin: 5px 0 0 0;
}
