/**
 * HealthGrowth.in - Live Header Search Modal Styles
 */

.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 54, 84, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.search-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.search-modal-container {
    width: 100%;
    max-width: 650px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #d0e7dc;
    box-shadow: 0 20px 50px rgba(16, 54, 84, 0.18), 0 0 0 1px rgba(17,150,91,0.08);
    overflow: hidden;
    transform: translateY(-20px) scale(0.98);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.search-modal-overlay.active .search-modal-container {
    transform: translateY(0) scale(1);
}

.search-modal-header {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e5f0ea;
    background: #fbfefd;
    gap: 12px;
}

.search-modal-icon {
    font-size: 20px;
    color: #11965b;
    display: flex;
    align-items: center;
}

.search-modal-input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 16px;
    color: #103654;
    font-family: inherit;
    font-weight: 500;
}

.search-modal-input::placeholder {
    color: #8da4b5;
    font-weight: normal;
}

.search-modal-close {
    width: 32px;
    height: 32px;
    border: 0;
    background: #eef7f3;
    color: #48657a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.search-modal-close:hover {
    background: #dbeef4;
    color: #103654;
}

.search-modal-body {
    padding: 12px 14px;
    overflow-y: auto;
    flex: 1;
}

.search-modal-hint {
    padding: 24px;
    text-align: center;
    color: #708a9c;
    font-size: 14px;
}

.search-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #7b96a8;
    padding: 6px 10px;
    margin-bottom: 4px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    gap: 12px;
    transition: background 0.15s ease;
    border: 1px solid transparent;
    margin-bottom: 4px;
}

.search-result-item:hover,
.search-result-item.selected {
    background: #eef9f4;
    border-color: #bcebd5;
}

.search-result-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e8f7f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

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

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #103654;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-item:hover .search-result-title,
.search-result-item.selected .search-result-title {
    color: #087c4b;
}

.search-result-desc {
    font-size: 11px;
    color: #688296;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-badge {
    background: #edf5f1;
    color: #29465d;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.search-no-results {
    padding: 32px 16px;
    text-align: center;
    color: #678096;
    font-size: 14px;
}

.search-no-results span {
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
}

.search-modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 18px;
    background: #f4faf7;
    border-top: 1px solid #e5f0ea;
    font-size: 11px;
    color: #7b96a8;
}

.search-modal-footer b {
    color: #103654;
    background: #e5f1ec;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
}

@media (max-width: 600px) {
    .search-modal-overlay {
        padding: 16px 10px;
    }
    .search-modal-footer {
        display: none;
    }
}

/* =========================================================
   DARK MODE FOR LIVE SEARCH MODAL
========================================================= */

[data-theme="dark"] .search-modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .search-modal-container {
    background: #132238;
    border-color: #23354d;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .search-modal-header {
    background: #0e1a2b;
    border-bottom-color: #23354d;
}

[data-theme="dark"] .search-modal-icon {
    color: #34d399;
}

[data-theme="dark"] .search-modal-input {
    color: #f8fafc;
}

[data-theme="dark"] .search-modal-input::placeholder {
    color: #64748b;
}

[data-theme="dark"] .search-modal-close {
    background: #1e2f47;
    color: #cbd5e1;
}

[data-theme="dark"] .search-modal-close:hover {
    background: #283e5c;
    color: #fff;
}

[data-theme="dark"] .search-section-title {
    color: #94a3b8;
}

[data-theme="dark"] .search-result-item {
    color: #cbd5e1;
}

[data-theme="dark"] .search-result-item:hover,
[data-theme="dark"] .search-result-item.selected {
    background: #192c47;
    border-color: #10b981;
}

[data-theme="dark"] .search-result-icon {
    background: #0e1a2b;
}

[data-theme="dark"] .search-result-title {
    color: #f8fafc;
}

[data-theme="dark"] .search-result-item:hover .search-result-title,
[data-theme="dark"] .search-result-item.selected .search-result-title {
    color: #34d399;
}

[data-theme="dark"] .search-result-desc {
    color: #94a3b8;
}

[data-theme="dark"] .search-result-badge {
    background: #0e1a2b;
    color: #94a3b8;
}

[data-theme="dark"] .search-modal-footer {
    background: #0e1a2b;
    border-top-color: #23354d;
    color: #94a3b8;
}

[data-theme="dark"] .search-modal-footer b {
    color: #f8fafc;
    background: #1e2f47;
}