/* Admin smart search: header typeahead (essentials/sidenav.php + assets/js/admin-search.js)
   and the extras on the customers page (includes/coupontools_customers/search.php). */

.admin-search-wrap { position: relative; }
.app-search .form-control { padding-right: 70px; }
.app-search .admin-search-kbd {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 11;
    font-size: 10px; line-height: 1; padding: 4px 6px; border-radius: 6px; pointer-events: none;
    color: #6c757d; background: rgba(0, 0, 0, .06); border: 1px solid rgba(0, 0, 0, .08);
}
body[data-topbar=dark] .app-search .admin-search-kbd,
body[data-topbar=colored] .app-search .admin-search-kbd {
    color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .15);
}

.admin-search-suggest {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 420px; z-index: 1050;
    background: #fff; color: #2a3042; border-radius: 12px; border: 1px solid #e9ecef;
    box-shadow: 0 12px 34px rgba(13, 52, 111, .18); overflow: hidden; overflow-y: auto; max-height: 70vh; text-align: left;
}
.admin-search-suggest.is-open { display: block; }
.admin-search-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: #2a3042; text-decoration: none;
    cursor: pointer; border-top: 1px solid #f1f3f5;
}
.admin-search-item:first-child { border-top: 0; }
.admin-search-item:hover, .admin-search-item.active { background: #f1f5f7; color: #2a3042; }
.admin-search-item.active { box-shadow: inset 3px 0 0 #5664d2; }
.admin-search-ico {
    flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center;
    justify-content: center; background: #eef2ff; color: #5664d2; font-size: 14px;
}
.admin-search-ico-page { background: #f1f5f7; color: #495057; }
.admin-search-item > div { flex: 1 1 auto; min-width: 0; }
.admin-search-title { font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-search-sub { font-size: 11.5px; color: #74788d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-search-item kbd { font-size: 10px; color: #74788d; background: #f1f3f5; border: 1px solid #e2e5e8; border-radius: 4px; padding: 2px 5px; }
.admin-search-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #74788d; padding: 8px 12px 2px; border-top: 1px solid #f1f3f5; }
.admin-search-foot { font-size: 11px; color: #74788d; padding: 8px 12px; border-top: 1px solid #f1f3f5; background: #fafbfc; }
.admin-search-foot code, .cust-search-tips code { font-size: 10.5px; color: #495057; background: #eef2ff; padding: 1px 5px; border-radius: 4px; }

/* Customers page: detected type + tips under the filter bar */
.ct-search-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 14px; border-bottom: 1px solid #e5e7eb; font-size: 12px; color: #6b7280; background: #fff; }
.ct-search-meta[hidden] { display: none; }
.cust-detected { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #495057; background: #eef2ff; border-radius: 999px; padding: 3px 10px; }
.cust-detected b { color: #5664d2; font-weight: 600; }
.cust-search-tips { font-size: 11.5px; color: #74788d; }
.ct-tag.is-via { background: #f1f5f7; color: #495057; font-weight: 500; }

/* Pages & features strip */
.cust-pages-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cust-page-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border: 1px solid #e2e5e8; border-radius: 999px;
    background: #fff; color: #2a3042; text-decoration: none; font-size: 13px; transition: all .15s ease;
}
.cust-page-chip:hover { border-color: #5664d2; color: #5664d2; box-shadow: 0 4px 14px rgba(86, 100, 210, .15); }
.cust-page-chip .admin-search-ico { width: 24px; height: 24px; flex-basis: 24px; font-size: 12px; border-radius: 6px; }
.cust-page-chip small { color: #74788d; }
#ctPagesStrip[hidden] { display: none; }

/* AI suggestion card, directly above the CRM card (search.php + admin-search.js) */
.cust-ai-card { border: 1px solid #c9d2ff; border-left: 4px solid #5664d2; background: linear-gradient(90deg, #f3f5ff 0%, #ffffff 65%); box-shadow: 0 6px 18px rgba(86, 100, 210, .12); }
.cust-ai-card[hidden] { display: none; }
.cust-ai-card .card-body { padding: 16px 20px; }
.cust-ai-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #5664d2; color: #fff; font-size: 18px; }
.cust-ai-title { font-size: 15px; font-weight: 600; color: #2a3042; margin-bottom: 4px; }
.cust-ai-title b { color: #5664d2; word-break: break-word; }
.cust-ai-body { font-size: 13px; }
.cust-ai-reason { color: #495057; margin-bottom: 10px; }
.cust-ai-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cust-ai-actions .btn { font-weight: 500; }
.cust-ai-meta { font-size: 11px; color: #74788d; margin-top: 6px; }

@media (max-width: 1199.98px) { .app-search .form-control { padding-right: 20px; } }
@media (max-width: 991.98px) { .admin-search-suggest { min-width: 0; } }
