/* 
 * Premium Main Search Shortcode Styles 
 * Namespace prefix: nvm-main-search-
 * ID prefix: nvm-id-main-search-
 */

.nvm-main-search-wrapper {
    width: 1170px;
    max-width: 100%;
    margin: 0 auto;
    direction: rtl;
    font-family: 'Heebo', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.nvm-main-search-form {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: #ffffff;
    border-radius: 60px;
    /* Fully rounded pill */
    /* Multi-layered soft premium shadow */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02),
        0 10px 25px rgba(0, 0, 0, 0.06),
        0 20px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 75px;
    /* Fixed height to prevent jumping */
    width: 100%;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.nvm-main-search-form:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.03),
        0 15px 35px rgba(0, 0, 0, 0.08),
        0 25px 50px rgba(0, 0, 0, 0.05);
}

.nvm-main-search-fields-container {
    display: flex;
    flex: 1;
    align-items: stretch;
    justify-content: center;
}

.nvm-main-search-field-group {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Anchor to top */
    padding: 6px 25px 0 25px;
    /* 12px from the top edge */
    flex: 1 1 0%;
    /* Strictly equal sizing */
    min-width: 0;
    /* Prevents content from stretching the flex item */
    text-align: right;
    /* Right alignment for Hebrew */
    transition: background-color 0.3s ease;
}

/* Elegant Hover/Focus states for the field groups */
.nvm-main-search-field-group:hover {
    background-color: rgba(0, 0, 0, 0.015);
}

.nvm-main-search-field-group:first-child {
    border-radius: 0 60px 60px 0;
}

/* Beautiful vertical separators that don't touch top/bottom */
.nvm-main-search-field-group::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background-color: rgba(0, 0, 0, 0.08);
}

.nvm-main-search-field-group:last-of-type::before {
    display: none;
}

.nvm-main-search-label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #47184f !important;
    margin-bottom: 12px;
    /* Huge gap so it isn't stuck to the input */
    width: 100%;
    text-transform: uppercase;
    opacity: 0.85;
    text-align: right;
}

.nvm-main-search-input,
.nvm-main-search-dropdown-toggle {
    width: 100%;
    background-color: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 500;
    color: #222;
    /* Darker, more legible text */
    padding: 0;
    transition: all 0.3s ease;
    text-align: right;
    /* Right alignment */
    height: 30px !important;
    /* Thicker, better looking height */
    min-height: 30px !important;
    line-height: 30px !important;
    margin: 0 !important;
}

/* Add an elegant animating border specific to the text input */
.nvm-main-search-input {
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}
.nvm-main-search-input:focus {
    border-bottom-color: #4a2b5b !important;
    outline: none !important;
    box-shadow: none !important;
}

.nvm-main-search-input::placeholder {
    color: #888;
    font-weight: 400;
    text-align: right;
    transition: color 0.3s ease;
    line-height: 30px !important;
}

.nvm-main-search-input:focus::placeholder {
    color: #ccc;
    /* Fade out placeholder on focus */
}

.nvm-main-search-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align contents to right (start of RTL) */
    position: relative;
}

.nvm-main-search-dropdown-toggle span {
    flex: 1;
    text-align: right;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 20px; /* Space for the arrow */
    transition: color 0.3s ease;
}

/* Ensure selected text is dark, while placeholder remains grey */
.nvm-main-search-dropdown-toggle span.nvm-selected-text {
    color: #222;
    font-weight: 500;
}

/* Animated Arrow Icons */
.nvm-main-search-dropdown-toggle i {
    font-size: 14px;
    color: #4a2b5b;
    position: absolute;
    left: 0;
    /* Arrow on the far left */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Rotate arrow when dropdown is active */
.nvm-active+.nvm-main-search-dropdown-toggle i,
.nvm-main-search-dropdown-toggle.nvm-active i {
    transform: rotate(180deg);
}

.nvm-main-search-submit-btn {
    background: linear-gradient(135deg, #e38d29 0%, #c8751b 100%);
    /* Premium gradient */
    color: #ffffff;
    border: none;
    border-radius: 60px 0 0 60px;
    padding: 0 50px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0);
}

.nvm-main-search-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #eb9a3a 0%, #d58025 100%);
    box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.1);
    /* Subtle bright flash overlay */
}

.nvm-main-search-submit-btn:active:not(:disabled) {
    transform: scale(0.98);
    /* Satisfying click feel */
}

