/**
 * AI Search Admin Settings Styles
 * Version: 1.11.0
 */

/* Similarity Threshold Section */







.ai-search-threshold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 3px solid #2271b1;
}

.ai-search-threshold-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 3px solid #2271b1;
}

/* Interactive Demo Section */











/* Badge Setting */
.ai-search-badge-setting {
    margin: 20px 0;
}

.ai-search-badge-setting label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.ai-search-badge-setting input[type="checkbox"] {
    margin-right: 8px;
}

/* --- Native panel + slider styles (1.29.0 admin refresh) --- */
.ai-search-panel {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 16px 20px 20px;
    margin: 16px 0;
    max-width: 720px;
}
.ai-search-panel h2 {
    margin: 0 0 4px;
    padding: 0;
    font-size: 15px;
}
.ai-search-panel > .description {
    margin: 0 0 16px;
}
.ai-search-slider-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 8px 0 4px;
}
.ai-search-range {
    flex: 1;
    max-width: 480px;
}
.ai-search-range-value {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    min-width: 48px;
    text-align: right;
}
.ai-search-range-ends {
    display: flex;
    justify-content: space-between;
    max-width: 480px;
    font-size: 11px;
    color: #646970;
}
.ai-search-range-hint {
    margin-top: 10px;
}

/* --- Shared utility classes (1.29.0) --- */
.ai-search-note {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 12px 16px;
    margin: 16px 0;
    max-width: 720px;
    border-radius: 0 4px 4px 0;
}
.ai-search-note p:first-child { margin-top: 0; }
.ai-search-note p:last-child { margin-bottom: 0; }
.ai-search-note--warning {
    background: #fcf9e8;
    border-left-color: #dba617;
}
.ai-search-list {
    list-style: disc;
    margin: 8px 0 8px 20px;
}
.ai-search-maxw { max-width: 720px; }
.ai-search-cols-3 { column-count: 3; column-gap: 20px; }
.ai-search-check-label { display: block; margin: 5px 0; break-inside: avoid; }
.ai-search-muted { color: #646970; font-size: 0.9em; }

/* Quota usage bars (moved from inline styles, 1.29.0) */
.quota-progress-bar {
    background: #dcdcde;
    border-radius: 3px;
    height: 22px;
    max-width: 480px;
    overflow: hidden;
    margin: 6px 0 2px;
}
.quota-progress-fill {
    background: #2271b1;
    height: 100%;
    border-radius: 3px;
    display: flex;
    align-items: center;
    transition: width 0.3s;
}
.quota-progress-fill span {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding-left: 8px;
    white-space: nowrap;
}
.quota-exceeded .quota-progress-fill { background: #d63638; }
.ai-search-tool-row { margin: 20px 0; }
.ai-search-tool-row--sep { border-top: 1px solid #dcdcde; padding-top: 20px; }

/* --- Checkbox grid for field pickers (v1.32.0) ---
   Replaces CSS columns, which flowed items vertically and made the list
   hard to scan. Auto-fill grid keeps reading order left-to-right and
   adapts from one column on narrow screens to four on wide ones. */
.ai-search-checkgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
    margin: 12px 0 4px;
}
.ai-search-panel .ai-search-checkcard,
.ai-search-checkgrid .ai-search-checkcard,
.ai-search-checkcard {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.ai-search-checkcard:hover {
    border-color: #2271b1;
    background: #f6f7f7;
}
.ai-search-checkcard input[type="checkbox"] {
    margin: 2px 0 0;
    flex-shrink: 0;
}
.ai-search-checkcard-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ai-search-checkcard-title {
    font-weight: 600;
    color: #1d2327;
    line-height: 1.3;
    word-break: break-word;
}
.ai-search-checkcard-meta {
    font-size: 11px;
    color: #646970;
    font-family: Consolas, Monaco, monospace;
    word-break: break-all;
    margin-top: 2px;
}
.ai-search-checkcard--simple {
    align-items: center;
}

/* Announcement panel: a one-time pointer to a new feature. Uses the
   admin's own accent rather than a colour of our own, and is dismissible
   so it does not become permanent furniture. */
.ai-search-panel--highlight {
	border-left: 4px solid #2271b1;
}

.ai-search-panel--highlight h2 {
	margin-top: 0;
}

/* v1.44.0: Spotlight panel — slightly louder than --highlight, way quieter
   than the .ais-hero gradient. Brand-purple left accent + a 3% diagonal
   wash of the plugin's purple→pink gradient as background. For promoting a
   paid feature on a tab that otherwise lives in native wp-admin greys. */
.ai-search-panel--spotlight {
	border-left: 4px solid #231a4f;
	background-image: linear-gradient(135deg, rgba(35, 26, 79, 0.04) 0%, rgba(248, 119, 229, 0.04) 100%);
}

.ai-search-panel--spotlight h2 {
	margin-top: 0;
}

/* ---------------------------------------------------------------- *
 * Claim celebration + reindex reminder (v1.34.0)
 *
 * The two panels the customer sees after activating a paid plan.
 * Deliberately louder than the rest of the admin - the moment right
 * after checkout is when they need to see they got what they paid for
 * and know what to do next.
 * ---------------------------------------------------------------- */

.ais-hero {
	position: relative;
	overflow: hidden;
	margin: 20px 0 24px;
	padding: 32px 36px 36px;
	border-radius: 14px;
	color: #ffffff;
	background: linear-gradient(135deg, #372696 0%, #f877e5 100%);
	box-shadow: 0 6px 32px -8px rgba(55, 38, 150, 0.35);
}

.ais-hero__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(600px 200px at 90% -20%, rgba(255, 255, 255, 0.18), transparent 60%),
		radial-gradient(400px 200px at 10% 120%, rgba(255, 255, 255, 0.12), transparent 60%);
	z-index: 0;
}

.ais-hero__eyebrow,
.ais-hero__title,
.ais-hero__lede,
.ais-hero__grid {
	position: relative;
	z-index: 1;
}

.ais-hero__eyebrow {
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: 10px;
}

.ais-hero__title {
	margin: 0 0 12px !important;
	color: #ffffff !important;
	font-size: 28px !important;
	line-height: 1.15 !important;
	font-weight: 700 !important;
	padding: 0 !important;
	border: 0 !important;
}

.ais-hero__lede {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.9);
	max-width: 620px;
}

.ais-hero__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

@media (max-width: 782px) {
	.ais-hero__grid { grid-template-columns: 1fr; }
	.ais-hero { padding: 24px 22px 26px; }
	.ais-hero__title { font-size: 22px !important; }
}

.ais-hero__card {
	padding: 18px 20px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 10px;
	backdrop-filter: blur(4px);
}

.ais-hero__card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-bottom: 12px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.2);
	color: #ffffff;
}

