/* Search Modal Styles */
.search-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.2s ease-in-out;
}

.search-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.search-modal-content {
    background: #ffffff;
    border-radius: 0;
    /* Sharp edges - no rounded corners */
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-modal-header {
    padding: 0;
    border-bottom: 3px solid #fbbf34;
    /* Golden accent border */
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #fff;
}

.search-modal-close {
    background: #f8f8f8;
    border: none;
    border-right: 1px solid #ddd;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-modal-close:hover {
    background: #fbbf34;
    color: #fff;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: 20px;
    color: #999;
    font-size: 20px;
    pointer-events: none;
}

.search-modal-input {
    width: 100%;
    padding: 20px 20px 20px 55px;
    font-size: 16px;
    border: none;
    border-radius: 0;
    outline: none;
    transition: background 0.2s;
    font-family: inherit;
}

.search-modal-input:focus {
    background: #fafafa;
}

.search-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 30px;
    background: #fff;
}

.search-results-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.search-results-empty-icon {
    font-size: 56px;
    color: #ddd;
    margin-bottom: 20px;
}

.search-results-empty-text {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

.search-results-empty-hint {
    font-size: 14px;
    color: #999;
}

.search-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.search-category {
    margin-bottom: 30px;
}

.search-category:last-child {
    margin-bottom: 0;
}

.search-category-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 14px;
    letter-spacing: 1px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.search-result-item {
    padding: 16px 18px;
    border-radius: 0;
    /* Sharp edges */
    margin-bottom: 1px;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    border-left: 3px solid transparent;
    text-decoration: none;
    display: block;
    color: inherit;
    background: #fafafa;
}

.search-result-item:hover {
    background: #fff;
    border-left-color: #fbbf34;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-result-item:last-child {
    margin-bottom: 0;
}

.search-result-title {
    font-size: 17px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 6px;
    line-height: 1.3;
}

.search-result-subtitle {
    font-size: 13px;
    color: #fbbf34;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.search-result-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.search-highlight {
    background: #fff3cd;
    padding: 1px 3px;
    font-weight: 700;
    color: #856404;
}

.search-results-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-modal.active {
        padding-top: 5vh;
    }

    .search-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .search-modal-header {
        border-bottom-width: 2px;
    }

    .search-modal-close {
        width: 45px;
    }

    .search-modal-input {
        padding: 18px 18px 18px 50px;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .search-input-icon {
        left: 18px;
        font-size: 18px;
    }

    .search-modal-body {
        padding: 18px 20px;
    }

    .search-result-item {
        padding: 14px 16px;
    }

    .search-result-title {
        font-size: 16px;
    }

    .search-result-description {
        font-size: 13px;
    }

    .search-category {
        margin-bottom: 24px;
    }
}

/* Scrollbar Styling */
.search-modal-body::-webkit-scrollbar {
    width: 6px;
}

.search-modal-body::-webkit-scrollbar-track {
    background: #f8f8f8;
}

.search-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
}

.search-modal-body::-webkit-scrollbar-thumb:hover {
    background: #fbbf34;
}