/**
 * Externalized inline CSS components
 * Previously output via wp_head hooks, now cacheable as external file.
 * Components: menu highlight, live search, CPO buttons, DataTables UI hide
 */

/* ==========================================================================
   MENU HIGHLIGHT
   ========================================================================== */

.menu-item.menu-highlight > a {
    background: var(--kt-gradient, linear-gradient(135deg, #057BB8 0%, #18B5E2 100%)) !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
}
.menu-item.menu-highlight > a:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
}

/* ==========================================================================
   LIVE SEARCH IN MENU
   ========================================================================== */

.kt-search-menu-item {
    display: flex !important;
    align-items: center !important;
    margin-right: 15px !important;
    position: relative !important;
}

.kt-live-search {
    position: relative;
    width: 350px;
}

.kt-search-form {
    width: 100%;
}

.kt-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    transition: all 0.2s ease;
    height: 42px;
}

.kt-search-input-wrapper:focus-within {
    background: #fff;
    border-color: #057BB8;
    box-shadow: 0 0 0 4px rgba(5,123,184,0.1);
}

.kt-search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
}

.kt-search-input-wrapper input[type="search"] {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 10px 10px 10px 40px !important;
    font-size: 14px !important;
    color: #334155 !important;
    outline: none !important;
    box-shadow: none !important;
    min-width: 0;
    height: 38px !important;
}

.kt-search-input-wrapper input::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.kt-search-btn {
    background: linear-gradient(135deg, #057BB8 0%, #18B5E2 100%);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    margin: 3px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kt-search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(5,123,184,0.3);
}

.kt-search-btn i {
    font-size: 14px;
}

/* === LIVE SEARCH RESULTS === */
.kt-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-height: 400px;
    overflow-y: auto;
    z-index: 999999;
    display: none;
}

.kt-search-results.active {
    display: block;
}

.kt-search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    text-decoration: none;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.kt-search-result-item:hover {
    background: #f0f9ff;
}

.kt-search-result-item:last-child {
    border-bottom: none;
}

.kt-search-result-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.kt-search-result-info {
    flex: 1;
    min-width: 0;
}

.kt-search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kt-search-result-price {
    font-size: 14px;
    color: #057BB8;
    font-weight: 600;
}

.kt-search-loading,
.kt-search-no-results {
    padding: 20px;
    text-align: center;
    color: #64748b;
}

@media (max-width: 849px) {
    .kt-search-menu-item,
    .kt-live-search {
        display: none !important;
    }
}

/* ==========================================================================
   CPO BUTTONS
   ========================================================================== */

.cpo-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em 1.5em;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.cpo-button--primary {
    background: var(--primary-color, #2563eb);
    color: #fff;
}
.cpo-button--primary:hover {
    background: var(--primary-color-dark, #1d4ed8);
    color: #fff;
}
.cpo-button--secondary {
    background: #f1f5f9;
    color: #334155;
}
.cpo-button--secondary:hover {
    background: #e2e8f0;
}
.cpo-button--outline {
    background: transparent;
    border: 2px solid var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
}
.cpo-button--outline:hover {
    background: var(--primary-color, #2563eb);
    color: #fff;
}
.cpo-button--small { padding: 0.5em 1em; font-size: 0.875rem; }
.cpo-button--large { padding: 1em 2em; font-size: 1.125rem; }
.cpo-button-icon { font-size: 1.1em; }
.cpo-button-error { color: #dc2626; font-style: italic; }

/* ==========================================================================
   DATATABLES UI HIDE (product pages)
   ========================================================================== */

#DataTables_Table_0_filter,
#DataTables_Table_0_length,
#DataTables_Table_0_info {
    display: none !important;
}