.ais-hero__card-title {
	font-size: 15px;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 4px;
}

.ais-hero__card-body {
	font-size: 13px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.9);
}

/* -- Reindex reminder card ---------------------------------------- */

.ais-reindex-card {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	margin: 0 0 24px;
	padding: 22px 24px;
	background: #ffffff;
	border: 1px solid #e6e2f5;
	border-left: 4px solid #372696;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(55, 38, 150, 0.06);
}

.ais-reindex-card__icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin-top: 2px;
	color: #372696;
	background: #f4f2fa;
	border-radius: 10px;
}

.ais-reindex-card__body {
	flex: 1;
	min-width: 0;
}

.ais-reindex-card__title {
	margin: 0 0 6px !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #1e1e1e !important;
}

.ais-reindex-card__body p {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.55;
	color: #3a3e46;
}

.ais-reindex-card__meta {
	color: #6d6489 !important;
	font-size: 13px !important;
}

.ais-reindex-card__actions {
	margin-top: 12px !important;
	display: flex;
	align-items: center;
	gap: 16px;
}

.ais-reindex-card__cta {
	background: linear-gradient(135deg, #372696 0%, #f877e5 100%) !important;
	border: none !important;
	color: #ffffff !important;
	font-weight: 600 !important;
	padding: 6px 18px !important;
	border-radius: 999px !important;
	text-shadow: none !important;
	box-shadow: 0 2px 8px rgba(55, 38, 150, 0.25) !important;
}

.ais-reindex-card__cta:hover,
.ais-reindex-card__cta:focus {
	opacity: 0.92;
	background: linear-gradient(135deg, #372696 0%, #f877e5 100%) !important;
	color: #ffffff !important;
}

.ais-reindex-card__dismiss {
	color: #6d6489;
	font-size: 13px;
	text-decoration: underline;
}

/* ---------------------------------------------------------------- *
 * Pro upgrade banner (v1.34.1)
 *
 * Uses admin_notices so it sits above the tab content, but styles it
 * as a card so it does not read like a system message. Compact height
 * (~60px), same purple to pink language as the claim hero.
 * ---------------------------------------------------------------- */

.ai-search-pro-banner {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 12px 20px 20px 0;
	padding: 14px 20px;
	background: #ffffff;
	border: 1px solid #e6e2f5;
	border-left: 4px solid transparent;
	border-image: linear-gradient(180deg, #372696 0%, #f877e5 100%) 1;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(55, 38, 150, 0.05);
}

.ai-search-pro-banner__icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	color: #372696;
	background: #f4f2fa;
	border-radius: 8px;
}

.ai-search-pro-banner__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ai-search-pro-banner__title {
	font-size: 14px;
	font-weight: 600;
	color: #1e1e1e;
	line-height: 1.35;
}

.ai-search-pro-banner__lede {
	font-size: 13px;
	color: #5c5c5c;
	line-height: 1.45;
}

.ai-search-pro-banner__actions {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 14px;
}

.ai-search-pro-banner__cta {
	display: inline-block;
	padding: 8px 20px;
	font-size: 13px;
	font-weight: 600;
	color: #ffffff !important;
	text-decoration: none !important;
	background: linear-gradient(135deg, #372696 0%, #f877e5 100%);
	border-radius: 999px;
	box-shadow: 0 2px 6px rgba(55, 38, 150, 0.2);
}

.ai-search-pro-banner__cta:hover,
.ai-search-pro-banner__cta:focus {
	opacity: 0.92;
	color: #ffffff !important;
}

.ai-search-pro-banner__dismisses {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
}

.ai-search-pro-banner__dismiss-sep {
	color: #c8c2dc;
	font-size: 12px;
}

.ai-search-pro-banner__dismiss {
	font-size: 12px;
	color: #6d6489 !important;
	text-decoration: underline;
}

.ai-search-pro-banner__dismiss:hover {
	color: #372696 !important;
}

.ai-search-pro-banner__dismiss--forever {
	color: #8a839f !important;
}

@media (max-width: 782px) {
	.ai-search-pro-banner { flex-direction: column; align-items: flex-start; padding: 14px 16px; }
	.ai-search-pro-banner__actions { width: 100%; justify-content: space-between; margin-top: 4px; }
}

/* ------------------------------------------------------------------
 * Quota-warning banner (v1.35.0)
 *
 * Same shape as .ai-search-pro-banner so the two never look like
 * different systems, but a warning-tinted left border + icon well so
 * the user reads it as urgent, not promotional. Two variants:
 *  - .ai-search-quota-banner--quota_warning  (yellow/amber, 80% used)
 *  - .ai-search-quota-banner--quota_exhausted (red, 100% used)
 * ------------------------------------------------------------------ */

.ai-search-quota-banner {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 12px 20px 20px 0;
	padding: 14px 20px;
	background: #ffffff;
	border: 1px solid #f0d799;
	border-left: 4px solid #d97706;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(217, 119, 6, 0.08);
}

.ai-search-quota-banner--quota_exhausted {
	border-color: #f2b8b5;
	border-left-color: #b91c1c;
	box-shadow: 0 1px 4px rgba(185, 28, 28, 0.10);
}

.ai-search-quota-banner__icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	color: #b45309;
	background: #fef3c7;
	border-radius: 8px;
}

.ai-search-quota-banner--quota_exhausted .ai-search-quota-banner__icon {
	color: #b91c1c;
	background: #fee2e2;
}

.ai-search-quota-banner__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ai-search-quota-banner__title {
	font-size: 14px;
	font-weight: 600;
	color: #1e1e1e;
	line-height: 1.35;
}

.ai-search-quota-banner__lede {
	font-size: 13px;
	color: #5c5c5c;
	line-height: 1.45;
}

.ai-search-quota-banner__actions {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 14px;
}

.ai-search-quota-banner__cta {
	display: inline-block;
	padding: 8px 20px;
	font-size: 13px;
	font-weight: 600;
	color: #ffffff !important;
	text-decoration: none !important;
	background: linear-gradient(135deg, #372696 0%, #f877e5 100%);
	border-radius: 999px;
	box-shadow: 0 2px 6px rgba(55, 38, 150, 0.2);
}

.ai-search-quota-banner__cta:hover,
.ai-search-quota-banner__cta:focus {
	opacity: 0.92;
	color: #ffffff !important;
}

.ai-search-quota-banner__dismisses {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
}

.ai-search-quota-banner__dismiss-sep {
	color: #c8c2dc;
	font-size: 12px;
}

.ai-search-quota-banner__dismiss {
	font-size: 12px;
	color: #6d6489 !important;
	text-decoration: underline;
}

.ai-search-quota-banner__dismiss:hover {
	color: #372696 !important;
}

.ai-search-quota-banner__dismiss--forever {
	color: #8a839f !important;
}

@media (max-width: 782px) {
	.ai-search-quota-banner { flex-direction: column; align-items: flex-start; padding: 14px 16px; }
	.ai-search-quota-banner__actions { width: 100%; justify-content: space-between; margin-top: 4px; }
}

/* v1.43.0: paid-tier feature gating. `.is-locked` greys out a settings
   row and disables interaction; `.ai-search-upgrade-badge` is the pill
   that sits next to the label pointing to the pricing page. Same purple
   -> pink gradient as the one-click sync ring, so the brand language
   stays coherent across the plugin. */
.ai-search-field.is-locked { opacity: 0.55; position: relative; }
.ai-search-field.is-locked input,
.ai-search-field.is-locked select,
.ai-search-field.is-locked textarea,
.ai-search-field.is-locked label { pointer-events: none; cursor: not-allowed; }
.ai-search-field.is-locked > :not(.ai-search-upgrade-badge) { opacity: 0.9; }

.ai-search-upgrade-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	background-image: linear-gradient(135deg, #231a4f, #f877e5);
	color: #fff !important;
	text-decoration: none !important;
	vertical-align: middle;
	margin-left: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
	pointer-events: auto; /* always clickable even inside .is-locked */
}
.ai-search-upgrade-badge:hover,
.ai-search-upgrade-badge:focus { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(35, 26, 79, 0.25); color: #fff !important; }

