/**
 * Converseo Admin Settings Styles
 * Modern, minimalistic design
 */

/* Page Layout */
.converseo-settings-wrap {
	max-width: 800px;
	margin: 20px 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.converseo-settings-wrap h1 {
	font-size: 28px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 8px;
}

.converseo-settings-header {
	margin-bottom: 32px;
}

.converseo-settings-subtitle {
	color: #646970;
	font-size: 14px;
	margin: 0;
}

/* Card Components */
.converseo-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
	padding: 24px;
	margin-bottom: 24px;
}

.converseo-card-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #f0f0f1;
}

.converseo-card-icon {
	width: 40px;
	height: 40px;
	background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}

.converseo-card-icon .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.converseo-card-title {
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
	margin: 0;
}

.converseo-card-description {
	color: #646970;
	font-size: 13px;
	margin: 4px 0 0 0;
}

/* Form Fields */
.converseo-form-group {
	margin-bottom: 20px;
}

.converseo-form-group:last-child {
	margin-bottom: 0;
}

.converseo-form-label {
	display: block;
	font-weight: 500;
	color: #1d2327;
	margin-bottom: 8px;
	font-size: 14px;
}

.converseo-form-label .required {
	color: #d63638;
	margin-left: 2px;
}

.converseo-form-hint {
	color: #646970;
	font-size: 12px;
	margin-top: 6px;
	line-height: 1.5;
}

.converseo-input-wrapper {
	position: relative;
	display: flex;
	gap: 8px;
}

.converseo-input {
	flex: 1;
	height: 44px;
	padding: 0 14px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	font-size: 14px;
	color: #1d2327;
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.converseo-input:focus {
	outline: none;
	border-color: #007bff;
	box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.converseo-input::placeholder {
	color: #a7aaad;
}

.converseo-toggle-btn {
	width: 44px;
	height: 44px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #646970;
	transition: all 0.2s ease;
}

.converseo-toggle-btn:hover {
	border-color: #007bff;
	color: #007bff;
}

.converseo-toggle-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Buttons */
.converseo-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	padding: 0 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	border: none;
}

.converseo-btn-primary {
	background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
	color: #fff;
}

.converseo-btn-primary:hover {
	background: linear-gradient(135deg, #0056b3 0%, #004094 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.converseo-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.converseo-btn-secondary {
	background: #f6f7f7;
	color: #1d2327;
	border: 1px solid #dcdcde;
}

.converseo-btn-secondary:hover {
	background: #f0f0f1;
	border-color: #c3c4c7;
}

.converseo-btn-danger {
	background: #fff;
	color: #d63638;
	border: 1px solid #d63638;
}

.converseo-btn-danger:hover {
	background: #d63638;
	color: #fff;
}

/* Verification Section */
.converseo-verify-section {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #f0f0f1;
}

.converseo-verification-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
}

.converseo-verification-status.verified {
	background: #d4edda;
	color: #155724;
}

.converseo-verification-status.verified .dashicons {
	color: #28a745;
}

.converseo-verification-status.error {
	background: #f8d7da;
	color: #721c24;
}

#converseo-verification-message {
	font-size: 13px;
}

#converseo-verification-message.success {
	color: #155724;
}

#converseo-verification-message.error {
	color: #d63638;
}

#converseo-verification-message .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: middle;
	margin-right: 4px;
}

/* Usage Stats */
.converseo-usage-card {
	background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.converseo-usage-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.converseo-usage-stat {
	text-align: center;
	padding: 16px;
	background: #fff;
	border-radius: 8px;
	border: 1px solid #f0f0f1;
}

.converseo-usage-stat-value {
	font-size: 28px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.2;
}

.converseo-usage-stat-label {
	font-size: 12px;
	color: #646970;
	margin-top: 4px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.converseo-usage-stat.remaining .converseo-usage-stat-value {
	color: #28a745;
}

.converseo-usage-stat.used .converseo-usage-stat-value {
	color: #dc3545;
}

.converseo-usage-progress-wrapper {
	margin-top: 16px;
}

.converseo-usage-progress-bar {
	height: 8px;
	background: #e9ecef;
	border-radius: 4px;
	overflow: hidden;
}

.converseo-usage-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
	border-radius: 4px;
	transition: width 0.3s ease;
}

.converseo-usage-progress-fill.warning {
	background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

.converseo-usage-progress-fill.danger {
	background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

.converseo-usage-reset {
	text-align: center;
	margin-top: 12px;
	font-size: 12px;
	color: #646970;
}

/* Cache Section */
.converseo-cache-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	background: #f8f9fa;
	border-radius: 8px;
	margin-top: 16px;
}

.converseo-cache-text {
	color: #646970;
	font-size: 13px;
}

/* Footer Actions */
.converseo-form-actions {
	display: flex;
	gap: 12px;
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid #f0f0f1;
}

/* Locked State in Editors */
.ta-locked-state {
	text-align: center;
	padding: 32px 16px;
}

.ta-locked-icon {
	width: 64px;
	height: 64px;
	background: linear-gradient(135deg, #f0f0f1 0%, #e9ecef 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

.ta-locked-icon .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #646970;
}

.ta-locked-title {
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 8px;
}

.ta-locked-description {
	font-size: 13px;
	color: #646970;
	margin-bottom: 20px;
	line-height: 1.5;
}

.ta-settings-link {
	text-decoration: none !important;
}

/* Usage Bar in Editors */
.ta-usage-bar {
	background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 16px;
}

.ta-usage-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.ta-usage-label {
	font-size: 11px;
	font-weight: 600;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.ta-usage-count {
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
}

.ta-usage-progress {
	height: 6px;
	background: #e9ecef;
	border-radius: 3px;
	overflow: hidden;
}

.ta-usage-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
	border-radius: 3px;
	transition: width 0.3s ease;
}

.ta-usage-progress-bar.warning {
	background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

.ta-usage-progress-bar.danger {
	background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

/* Animations */
@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.converseo-btn .dashicons.spinning {
	animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 600px) {
	.converseo-usage-grid {
		grid-template-columns: 1fr;
	}

	.converseo-verify-section {
		flex-direction: column;
		align-items: flex-start;
	}

	.converseo-form-actions {
		flex-direction: column;
	}

	.converseo-btn {
		width: 100%;
	}
}
