/* ==============================================
   SEARCH MODAL STYLES
   ============================================== */

/* Modal Overlay */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 27, 23, 0.95);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.search-modal-container {
    width: 100%;
    max-width: 700px;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
    position: relative;
}

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

/* Close Button */
.search-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: #f9f1ea;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #1e1b17;
    font-size: 1.25rem;
}

.search-modal-close:hover {
    background: #1e1b17;
    color: white;
    transform: rotate(90deg);
}

/* Modal Header */
.search-modal-header {
    margin-bottom: 1.5rem;
}

.search-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e1b17;
    margin: 0 0 0.5rem 0;
}

.search-modal-subtitle {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

/* Search Form */
.search-modal-form {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-modal-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f9f1ea;
    border-radius: 0.75rem;
    border: 2px solid #f3d3b4;
    transition: all 0.3s ease;
}

.search-modal-input-wrapper:focus-within {
    border-color: #1e1b17;
    box-shadow: 0 4px 12px rgba(30, 27, 23, 0.1);
}

.search-modal-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    background: transparent;
    font-size: 1.125rem;
    color: #1e1b17;
    outline: none;
}

.search-modal-input::placeholder {
    color: #999;
}

.search-modal-submit {
    padding: 0.75rem 1.5rem;
    margin: 0.25rem;
    background: #1e1b17;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-modal-submit:hover {
    background: #3c332c;
    transform: translateX(2px);
}

.search-modal-submit i {
    font-size: 1rem;
}

/* Search Suggestions */
.search-modal-suggestions {
    margin-top: 1.5rem;
}

.search-suggestions-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.search-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-suggestion-tag {
    padding: 0.5rem 1rem;
    background: #f9f1ea;
    border: 1px solid #f3d3b4;
    border-radius: 2rem;
    font-size: 0.875rem;
    color: #1e1b17;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.search-suggestion-tag:hover {
    background: #1e1b17;
    color: white;
    border-color: #1e1b17;
    transform: translateY(-2px);
}

/* Keyboard Shortcut Hint */
.search-modal-hint {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f3d3b4;
}

.search-modal-hint-text {
    font-size: 0.75rem;
    color: #999;
}

.search-modal-hint-key {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: #f9f1ea;
    border: 1px solid #f3d3b4;
    border-radius: 0.25rem;
    font-family: monospace;
    font-weight: 600;
    color: #1e1b17;
    margin: 0 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-modal-overlay {
        padding: 0;
        align-items: flex-start;
    }

    .search-modal-container {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
    }

    .search-modal-title {
        font-size: 1.25rem;
    }

    .search-modal-input {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }

    .search-modal-submit {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .search-suggestions-list {
        gap: 0.375rem;
    }

    .search-suggestion-tag {
        font-size: 0.8125rem;
        padding: 0.375rem 0.875rem;
    }
}

@media (max-width: 480px) {
    .search-modal-input-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-modal-input {
        width: 100%;
    }

    .search-modal-submit {
        width: 100%;
        justify-content: center;
        margin: 0;
    }

    .search-modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 32px;
        height: 32px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .search-modal-overlay,
    .search-modal-container,
    .search-modal-close,
    .search-modal-submit,
    .search-suggestion-tag {
        transition: none;
    }

    .search-modal-close:hover {
        transform: none;
    }

    .search-suggestion-tag:hover {
        transform: none;
    }
}

/* Animation for search results loading */
.search-modal-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.search-modal-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3d3b4;
    border-top: 3px solid #1e1b17;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}