/* New Search Input Styles */

/* Override banner overflow to allow dropdown to show */
.banner-section,
.banner-section-two {
    overflow: visible !important;
    position: relative !important;
    z-index: 100 !important;
}

/* Force all sections and content below banner to stay below the dropdown */
section.categories,
section.services,
section.featured,
section {
    position: relative !important;
    z-index: 1 !important;
}

.categories,
.categories *,
.categories .common-title-container,
.categories .common-title,
.categories .common-title h3,
.categories .common-title h2,
.categories .btn-1,
.categories a,
.common-title,
.common-title * {
    z-index: inherit !important;
}

/* Ensure the entire row structure supports high z-index */
.banner-section .row,
.banner-section .col-lg-6 {
    position: relative !important;
    z-index: auto !important;
}

.banner-search-wrapper {
    position: relative !important;
    z-index: 10000 !important;
    isolation: isolate !important;
}

.new-search-container {
    margin-bottom: 30px;
    position: relative !important;
    z-index: 50000 !important;
}

.search-title {
    color: #032642 !important;
    font-size: 40px !important;
    font-weight: 600 !important;
    margin-bottom: 25px !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3) !important;
    line-height: 1.2 !important;
}

.new-search-wrapper {
    position: relative !important;
    max-width: 600px;
    z-index: 99000 !important;
    isolation: isolate !important;
}

.new-search-input {
    width: 100% !important;
    padding: 22px 170px 22px 24px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    border: 2px solid #FF5722 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #000000 !important;
    outline: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.3s ease !important;
    height: auto !important;
    min-height: 64px !important;
}

.new-search-input::placeholder {
    color: #666 !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}

.new-search-input:focus {
    box-shadow: 0 8px 32px rgba(255, 87, 34, 0.4) !important;
    border-color: #FF5722 !important;
    border-width: 4px !important;
}

.new-search-submit {
    position: absolute !important;
    right: 8px !important;
    top: 8px !important;
    bottom: 8px !important;
    padding: 0 28px !important;
    width: auto !important;
    min-width: 150px !important;
    background: #FF5722 !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4) !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
}

.new-search-submit:hover {
    background: #E64A19 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(255, 87, 34, 0.5) !important;
}

.new-search-submit i {
    font-size: 17px !important;
}

.new-search-submit span {
    font-weight: 700 !important;
}

/* Dropdown Styles */
.new-search-dropdown {
    /* Position will be set by JavaScript to 'fixed' */
    position: fixed !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    z-index: 9999999 !important;
    pointer-events: auto !important;
}

.new-search-dropdown * {
    z-index: inherit !important;
}

.dropdown-header {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
}

.dropdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-item {
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    color: #333;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #6941C6;
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* Highlight matched text */
.dropdown-item .highlight {
    font-weight: 700;
    color: #6941C6;
}

/* Scrollbar Styling */
.new-search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.new-search-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 8px 8px 0;
}

.new-search-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.new-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Change Category Button */
.btn-change-category:hover {
    background: #E64A19 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4) !important;
}

/* Quote Page Specific Styles */
.quote-banner-content {
    text-align: center;
}

#selected-category-display {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .search-title {
        font-size: 28px !important;
    }

    .new-search-input {
        font-size: 16px !important;
        padding: 18px 140px 18px 18px !important;
        min-height: 58px !important;
    }

    .new-search-submit {
        min-width: 120px !important;
        padding: 0 16px !important;
        font-size: 15px !important;
    }

    .new-search-submit i {
        font-size: 15px !important;
    }

    .new-search-dropdown {
        max-height: 300px;
    }

    /* Quote page mobile styles */
    #category-name-display {
        font-size: 32px !important;
    }

    .btn-change-category {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
}
