/* ─────────────────────────────────────────────────────────
   Hero Search — index.html only
   Exact mirror of Vue TopFilter.vue + marketplace-number-style.css
   Scoped under .hero-section .search-number to prevent conflicts.
   ───────────────────────────────────────────────────────── */

/* ── Outer stack ── */
.hero-section .search-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* ════════════════════════════════
   Toggle — exact .switcher values
   ════════════════════════════════ */
.hero-section .search-number .toggle-wrapper {
    display: flex;
    justify-content: center;
}

.hero-section .search-number .toggle-wrapper .switcher {
    margin: 0 auto 23px;
}

.hero-section .search-number .toggle-wrapper .switcher .roller.active {
    left: 50%;
}

.hero-section .search-number .toggle-wrapper .switcher .parts {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    display: flex;
    gap: 1px;
}

.hero-section .search-number .toggle-wrapper .switcher .parts .part {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section .search-number .toggle-wrapper .switcher .parts .part span {
    transition: color 0.4s ease;
    position: relative;
    z-index: 1;
}

.hero-section .search-number .toggle-wrapper .switcher .parts .part .active {
    color: #4260cb;
}

/* ════════════════════════════════
   White search pill — exact .main-search values
   ════════════════════════════════ */
.hero-section .search-number .main-search {
    border-radius: 51px;
    background: #fff;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
    padding: 20px;
    max-width: 827px;
    width: 100%;
    margin: 0 auto;
}

/* Both gray wrappers — exact values */
.hero-section .search-number .main-search .state-search-pere,
.hero-section .search-number .main-search .state-select2-pere {
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    background: #f7f7f7;
    padding: 16px 20px 17px;
    position: relative;
}

/* State takes fixed width — flex: 0 0 prevents shrinking */
.hero-section .search-number .main-search .state-select2-pere.choos-states {
    flex: 0 0 209px;
    width: 209px;
    justify-content: flex-start;
}

/* Inner row (code + input + button) takes remaining space */
.hero-section .search-number .main-search .state-search-pere {
    flex: 1 1 0;
    min-width: 0;
    padding: 16px 0 17px 20px; /* pe-0 = no right padding */
    justify-content: flex-start;
    gap: 0;
}

/* Code dropdown — fixed 115px */
.hero-section .search-number .main-search #code_no,
.hero-section .search-number .main-search #code_no_tf {
    flex: 0 0 115px;
    width: 115px;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 8px;
}

/* Input + Button area */
.hero-section .search-number .main-search .search-border {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

/* Vertical divider before input */
.hero-section .search-number .main-search .search-border::before {
    content: " ";
    position: absolute;
    left: 0;
    height: 30px;
    margin: auto;
    bottom: 0;
    top: 0;
    width: 1px;
    background-color: rgba(34, 35, 40, 0.1);
}

/* All text inputs — transparent on gray bg */
.hero-section .search-number .main-search .form-control {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 18px;
    font-weight: 500;
    color: #4260cb;
    padding: 0;
    height: 100%;
    width: 100%;
    min-width: 0;
    border-radius: 0;
}

/* Dropdown inputs need right padding so text doesn't run under the arrow */
.hero-section .search-number .main-search .dropdown-component .form-control {
    padding-right: 28px;
}

.hero-section .search-number .main-search .form-control::placeholder {
    color: #8c94b0;
    font-weight: 500;
}

.hero-section .search-number .main-search .form-control:focus {
    outline: none;
    box-shadow: none !important;
    border: none !important;
}

/* Number search — inside search-border, gets padding-left for space from divider */
.hero-section .search-number .main-search .number-search {
    flex: 1;
    min-width: 0;
    color: #8c94b0;
    padding: 0 8px 0 16px;
}

/* Find Your Number button — exact .home-section .search-btn values */
.hero-section .search-number .main-search .search-btn {
    flex-shrink: 0;
    white-space: nowrap;
    color: #fff !important;
    border: 2px solid #4260cb !important;
    background-color: #4260cb !important;
    border-radius: 30px;
    min-width: 243px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    padding: 0 24px;
    gap: 8px;
}

.hero-section .search-number .main-search .search-btn img {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}

/* Dropdown component */
.hero-section .search-number .main-search .dropdown-component.input-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.hero-section .search-number .main-search .dropdown-component .dropdown-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 999;
    background: #fff;
    border: 1px solid #e7e7e7 !important;
    border-radius: 17px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
    margin: 0;
}

