/**
 * Admin styles for ZenithStack Lead Magnet Generator.
 *
 * These styles only load on our plugin's admin pages (not the entire dashboard).
 * We follow the WordPress admin UI conventions for consistency.
 *
 * @package AI_Lead_Magnet_Generator
 * @since   1.0.0
 */

/* ─── Create Page: Form Styling ─────────────────────────────────────────── */

.almg-create-wrap .form-table th {
	width: 180px;
	padding-top: 20px;
}

.almg-create-wrap .form-table td {
	padding-top: 15px;
}

.almg-create-wrap .form-table input.regular-text {
	width: 100%;
	max-width: 500px;
}

.almg-create-wrap .form-table select {
	min-width: 250px;
}

/* ─── Generation Counter ───────────────────────────────────────────────── */

.almg-generation-counter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f0f6fc;
	border: 1px solid #c3c4c7;
	border-left: 4px solid #2271b1;
	padding: 10px 16px;
	margin: 15px 0 5px;
	font-size: 13px;
	color: #1d2327;
	border-radius: 0 3px 3px 0;
}

.almg-generation-counter .dashicons {
	color: #2271b1;
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* ─── Custom Niche Input (shown when "Other" is selected) ──────────────── */

.almg-custom-niche-wrap {
	margin-top: 8px;
}

/* ─── Pro Badge ────────────────────────────────────────────────────────── */
/* Small badge that appears next to the Format dropdown to indicate
   that locked options require a Pro license. */

.almg-pro-badge {
	display: inline-block;
	background: linear-gradient(135deg, #8b5cf6, #6d28d9);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 2px 8px;
	border-radius: 3px;
	margin-left: 8px;
	vertical-align: middle;
}

/* Style disabled (locked) options in the Format select so they appear
   visually distinct from selectable options. */
#almg-format option:disabled {
	color: #999;
}

/* ─── Status and Result Areas ───────────────────────────────────────────── */

.almg-status-area {
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
	padding: 15px 20px;
	margin: 20px 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.almg-status-area .spinner {
	float: none;
	margin: 0;
}

/* Spinner inside buttons — smaller and inline with button text. */
.almg-btn-spinner {
	float: none !important;
	margin: 0 4px 0 0 !important;
	width: 16px !important;
	height: 16px !important;
	background-size: 16px 16px !important;
	vertical-align: middle;
}

/* ─── Result Card ──────────────────────────────────────────────────────── */

.almg-result-area {
	margin: 20px 0;
}

.almg-result-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-left: 4px solid #00a32a;
	border-radius: 0 3px 3px 0;
	padding: 20px 24px;
}

.almg-result-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
}

.almg-result-header .dashicons {
	color: #00a32a;
	font-size: 24px;
	width: 24px;
	height: 24px;
}

.almg-result-header h2 {
	margin: 0;
	padding: 0;
	font-size: 1.2em;
	color: #1d2327;
}

.almg-result-content {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 3px;
	padding: 16px 20px;
	margin-bottom: 16px;
	font-size: 13px;
	line-height: 1.6;
	max-height: 400px;
	overflow-y: auto;
}

.almg-result-actions {
	display: flex;
	gap: 10px;
	margin-top: 4px;
}

/* ─── Manage Page: Table Adjustments ────────────────────────────────────── */

.column-type {
	width: 120px;
}

.column-shortcode {
	width: 250px;
}

.column-shortcode code {
	background: #f0f0f1;
	padding: 3px 6px;
	font-size: 12px;
	cursor: pointer;
}

.column-pdf {
	width: 180px;
}

.column-pdf .button + .button {
	margin-left: 4px;
}

.column-downloads {
	width: 100px;
	text-align: center;
}

.column-status {
	width: 100px;
}

/* ─── Empty State ───────────────────────────────────────────────────────── */

.almg-empty-state {
	text-align: center;
	padding: 60px 20px;
	background: #fff;
	border: 1px solid #c3c4c7;
	margin-top: 20px;
}

.almg-empty-state h2 {
	font-size: 1.5em;
	margin-bottom: 10px;
}

.almg-empty-state p {
	color: #646970;
	font-size: 14px;
	margin-bottom: 20px;
}

/* ─── Settings Page ─────────────────────────────────────────────────────── */

.almg-settings-wrap .widefat {
	margin-top: 15px;
}

.almg-settings-wrap .widefat td {
	padding: 10px 15px;
}

/* API key masked preview */
.almg-key-preview {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 8px;
	color: #50575e;
	font-size: 13px;
}

.almg-key-preview .dashicons {
	color: #2271b1;
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.almg-key-preview code {
	font-size: 12px;
	letter-spacing: 1px;
}

/* Test Connection button and result */
.almg-test-connection-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
}

.almg-test-connection-wrap .button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: text-bottom;
	margin-right: 2px;
}

.almg-test-result {
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.almg-test-success {
	color: #00a32a;
}

.almg-test-error {
	color: #d63638;
}

.almg-test-result .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}
