/* --- GROWTH GEEKY CUSTOM SEARCH DROPDOWN STYLING --- */

.growthgeeky-search-wrap {
    position: relative !important;
    display: inline-block !important;
    margin-left: 8px !important;
}

@media (max-width: 767px) {
    .growthgeeky-search-wrap {
        margin-left: 6px !important;
    }
}

/* 1. Toggle button container with 48px dimensions to comfortably host the larger 32px SVG icon */
.growthgeeky-search-toggle {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transform: none !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #000000 !important;
    position: relative !important;
    transition: color 0.2s ease !important;
    outline: none !important;
}

.growthgeeky-search-toggle:hover {
    color: #e02424 !important; /* Red hover color matching screenshot */
}

/* Hardened 32px SVG icons as explicitly requested by user */
.growthgeeky-search-toggle svg {
    width: 32px !important;
    height: 32px !important;
    stroke: currentColor !important;
    stroke-width: 1.5 !important; /* Premium thin-profile stroke */
    fill: none !important;
    position: absolute !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
}

/* Active transitions for icons */
.growthgeeky-search-toggle .icon-close {
    opacity: 0 !important;
    transform: rotate(-90deg) scale(0.6) !important;
    color: #b3b3b3 !important; /* Gray close icon matches screenshot */
}

.growthgeeky-search-wrap.search-active .growthgeeky-search-toggle {
    color: #b3b3b3 !important;
}

.growthgeeky-search-wrap.search-active .growthgeeky-search-toggle .icon-search {
    opacity: 0 !important;
    transform: rotate(90deg) scale(0.6) !important;
}

.growthgeeky-search-wrap.search-active .growthgeeky-search-toggle .icon-close {
    opacity: 1 !important;
    transform: rotate(0deg) scale(1) !important;
}

/* 2. Sleek absolute dropdown drawer with sharp square corners */
.growthgeeky-search-dropdown {
    display: none;
    position: absolute !important;
    top: calc(100% + 12px) !important; /* Space for the upward triangle */
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    width: 380px !important;
    height: auto !important;
    background-color: #1c1c1c !important; /* Solid dark charcoal matching screenshot */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    border-radius: 0px !important; /* Hardened sharp square corners matching screenshot */
    padding: 16px 20px !important;
    z-index: 99999 !important;
    overflow: visible !important;
    border: none !important;
    box-sizing: border-box !important;
}

/* Right-angled upward pointing triangle aligned directly under the close X icon */
/* Matches the screenshot exactly: sloped left edge, straight vertical right edge */
.growthgeeky-search-dropdown::before {
    content: '' !important;
    position: absolute !important;
    top: -14px !important; /* Matches height of triangle */
    right: 24px !important; /* Aligned centered under the 48px button */
    width: 0 !important;
    height: 0 !important;
    border-left: 14px solid transparent !important;
    border-right: 0px solid transparent !important;
    border-bottom: 14px solid #1c1c1c !important;
    z-index: 100000 !important;
}