/* Disabled state */
.nvm-main-search-submit-btn:disabled {
    opacity: 0.5;
    /* Keep the orange, just lower opacity */
    cursor: not-allowed;
    background: linear-gradient(135deg, #e38d29 0%, #c8751b 100%);
}

/* Premium Animated Dropdown Content */
.nvm-main-search-dropdown-content,
.nvm-main-search-autocomplete-list {
    visibility: hidden;
    opacity: 0;
    transform: translateY(5px) scale(0.98);
    position: absolute;
    top: calc(100% + 5px);
    /* Much closer to the field */
    right: 0;
    background-color: #ffffff;
    width: 100%;
    min-width: 280px;
    box-shadow: 0px 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    border-radius: 16px;
    text-align: right;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top center;
}

.nvm-main-search-dropdown-content.nvm-active,
.nvm-main-search-autocomplete-list.nvm-active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Dropdown items with bubble hover effect */
.nvm-main-search-dropdown-item,
.nvm-main-search-checkbox-item,
.nvm-main-search-autocomplete-list li {
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-bottom: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 15px;
    color: #47184f !important;
    font-weight: 600 !important;
    margin-bottom: 2px;
}

.nvm-main-search-dropdown-item:hover:not(.nvm-selected),
.nvm-main-search-checkbox-item:hover:not(.nvm-selected),
.nvm-main-search-autocomplete-list li:hover:not(.no-result) {
    background-color: rgba(71, 24, 79, 0.05); /* Match tint to new color */
    color: #47184f !important;
    transform: translateX(-4px);
    /* Slight slide interaction */
}

.nvm-main-search-dropdown-item.nvm-selected,
.nvm-main-search-checkbox-item.nvm-selected {
    background-color: #f0ecf4;
    color: #47184f !important;
    font-weight: 700 !important;
}

/* Checkboxes */
.nvm-main-search-checkbox-item {
    justify-content: flex-start;
    gap: 14px;
}

.nvm-main-search-checkbox-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px !important;
    /* Slightly larger, more tappable */
    height: 20px !important;
    background-color: white;
    border: 2px solid #ccc;
    border-radius: 6px;
    /* Soft rounded corners */
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    margin: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nvm-main-search-checkbox-item:hover input[type="checkbox"]:not(:checked) {
    border-color: #4a2b5b;
}

.nvm-main-search-checkbox-item input[type="checkbox"]:checked {
    background-color: #6F4165;
    border-color: #6F4165;
    transform: scale(1.05);
    /* pop effect */
}

/* Use CSS border instead of text for pure white checkmark */
.nvm-main-search-checkbox-item input[type="checkbox"]:checked:after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.nvm-main-search-autocomplete-list li.no-result {
    cursor: default;
    background-color: transparent;
    color: #aaa;
    justify-content: center;
    font-style: italic;
}

/* Elegant Custom Scrollbars */
.nvm-main-search-dropdown-content::-webkit-scrollbar,
.nvm-main-search-autocomplete-list::-webkit-scrollbar {
    width: 6px;
}

.nvm-main-search-dropdown-content::-webkit-scrollbar-track,
.nvm-main-search-autocomplete-list::-webkit-scrollbar-track {
    background: transparent;
    margin: 8px 0;
}

.nvm-main-search-dropdown-content::-webkit-scrollbar-thumb,
.nvm-main-search-autocomplete-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.nvm-main-search-dropdown-content::-webkit-scrollbar-thumb:hover,
.nvm-main-search-autocomplete-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nvm-main-search-form {
        flex-direction: column;
        align-items: stretch;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        height: auto;
        /* Remove fixed height on mobile */
    }

    .nvm-main-search-fields-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px; /* Slightly tighter gap */
    }

    .nvm-main-search-field-group {
        align-items: stretch;
        background: #ffffff;
        border-radius: 12px !important;
        /* Individual modern cards on mobile */
        border-left: none;
        padding: 12px 20px 14px 20px; /* Reduced padding for shorter height */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    }
    
    .nvm-main-search-field-group:hover,
    .nvm-main-search-field-group:focus-within {
        background-color: #fafafa; /* Solid light grey, NOT transparent */
    }

    .nvm-main-search-label {
        margin-bottom: 2px; /* Reduce the huge gap on mobile */
        font-size: 12px;
    }

    .nvm-main-search-field-group::before {
        display: none;
    }

    .nvm-main-search-submit-btn {
        margin-top: 10px;
        border-radius: 12px;
        height: 55px;
    }
}