.hero-section .search-number .main-search .dropdown-component .dropdown-list::-webkit-scrollbar {
    width: 10px;
}
.hero-section .search-number .main-search .dropdown-component .dropdown-list::-webkit-scrollbar-track {
    background: #ddd;
    border-radius: 10px;
}
.hero-section .search-number .main-search .dropdown-component .dropdown-list::-webkit-scrollbar-thumb {
    background: linear-gradient(260deg, #467efe 5.26%, #61cafd 100%);
    border-radius: 50px;
}

.hero-section .search-number .main-search .dropdown-component .dropdown-item {
    padding: 5px 10px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    color: #333;
    border-radius: 6px;
    text-align: left;
}

.hero-section .search-number .main-search .dropdown-component .dropdown-item:hover {
    background: #5897fb;
    color: #fff;
    border-radius: 10px;
}

/* Arrow caret */
.hero-section .search-number .main-search .dropdown-component b {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    border-color: #7e7f87 transparent transparent transparent;
    border-width: 6px 6px 0 6px;
    width: 0;
    height: 0;
    pointer-events: none;
    flex-shrink: 0;
}

/* Close (×) icon */
.hero-section .search-number .main-search .close-icon {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #aaa;
    cursor: pointer;
    z-index: 10;
    user-select: none;
    line-height: 1;
}

.hero-section .search-number .main-search .search-border .close-icon {
    right: 12px;
}

.hero-section .search-number .main-search .close-icon:hover { color: #ff5a5f; }

/* ── Decoration image ── */
@media (min-width: 1500px) { .new-homedec { left: -5%; top: 37%; } }
@media (max-width: 575.98px) { .new-homedec { display: none; } }

/* ════════════════════════════════
   Responsive — mirrors marketplace-number-responsive.css
   ════════════════════════════════ */

@media (max-width: 1199.98px) {
    .hero-section .search-number .main-search { max-width: 760px; }
    .hero-section .search-number .main-search .search-btn { min-width: 210px; font-size: 16px; }
}

@media (max-width: 991.98px) {
    .hero-section .search-number .main-search { max-width: 640px; padding: 16px; gap: 8px; }
    .hero-section .search-number .main-search .state-select2-pere.choos-states { flex: 0 0 160px; width: 160px; height: 60px; }
    .hero-section .search-number .main-search .state-search-pere { height: 60px; }
    .hero-section .search-number .main-search #code_no,
    .hero-section .search-number .main-search #code_no_tf { flex: 0 0 90px; width: 90px; }
    /* Icon-only circular button at tablet */
    .hero-section .search-number .main-search .search-btn {
        min-width: 52px;
        width: 52px;
        height: 52px;
        padding: 0;
        border-radius: 50%;
        font-size: 15px;
    }
    .hero-section .search-number .main-search .search-btn span { display: none; }
    .hero-section .search-number .main-search .form-control { font-size: 15px; }
}

/* Mobile — state row on top, code+input+button on one horizontal row */
@media (max-width: 767.98px) {
    .hero-section .search-number .main-search {
        flex-direction: column;
        border-radius: 12px;
        padding: 12px;
        gap: 8px;
        max-width: 100%;
    }
    /* State: full-width pill */
    .hero-section .search-number .main-search .state-select2-pere.choos-states {
        flex: 1 1 100%;
        width: 100%;
        height: 60px;
    }
    /* Code+input+button: single horizontal gray pill */
    .hero-section .search-number .main-search .state-search-pere {
        flex-direction: row;
        width: 100%;
        height: 60px;
        background: #f7f7f7;
        padding: 0 0 0 16px;
        gap: 0;
        border-radius: 30px;
    }
    .hero-section .search-number .main-search #code_no,
    .hero-section .search-number .main-search #code_no_tf {
        flex: 0 0 115px;
        width: 115px;
        background: transparent;
        padding-right: 8px;
        height: 100%;
        border-radius: 0;
    }
    .hero-section .search-number .main-search .search-border {
        flex: 1;
        min-width: 0;
        height: 100%;
        background: transparent;
        padding: 0;
        border-radius: 0;
    }
    /* Circular icon button in the row */
    .hero-section .search-number .main-search .search-btn {
        min-width: 56px;
        width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 50%;
        margin-top: 0;
        flex-shrink: 0;
    }
    .hero-section .search-number .main-search .search-btn span { display: none; }
}

@media (max-width: 575.98px) {
    .hero-section .search-number .main-search { padding: 10px; gap: 8px; }
    .hero-section .search-number .main-search .form-control,
    .hero-section .search-number .main-search .number-search { font-size: 16px; }

    .hero-section .search-number .main-search .number-search { padding: 0 }

    /* State: full-width pill (already full-width from 767px) */
    .hero-section .search-number .main-search .state-select2-pere.choos-states {
        height: 60px;
    }

    /* Override 767px single-row — split into 3 stacked pills */
    .hero-section .search-number .main-search .state-search-pere {
        flex-direction: column;
        height: auto;
        background: transparent;
        padding: 0;
        gap: 8px;
    }

    /* Code: own full-width pill */
    .hero-section .search-number .main-search #code_no,
    .hero-section .search-number .main-search #code_no_tf {
        flex: unset;
        width: 100%;
        height: 60px;
        background: #f7f7f7;
        border-radius: 30px;
        padding: 0 20px;
    }

    /* Input + button: own full-width pill */
    .hero-section .search-number .main-search .search-border {
        width: 100%;
        height: 60px;
        background: #f7f7f7;
        border-radius: 30px;
        padding: 0 0 0 20px;
    }
    .hero-section .search-number .main-search .search-border::before { content: none; }

    /* Circular button stays icon-only */
    .hero-section .search-number .main-search .search-btn {
        width: 56px;
        height: 56px;
        min-width: 56px;
        border-radius: 50%;
        padding: 0;
    }
}