/* Dropdown Slide-In Animation */
.growthgeeky-search-wrap.search-active .growthgeeky-search-dropdown {
    display: block !important;
    animation: growthgeekySearchSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes growthgeekySearchSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 3. Form fields layout */
.growthgeeky-search-form {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Relative coordinate wrapper for the input elements */
.growthgeeky-search-input-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1.5px solid #ffffff !important; /* Solid white line matching screenshot */
    width: 100% !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

.growthgeeky-search-input {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 14px !important;
    padding: 10px 40px 10px 0 !important; /* Padding right accommodates submit button */
    font-family: inherit !important;
    outline: none !important;
    box-sizing: border-box !important;
}

/* Submit search magnifying glass on the right hand side */
.growthgeeky-search-submit {
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s ease !important;
    z-index: 10 !important;
    outline: none !important;
}

.growthgeeky-search-submit:hover {
    transform: scale(1.1) translateY(-50%) !important;
}

.growthgeeky-search-submit svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    stroke-width: 1.5 !important;
    fill: none !important;
}

/* 4. Custom Bold "search" Placeholder Overlay */
.growthgeeky-search-placeholder-overlay {
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    color: #b3b3b3 !important; /* Light gray text matching screenshot */
    font-size: 14px !important;
    font-weight: 400 !important;
    width: calc(100% - 40px) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    user-select: none !important;
    transition: opacity 0.15s ease, transform 0.15s ease !important;
    z-index: 1 !important;
}

.growthgeeky-search-placeholder-overlay strong {
    font-weight: 700 !important;
    color: #ffffff !important; /* Bold white word "search" */
}

/* Overlay transitions on focus and content presence */
.growthgeeky-search-input:focus ~ .growthgeeky-search-placeholder-overlay,
.growthgeeky-search-input:not(:placeholder-shown) ~ .growthgeeky-search-placeholder-overlay {
    opacity: 0 !important;
    transform: translateY(-50%) translateX(4px) !important;
}

/* --- INLINE SEARCH OPTION STYLING --- */

.growthgeeky-inline-search-wrap {
    display: block !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.growthgeeky-inline-search-form {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.growthgeeky-inline-search-input-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 2px solid #000000 !important; /* Solid black underline */
    width: 100% !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

.growthgeeky-inline-search-input {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    color: #000000 !important;
    font-size: 18px !important;
    padding: 12px 35px 8px 0 !important; /* Right padding to accommodate the submit icon */
    font-family: inherit !important;
    outline: none !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

.growthgeeky-inline-search-input:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Submit magnifying glass button on the right */
.growthgeeky-inline-search-submit {
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    color: #000000 !important;
    cursor: pointer !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
    z-index: 10 !important;
    outline: none !important;
    box-shadow: none !important;
}

.growthgeeky-inline-search-submit:hover {
    color: #e02424 !important; /* Subtle red hover matching style guides */
    transform: scale(1.1) translateY(-50%) !important;
}

.growthgeeky-inline-search-submit svg {
    width: 22px !important;
    height: 22px !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    fill: none !important;
}

/* Custom placeholder overlay with bold text capability */
.growthgeeky-inline-search-placeholder-overlay {
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    color: #767676 !important; /* Darker gray placeholder text for light backgrounds */
    font-size: 18px !important;
    font-weight: 400 !important;
    width: calc(100% - 35px) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    user-select: none !important;
    transition: opacity 0.15s ease, transform 0.15s ease !important;
    z-index: 1 !important;
    font-family: inherit !important;
}

.growthgeeky-inline-search-placeholder-overlay strong {
    font-weight: 700 !important;
    color: #000000 !important; /* Bold black text for the search keyword */
}

/* Transition out when user focuses or types */
.growthgeeky-inline-search-input:focus ~ .growthgeeky-inline-search-placeholder-overlay,
.growthgeeky-inline-search-input:not(:placeholder-shown) ~ .growthgeeky-inline-search-placeholder-overlay {
    opacity: 0 !important;
    transform: translateY(-50%) translateX(4px) !important;
}

/* --- SEARCH PAGE FORM STYLING --- */
.herbusiness-search-page-wrap {
    display: block !important;
    position: relative !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 20px 0 !important;
}

.herbusiness-search-page-form {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.herbusiness-search-page-input-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 2px solid #000000 !important; /* Solid black underline */
    width: 100% !important;
    max-width: 790px !important;
    margin: 0 auto !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

.herbusiness-search-page-input {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    color: #000000 !important;
    font-size: 24px !important; /* Large premium size matching Figma */
    font-weight: 500 !important;
    padding: 16px 70px 12px 0 !important; /* Right padding to accommodate both buttons */
    font-family: inherit !important;
    outline: none !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

.herbusiness-search-page-input:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Actions wrapper for submit and clear button */
.herbusiness-search-page-actions {
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    z-index: 10 !important;
}

/* Action button styles */
.herbusiness-search-page-submit,
.herbusiness-search-page-clear {
    background: transparent !important;
    border: none !important;
    color: #000000 !important;
    cursor: pointer !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
}

.herbusiness-search-page-submit:hover,
.herbusiness-search-page-clear:hover {
    color: #e02424 !important; /* Subtle red hover matching branding */
    transform: scale(1.1) !important;
}

.herbusiness-search-page-submit svg,
.herbusiness-search-page-clear svg {
    width: 24px !important;
    height: 24px !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    fill: none !important;
}

.herbusiness-search-page-clear {
    color: #767676 !important; /* Lighter gray for close button */
}

/* Hide close button when input is empty using placeholder-shown selector */
.herbusiness-search-page-input:placeholder-shown ~ .herbusiness-search-page-actions .herbusiness-search-page-clear {
    display: none !important;
}

/* Custom placeholder overlay with bold text capability */
.herbusiness-search-page-placeholder-overlay {
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    color: #767676 !important; /* Gray placeholder text */
    font-size: 24px !important;
    font-weight: 400 !important;
    width: calc(100% - 70px) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    user-select: none !important;
    transition: opacity 0.15s ease, transform 0.15s ease !important;
    z-index: 1 !important;
    font-family: inherit !important;
}

/* Transition out when user focuses or types */
.herbusiness-search-page-input:focus ~ .herbusiness-search-page-placeholder-overlay,
.herbusiness-search-page-input:not(:placeholder-shown) ~ .herbusiness-search-page-placeholder-overlay {
    opacity: 0 !important;
    transform: translateY(-50%) translateX(4px) !important;
}

/* --- SEARCH RESULTS LABEL STYLING --- */
.herbusiness-search-results-label {
    font-family: Nohemi, Nohemi, "Avenir Next", "Century Gothic", "Helvetica Neue", Arial, sans-serif !important;
    font-size: 28px !important; /* Bold, premium size matching screenshot */
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #1f1f1f !important;
    margin: 30px 0 !important;
    letter-spacing: -0.5px !important;
}

@media (max-width: 767px) {
    .herbusiness-search-page-input,
    .herbusiness-search-page-placeholder-overlay {
        font-size: 18px !important;
    }
    
    .herbusiness-search-results-label {
        font-size: 22px !important;
    }

    .herbusiness-search-page-clear {
        display: none !important;
    }
}

