/**
 * Hex Omni Search - Styles
 *
 * Overlay search interface styling
 *
 * @package Hex_Support
 */

/* ==========================================================================
   Overlay Container
   ========================================================================== */

.hex-omni-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.hex-omni-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.hex-omni-overlay-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==========================================================================
   Search Header
   ========================================================================== */

.hex-omni-search-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.hex-omni-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
}

.hex-omni-search-icon {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: 18px;
}

.hex-omni-search-input {
    width: 100%;
    padding: 12px 40px 12px 44px;
    font-size: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hex-omni-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hex-omni-search-input::placeholder {
    color: #9ca3af;
}

.hex-omni-search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

.hex-omni-search-clear:hover {
    color: #6b7280;
}

.hex-omni-close {
    margin-left: 12px;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    font-size: 20px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.hex-omni-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* ==========================================================================
   Results Container
   ========================================================================== */

.hex-omni-results {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.hex-omni-results-empty,
.hex-omni-no-results,
.hex-omni-loading,
.hex-omni-error {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 15px;
}

.hex-omni-loading i,
.hex-omni-error i {
    margin-right: 8px;
}

.hex-omni-error {
    color: #dc2626;
}

/* ==========================================================================
   Result Sections
   ========================================================================== */

.hex-omni-section {
    margin-bottom: 8px;
}

.hex-omni-section-header {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: #f3f4f6;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.hex-omni-section-header:hover {
    background: #e5e7eb;
}

.hex-omni-section-header > i:first-child {
    color: #6b7280;
    width: 20px;
    text-align: center;
    margin-right: 10px;
}

.hex-omni-section-label {
    font-weight: 600;
    color: #374151;
    flex: 1;
}

.hex-omni-section-count {
    background: #e5e7eb;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 10px;
}

.hex-omni-section-toggle {
    color: #9ca3af;
    transition: transform 0.2s;
}

.hex-omni-section.collapsed .hex-omni-section-toggle {
    transform: rotate(-90deg);
}

.hex-omni-section.collapsed .hex-omni-section-items {
    display: none;
}

.hex-omni-section-items {
    padding: 8px 0;
}

/* ==========================================================================
   Result Items
   ========================================================================== */

.hex-omni-result-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.hex-omni-result-item:hover,
.hex-omni-result-item.active {
    background: #f0f9ff;
}

.hex-omni-result-image {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 14px;
    flex-shrink: 0;
    background: #f3f4f6;
}

.hex-omni-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hex-omni-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #e0e7ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
}

.hex-omni-result-icon i {
    font-size: 16px;
}

.hex-omni-result-content {
    flex: 1;
    min-width: 0;
}

.hex-omni-result-title {
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.hex-omni-result-meta {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Product specific */
.hex-omni-product-price {
    font-weight: 600;
    color: #059669;
}

.hex-omni-product-cat,
.hex-omni-post-cat {
    color: #9ca3af;
}

.hex-omni-post-cat::before,
.hex-omni-product-cat::before {
    content: '•';
    margin-right: 8px;
}

/* Account items */
.hex-omni-account .hex-omni-result-icon {
    background: #fef3c7;
    color: #d97706;
}

/* More link */
.hex-omni-more-link {
    display: block;
    padding: 10px 20px;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s;
}

.hex-omni-more-link:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.hex-omni-footer {
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    text-align: center;
}

.hex-omni-see-all {
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    font-size: 14px;
}

.hex-omni-see-all:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* ==========================================================================
   Body State
   ========================================================================== */

body.hex-omni-open {
    overflow: hidden !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
    .hex-omni-overlay {
        padding-top: 0;
        align-items: stretch;
    }

    .hex-omni-overlay-content {
        width: 100%;
        max-width: none;
        max-height: 100%;
        border-radius: 0;
    }

    .hex-omni-search-input {
        font-size: 16px;
        padding: 10px 36px 10px 40px;
    }

    .hex-omni-result-image {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   Keyboard Shortcut Hint
   ========================================================================== */

.hex-omni-kbd-hint {
    position: absolute;
    right: 44px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    color: #6b7280;
    font-family: monospace;
}
