/* =====================================================
   JB SMART SEARCH — Styles
   Matches Figma design exactly
   ===================================================== */

/* ---- Wrapper ---- */
.jb-search-wrapper {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    z-index: 9999;
}

/* ---- Search Bar Row ---- */
.jb-search-bar {
    display: flex;
    align-items: stretch;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.jb-search-wrapper.is-focused .jb-search-bar {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Input */
.jb-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    caret-color: #ffffff;
    min-width: 225px;
}

.jb-search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-style: normal;
}

.jb-search-input:focus {
    outline: none;
    box-shadow: none;
}

/* Divider between input and button */
.jb-search-bar::before {
    display: none; /* handled via border on button */
}

/* Button */
.jb-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.18s ease, background-color 0.18s ease;
    letter-spacing: 0.01em;
}

.jb-search-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
}

.jb-search-icon {
    flex-shrink: 0;
    opacity: 0.8;
}

/* =====================================================
   DROPDOWN PANEL
   ===================================================== */
.jb-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: -118px;
	display: flex;
	width: 453px;
	padding: 24px;
	flex-direction: column;
	align-items: flex-start;
	gap: 40px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    z-index: 99999;
    animation: jbDropIn 0.18s ease forwards;
	border-radius: 8px;
	background: var(--Fill-Color-White-10, rgba(255, 255, 255, 0.10));
	backdrop-filter: blur(38px);	
}

.jb-search-dropdown[hidden] {
    display: none !important;
}

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

/* ---- Section label ---- */
..jb-recent-section .jb-section-label {
color: var(--Text-Color-White, #FFF);
font-family: var(--Body-Family, Avenir);
font-size: var(--Body-B4, 16px);
font-style: normal;
font-weight: 350;
line-height: var(--Body-Line-height-4, 24px); /* 150% */
letter-spacing: var(--Body-Lettter-spacing, 0.2px);
}
.jb-search-results .jb-section-label {
color: var(--Text-Color-White-40, rgba(255, 255, 255, 0.40));
font-family: var(--Body-Family, Avenir);
font-size: var(--Body-B4, 16px);
font-style: normal;
font-weight: 350;
line-height: var(--Body-Line-height-4, 24px); /* 150% */
letter-spacing: var(--Body-Lettter-spacing, 0.2px);
}
.jb-search-results li {
    padding: 10px 0px 0px 0px;
}
/* =====================================================
   RECENT SEARCHES SECTION
   ===================================================== */
.jb-recent-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.jb-recent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0 16px;
}
button.jb-tag-remove {
    width: 16px;
    height: 16px;
    font-size: 28px;
    background: transparent;
}
/* Individual recent tag */
.jb-recent-tag {
    display: inline-flex;
	padding: 8px;
	justify-content: center;
	align-items: center;
	gap: 8px;
	border-radius: 6px;
	background: var(--Fill-Color-Dark-Pink-08, rgba(201, 52, 136, 0.08));
	text-align: center;
	font-family: var(--button-nav-links-family, Avenir);
	font-size: var(--button-nav-links-l-5, 16px);
	font-style: normal;
	font-weight: 350;
	line-height: var(--button-nav-links-line-height-5, 24px); /* 150% */
	letter-spacing: var(--button-nav-links-lettter-spacing, 0.2px);	
    cursor: pointer;
    transition: opacity 0.15s ease;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.jb-recent-tag:hover {
    opacity: 0.82;
    color: #ffffff;
    text-decoration: none;
}

/* Default tag color (non-service / white text bg) */
.jb-recent-tag.jb-tag-default {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* Tag remove button (×) */
.jb-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border: none;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    color: inherit;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
    padding: 0;
}

.jb-tag-remove:hover {
    background: rgba(0,0,0,0.4);
}

/* =====================================================
   SEARCH RESULTS — CPT SECTIONS
   ===================================================== */
.jb-cpt-section {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.jb-cpt-section:first-child {
    border-top: none;
}

.jb-cpt-items {
    list-style: none;
    margin: 0;
    padding: 0 0 8px;
}

.jb-result-item {
    display: block;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: background-color 0.15s ease;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
div#jb-search-results {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.jb-result-item:hover,
.jb-result-item.is-active {
    background-color: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    text-decoration: none;
}

/* Highlighted matching text */
.jb-result-item .jb-highlight {
    font-weight: 700;
    color: #ffffff;
}

/* ---- Services section items (slightly different style) ---- */
.jb-cpt-section[data-cpt="service"] .jb-result-item,
.jb-cpt-section[data-cpt="services"] .jb-result-item {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    margin: 2px 10px;
    padding: 8px 12px;
}

.jb-cpt-section[data-cpt="service"] .jb-result-item:hover,
.jb-cpt-section[data-cpt="services"] .jb-result-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* =====================================================
   LOADING + EMPTY STATES
   ===================================================== */
.jb-search-loading {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.jb-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: rgba(255,255,255,0.7);
    border-radius: 50%;
    animation: jbSpin 0.7s linear infinite;
    display: inline-block;
}

@keyframes jbSpin {
    to { transform: rotate(360deg); }
}

.jb-search-empty {
    padding: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* =====================================================
   CLOSE OVERLAY (click outside to close)
   ===================================================== */
.jb-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: transparent;
	display:none;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 600px) {
    .jb-search-wrapper {
        max-width: 100%;
    }
    .jb-search-dropdown {
        min-width: 280px;
        width: calc(100vw - 32px);
        left: 50%;
        transform: translateX(-50%);
    }
    .jb-search-btn span.jb-btn-text {
        display: none; /* sirf icon dikhao mobile pe */
    }
	#jb-search-input{
		display:none;
	}
	.jb-search-btn{
		width: 40px;
		height: 40px;
		text-align: center;
		padding: 12px;
		gap: 20px;
		border: 1px solid #fff;
		color: #fff;
	}
}
