/**
 * MilNil Shop Page Search Bar Styles - Full Theme Update
 * Version: 2.2.0
 * Colors: Deep Purple (#2c1a70) & Industrial Red (#c8102e)
 */

/* ========================================
   1. MAIN WRAPPER
   ======================================== */
.milnil-shop-controls-wrapper {
    width: 100%;
    margin: 20px 0 30px 0;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
}

/* ========================================
   2. SEARCH & INPUT AREA
   ======================================== */
.milnil-shop-search-wrapper {
    flex: 1;
    display: flex;
}

.milnil-shop-search-form {
    display: flex;
    width: 100%;
    align-items: center;
}

.search-input-group {
    display: flex;
    flex: 1;
    background: #ffffff;
    border-radius: 4px 0 0 4px;
    overflow: hidden;
    border: 1px solid #d0d0d0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.milnil-search-field {
    width: 100%;
    padding: 12px 15px;
    border: none;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    color: #333;
    background: #ffffff;
    transition: background 0.3s ease;
}

.milnil-search-field:focus {
    background: #fafafa;
}

.milnil-search-field::placeholder {
    color: #999;
}

/* ========================================
   3. CATEGORY DROPDOWN
   ======================================== */
.milnil-shop-category-wrapper {
    background: #ffffff;
    border-left: 1px solid #eeeeee;
    min-width: 240px;
    max-width: 300px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    overflow: visible;
}

.milnil-shop-category-form {
    width: 100%;
    display: flex;
    align-items: center;
}

.milnil-category-select {
    width: 100%;
    padding: 15 0 0 0;
    border: 1px solid #d0d0d0 !important;
    border-radius: 0 !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232c1a70' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px 8px !important;
    color: #333 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    transition: all 0.3s ease !important;
    min-height: 44px !important;
    outline: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.milnil-category-select option {
    padding: 10px 8px !important;
    color: #333 !important;
    background: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 14px !important;
}

.milnil-category-select option:checked {
    background: #f0f0f0 !important;
    color: #2c1a70 !important;
}

.milnil-category-select option:hover {
    background: #e8e8e8 !important;
}

.milnil-category-select:hover {
    color: #2c1a70 !important;
    background-color: #f9f9f9 !important;
    border-color: #2c1a70 !important;
}

.milnil-category-select:focus {
    outline: 2px solid #2c1a70 !important;
    outline-offset: 2px !important;
    background-color: #ffffff !important;
}

/* ========================================
   4. SEARCH BUTTON (The "Theme Matcher")
   ======================================== */
.milnil-search-submit {
    padding: 0 24px;
    background: #2c1a70;
    color: #ffffff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.milnil-search-submit:hover {
    background: #1f1350;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.milnil-search-submit:active {
    background: #17102a;
}

.milnil-search-submit svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   5. RESPONSIVE DESIGN
   ======================================== */

/* Tablet/Mobile View */
@media (max-width: 850px) {
    .milnil-shop-controls-wrapper {
        flex-wrap: wrap;
        padding: 0;
        gap: 8px;
        margin: 15px 0 20px 0;
    }

    .milnil-shop-search-wrapper {
        flex: 1;
        min-width: 100%;
    }

    .search-input-group {
        border-radius: 4px;
        border: 1px solid #d0d0d0;
    }

    .milnil-search-field {
        padding: 11px 12px;
        font-size: 14px;
    }

    .milnil-search-submit {
        display: none;
    }

    .milnil-shop-category-wrapper {
        width: 100%;
        border-left: none;
        min-width: 100%;
        padding: 0;
    }

    .milnil-category-select {
        width: 100%;
        border: 1px solid #d0d0d0;
        border-radius: 4px;
        padding: 11px 30px 11px 12px;
    }
}

/* High Contrast/Accessibility */
@media (prefers-contrast: more) {
    .milnil-shop-controls-wrapper {
        border: 2px solid #000;
    }
}