/*
 * Wine Search Bar CSS
 * Styling for the wine search container, form elements, and buttons
 */

/* Search Container Styles */
.search-container {
    background-color: #fff;  /* Lighter background for better readability */
    padding: 25px;  /* Slightly more padding */
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);  /* Softer shadow */
    border: 1px solid #f0f0f0;  /* Subtle border */
}

.search-header {
    text-align: center;
    margin-bottom: 25px;
    background-color: #800000;  /* Wine red background */
    padding: 12px;
    border-radius: 6px;
}

.search-title {
    color: #ffffff;
    font-size: 1.4rem;  /* Larger font */
    margin: 0;
    font-weight: 500;  /* Medium weight for better readability */
    letter-spacing: 0.02em;
}

.wine-search-form {
    margin-bottom: 20px;
}

/* Search Grid Layout */
.search-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;  /* Increased spacing */
    margin-bottom: 25px;  /* Added margin */
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-label {
    font-weight: 600;  /* Bolder label */
    margin-bottom: 8px;
    color: #444;  /* Darker for better contrast */
    font-size: 1rem;
}

.search-input,
.search-select {
    width: 100%;
    padding: 12px;  /* Slightly larger input fields */
    border: 1px solid #ddd;
    border-radius: 6px;  /* Rounder corners */
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #f9f9f9;  /* Light gray background */
}

.search-input:focus,
.search-select:focus {
    border-color: #800000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(128, 0, 0, 0.15);
    background-color: #fff;  /* White background when focused */
}

/* Centered buttons styling */
.search-actions-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0;  /* Increased margin */
    gap: 15px;  /* Added gap between buttons */
}

.search-button-wrapper,
.clear-button-wrapper {
    display: inline-block;
    vertical-align: middle;
    height: 42px;  /* Taller buttons */
}

.search-button,
.clear-button {
    display: inline-block;
    padding: 0 20px;  /* More horizontal padding */
    border-radius: 6px;  /* Rounder corners */
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    min-width: 120px;  /* Wider buttons */
    height: 42px;
    line-height: 42px;
    box-sizing: border-box;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;  /* Smooth transitions */
}

.search-button {
    background-color: #800000;
    color: white;
    border: none;
}

.clear-button {
    background-color: #f5f5f5;
    color: #555;  /* Darker text for better contrast */
    border: 1px solid #ddd;
    text-decoration: none;
}

.search-button:hover {
    background-color: #600000;
    transform: translateY(-1px);  /* Slight lift effect */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.clear-button:hover {
    background-color: #e5e5e5;
    color: #333;
    transform: translateY(-1px);  /* Matching lift effect */
}

/* Active filters styling */
.active-filters {
    display: flex;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    background-color: #f9f9f9;  /* Light background for active filters section */
    padding: 15px;
    border-radius: 6px;
}

.filter-label {
    font-weight: 600;
    margin-right: 12px;
    color: #444;
    font-size: 1rem;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;  /* Increased spacing between tags */
}

.filter-tag {
    background-color: #800000;
    color: white;
    padding: 6px 14px;  /* More padding */
    border-radius: 20px;
    font-size: 0.95rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);  /* Subtle shadow */
    display: inline-flex;
    align-items: center;
}

/* Button highlight animation */
.search-button.highlight {
    animation: pulse 2s 1;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(128, 0, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(128, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(128, 0, 0, 0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .search-actions-container {
        flex-direction: column;
        gap: 10px;
    }

    .search-button,
    .clear-button {
        width: 100%;
        min-width: 200px;
    }

    .search-header {
        padding: 10px;
    }

    .search-title {
        font-size: 1.2rem;
    }
}
