/**
 * SenTur — Advanced Search Bar Styles
 * Responsive search section with autocomplete styling
 */

.search-section {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(212, 168, 67, 0.05) 100%);
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
}

.search-section form {
    align-items: flex-end;
}

.search-section .container {
    max-width: 900px;
}

.search-section input[type="text"],
.search-section select {
    transition: all 0.3s ease;
    font-weight: 500;
}

.search-section input[type="text"]:focus,
.search-section select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    outline: none;
}

.search-section input[type="text"]:hover {
    border-color: var(--color-accent);
}

.search-section .btn {
    height: 100%;
    white-space: nowrap;
}

/* Search Autocomplete Results */
.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    font-weight: 500;
    color: var(--color-text);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--color-surface-2);
}

.search-result-item span {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-section {
        padding: 2rem 0 !important;
        margin: 1.5rem 0 !important;
    }

    .search-section form {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .search-section input[type="text"],
    .search-section select,
    .search-section .btn {
        padding: 0.7rem !important;
        font-size: 0.95rem;
    }

    .search-section h2 {
        font-size: 1.3rem !important;
    }

    .search-autocomplete {
        max-height: 250px;
    }

    .search-result-item {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Dark Mode Specific */
:root[data-theme="dark"] .search-section {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(212, 168, 67, 0.08) 100%);
}

:root[data-theme="light"] .search-section {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.03) 0%, rgba(212, 168, 67, 0.03) 100%);
}

/* Animation */
.search-section h2 {
    animation: slideInDown 0.6s ease;
}

.search-section form {
    animation: slideInUp 0.6s ease 0.1s backwards;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
