/**
 * WP EasyCart — one admin search ( 6.0.5 ): the window admin-search-v2.js draws on <body>.
 * Colours from the shell's tokens ( admin-frame-v2.css :root ) and the admin colour ( --ec-brand ).
 *
 * @since 6.0.5
 */

html.wpec-search-open { overflow:hidden; }
.wpec-search { position:fixed; inset:0; z-index:100050; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; color:var(--ecsh-g800,#1f2937); -webkit-font-smoothing:antialiased; }
.wpec-search[hidden] { display:none; }
.wpec-search *, .wpec-search *::before, .wpec-search *::after { box-sizing:border-box; }
.wpec-search-backdrop { position:absolute; inset:0; background:rgba(17,24,39,.48); }
.wpec-search-panel {
	position:relative; display:flex; flex-direction:column;
	width:min(680px, calc(100vw - 24px)); max-height:min(76vh, 720px);
	margin:min(11vh, 96px) auto 0;
	background:#fff; border:1px solid var(--ecsh-g200,#e5e7eb); border-radius:14px;
	box-shadow:0 24px 60px -12px rgba(17,24,39,.35), 0 8px 18px -8px rgba(17,24,39,.2); overflow:hidden;
}

/* The box */
.wpec-search-top { display:flex; flex:0 0 auto; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--ecsh-g200,#e5e7eb); color:var(--ecsh-g400,#9ca3af); }
.wpec-search-top > svg { width:18px; height:18px; flex-shrink:0; }
.wpec-search .wpec-search-input,
.wpec-search .wpec-search-input[type="text"] {
	flex:1; min-width:0; border:0 !important; outline:0 !important; background:transparent !important; box-shadow:none !important;
	min-height:0; margin:0; padding:0; font-size:16px; line-height:24px; color:var(--ecsh-g900,#111827);
}
.wpec-search .wpec-search-input::placeholder { color:var(--ecsh-g400,#9ca3af); opacity:1; }
.wpec-search-spin { width:16px; height:16px; border:2px solid var(--ecsh-g200,#e5e7eb); border-top-color:var(--ec-brand,#2271b1); border-radius:50%; animation:wpec-search-spin .7s linear infinite; flex-shrink:0; }
.wpec-search-spin[hidden] { display:none; }
@keyframes wpec-search-spin { to { transform:rotate(360deg); } }
.wpec-search-x { border:0; background:transparent; padding:0; cursor:pointer; line-height:1; }
.wpec-search kbd {
	display:inline-block; font:500 10.5px/1.5 inherit; font-family:inherit; color:var(--ecsh-g500,#6b7280);
	border:1px solid var(--ecsh-g300,#d1d5db); border-bottom-width:2px; border-radius:4px; padding:0 5px; background:var(--ecsh-g50,#f9fafb); margin:0;
}

/* Group chips */
.wpec-search-chips { display:flex; flex:0 0 auto; gap:6px; padding:9px 14px; border-bottom:1px solid var(--ecsh-g100,#f3f4f6); overflow-x:auto; scrollbar-width:none; } /* 6.0.5: never squeezed by a long list ( a scrolling row may shrink below its content ) */
.wpec-search-chips[hidden] { display:none; }
.wpec-search-chips::-webkit-scrollbar { display:none; }
.wpec-search-chip {
	flex-shrink:0; border:1px solid var(--ecsh-g200,#e5e7eb); background:#fff; color:var(--ecsh-g700,#374151);
	border-radius:999px; padding:3px 11px; font-size:12.5px; line-height:20px; cursor:pointer; white-space:nowrap;
}
.wpec-search-chip span { color:var(--ecsh-g400,#9ca3af); font-size:11.5px; margin-left:2px; }
.wpec-search-chip:hover { border-color:var(--ecsh-g300,#d1d5db); }
.wpec-search-chip.is-on { background:var(--ec-brand,#2271b1); border-color:var(--ec-brand,#2271b1); color:var(--ec-on-brand,#fff); }
.wpec-search-chip.is-on span { color:inherit; opacity:.8; }

/* Results */
.wpec-search-list { flex:1 1 auto; min-height:0; overflow-y:auto; padding:6px 8px 10px; overscroll-behavior:contain; }
.wpec-search-group { padding-top:4px; }
.wpec-search-group + .wpec-search-group { border-top:1px solid var(--ecsh-g100,#f3f4f6); margin-top:4px; }
.wpec-search-group-head { padding:8px 10px 4px; font-size:11px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--ecsh-g500,#6b7280); }
.wpec-search-row {
	display:flex; align-items:center; gap:11px; padding:8px 10px; border-radius:9px; cursor:pointer;
	color:var(--ecsh-g800,#1f2937); scroll-margin:8px;
}
.wpec-search-row.is-active { background:var(--ec-brand-softer,#f0f6fc); box-shadow:inset 0 0 0 1px var(--ec-brand-soft,#c5d9ed); }
.wpec-search-icon { width:30px; height:30px; flex-shrink:0; display:flex; align-items:center; justify-content:center; border-radius:8px; background:var(--ecsh-g100,#f3f4f6); color:var(--ecsh-g500,#6b7280); }
.wpec-search-icon svg { width:16px; height:16px; }
.wpec-search-row.is-active .wpec-search-icon { background:#fff; color:var(--ec-brand,#2271b1); }
.wpec-search-thumb { width:30px; height:30px; flex-shrink:0; border-radius:7px; overflow:hidden; background:var(--ecsh-g100,#f3f4f6); }
.wpec-search-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.wpec-search-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.wpec-search-title { font-size:13.5px; font-weight:500; line-height:1.35; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpec-search-sub { font-size:12px; line-height:1.35; color:var(--ecsh-g500,#6b7280); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpec-search mark { background:transparent; color:var(--ec-brand-deep,#135e96); font-weight:700; padding:0; }
.wpec-search-right { display:flex; align-items:center; gap:6px; flex-shrink:0; max-width:45%; }
.wpec-search-value {
	font-size:11.5px; color:var(--ecsh-g700,#374151); background:var(--ecsh-g100,#f3f4f6); border-radius:6px; padding:2px 7px;
	max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.wpec-search-badge {
	--wpec-badge:var(--ecsh-g500,#6b7280);
	font-size:11px; font-weight:600; border-radius:999px; padding:1px 8px; white-space:nowrap;
	color:var(--wpec-badge); background:color-mix(in srgb, var(--wpec-badge) 12%, #fff); border:1px solid color-mix(in srgb, var(--wpec-badge) 30%, #fff);
}
@supports not (color: color-mix(in srgb, red, blue)) { .wpec-search-badge { background:var(--ecsh-g100,#f3f4f6); border-color:var(--ecsh-g200,#e5e7eb); } }
.wpec-search-plan { font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; border-radius:4px; padding:1px 6px; background:var(--ecv2-plan-bg, #ede9fe); color:var(--ecv2-plan-fg, #5b21b6); }
/* 6.0.7: Premium reads as every plan chip ( one look ); an Update chip keeps its blue. */
.wpec-search-plan.is-update { background:#dbeafe; color:#1e40af; }
.wpec-search-when { font-size:11.5px; color:var(--ecsh-g400,#9ca3af); white-space:nowrap; }
.wpec-search-out { color:var(--ecsh-g400,#9ca3af); display:flex; }
.wpec-search-out svg { width:13px; height:13px; }
.wpec-search-row.is-docsearch .wpec-search-title { color:var(--ec-brand,#2271b1); font-weight:600; }
.wpec-search-row.is-doc .wpec-search-sub { white-space:normal; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; }

/* The top hit: an order number, a customer's email, a SKU */
.wpec-search-top-hit { padding:4px 2px 6px; }
.wpec-search-row.is-big { align-items:flex-start; padding:12px; border:1px solid var(--ecsh-g200,#e5e7eb); background:var(--ecsh-g50,#f9fafb); }
.wpec-search-row.is-big.is-active { border-color:var(--ec-brand,#2271b1); background:var(--ec-brand-softer,#f0f6fc); box-shadow:none; }
.wpec-search-row.is-big .wpec-search-icon,
.wpec-search-row.is-big .wpec-search-thumb { width:40px; height:40px; }
.wpec-search-row.is-big .wpec-search-title { font-size:15px; font-weight:600; }
.wpec-search-acts { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.wpec-search .wpec-search-act {
	display:inline-flex; align-items:center; font-size:12.5px; font-weight:500; line-height:20px; text-decoration:none;
	padding:3px 10px; border-radius:7px; border:1px solid var(--ecsh-g300,#d1d5db); background:#fff; color:var(--ecsh-g800,#1f2937);
}
.wpec-search .wpec-search-act:first-child { background:var(--ec-brand,#2271b1); border-color:var(--ec-brand,#2271b1); color:var(--ec-on-brand,#fff); }
.wpec-search .wpec-search-act:hover { border-color:var(--ec-brand,#2271b1); }
.wpec-search .wpec-search-act:focus-visible { outline:2px solid var(--ec-brand,#2271b1); outline-offset:2px; }

.wpec-search .wpec-search-more {
	display:block; width:100%; text-align:left; border:0; background:transparent; cursor:pointer;
	margin:0; padding:5px 10px 6px 51px; font-size:12.5px; color:var(--ec-brand,#2271b1); text-decoration:none; border-radius:0;
}
.wpec-search .wpec-search-more:hover { text-decoration:underline; }
.wpec-search-note, .wpec-search-empty { padding:10px 12px; font-size:13px; color:var(--ecsh-g500,#6b7280); display:flex; align-items:center; gap:8px; }
.wpec-search-empty { padding:16px 12px 8px; color:var(--ecsh-g600,#4b5563); }
.wpec-search-dot { width:8px; height:8px; border-radius:50%; background:var(--ec-brand,#2271b1); animation:wpec-search-pulse 1s ease-in-out infinite; flex-shrink:0; }
@keyframes wpec-search-pulse { 50% { opacity:.25; } }
.wpec-search-tip { margin:8px 10px 2px; padding:9px 12px; border-radius:9px; background:var(--ecsh-g50,#f9fafb); font-size:12.5px; color:var(--ecsh-g600,#4b5563); }

.wpec-search-foot {
	display:flex; flex:0 0 auto; flex-wrap:wrap; gap:6px 16px; align-items:center; padding:9px 16px; border-top:1px solid var(--ecsh-g200,#e5e7eb);
	background:var(--ecsh-g50,#f9fafb); font-size:11.5px; color:var(--ecsh-g500,#6b7280);
}
.wpec-search-foot kbd { margin-right:2px; }
.wpec-search-foot-docs { margin-left:auto; display:inline-flex; align-items:center; gap:5px; }
.wpec-search-foot-docs svg { width:13px; height:13px; }

@media (prefers-reduced-motion:reduce) {
	.wpec-search-spin, .wpec-search-dot { animation:none; }
}

/* Phones: a sheet from the bottom, no key hints */
@media (max-width:600px) {
	.wpec-search-panel { position:absolute; left:0; right:0; bottom:0; width:100%; max-height:calc(100% - 40px); height:calc(100% - 40px); margin:0; border-radius:16px 16px 0 0; border-bottom:0; }
	.wpec-search-foot { display:none; }
	.wpec-search .wpec-search-input { font-size:16px; }
	.wpec-search-right { max-width:38%; }
	.wpec-search-value { max-width:110px; }
	.wpec-search-row { padding:10px; }
}

/* The header box opens the window ( and the kbd shows the platform's key ) */
.ecsh-tb-search { cursor:text; }
.ecsh-tb-search input { cursor:text; }

/* Settings home: the one line that says where search went */
.ecst-search-hint { display:flex; align-items:center; gap:8px; margin:4px 0 18px; font-size:13px; color:var(--ecsh-g600,#4b5563); }
.ecst-search-hint button {
	display:inline-flex; align-items:center; gap:8px; border:1px solid var(--ecsh-g300,#d1d5db); border-radius:9px; background:#fff;
	padding:7px 12px; font-size:13px; color:var(--ecsh-g600,#4b5563); cursor:pointer; min-width:min(360px, 100%);
}
.ecst-search-hint button:hover { border-color:var(--ec-brand,#2271b1); color:var(--ecsh-g800,#1f2937); }
.ecst-search-hint button svg { width:15px; height:15px; color:var(--ecsh-g400,#9ca3af); }
.ecst-search-hint button kbd { margin-left:auto; font-size:10.5px; font-family:inherit; color:var(--ecsh-g500,#6b7280); border:1px solid var(--ecsh-g300,#d1d5db); border-radius:4px; padding:0 5px; background:var(--ecsh-g50,#f9fafb); }

/* Lists: "Search everywhere for …" under an empty search */
.ecv2-empty-everywhere { margin:12px 0 0; }
.ecv2-card-grid > .ecv2-empty-state { flex-direction:column; }
