/* SEARCH BOX - EXACT IMAGE MATCH REDESIGN */

:root {
    --sb-bg-panel: #ffffff;
    --sb-bg-card: #f3f6f9;
    --sb-border: #e6ebf1;
    --sb-text-main: #06162e;
    --sb-text-label: #5e6d82;
    --sb-blue: var(--primary);
    --sb-red: var(--danger);
    --sb-radius: 8px;
}

.fc-search-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Tabs */
.fc-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
}

.fc-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(22, 42, 77, 0.4);
    color: white;
    border: none;
    border-radius: 4px 4px 0 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.fc-tab img.flaticon {
    width: 20px;
    height: 20px;
    filter: invert(1);
    /* Make white by default */
}

.fc-tab.active img.flaticon {
    filter: none;
    /* Keep original color or use a specific filter if needed */
}

.fc-tab.active {
    background: var(--sb-bg-panel);
    color: var(--sb-red);
}

.fc-tab.active img.flaticon {
    /* If red is needed, we can use a filter or just use a specific icon URL */
    filter: brightness(0) saturate(100%) invert(21%) sepia(85%) border-radius(100%) saturate(6444%) hue-rotate(352deg) brightness(98%) contrast(92%);
}

/* Main Panel */
.fc-search-panel {
    background: var(--sb-bg-panel);
    padding: 24px;
    border-radius: 0 4px 4px 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: visible;
    /* Prevent dropdown clipping */
}

/* ... existing styles ... */

.fc-field-card:has(.dropdown.show) {
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Top Options Row */
.fc-panel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.fc-trip-options {
    display: flex;
    gap: 24px;
}

.fc-radio-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--sb-text-main);
}

.fc-radio-custom input {
    display: none;
}

.radio-dot {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.fc-radio-custom input:checked+.radio-dot {
    border-color: var(--sb-blue);
}

.fc-radio-custom input:checked+.radio-dot::after {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--sb-blue);
    border-radius: 50%;
}

.fc-miles-option {
    display: flex;
    align-items: center;
}

.fc-checkbox-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--sb-text-main);
}

.fc-checkbox-custom input {
    display: none;
}

.checkbox-box {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 3px;
    transition: all 0.2s;
}

.fc-checkbox-custom input:checked+.checkbox-box {
    background: var(--sb-blue);
    border-color: var(--sb-blue);
}

/* Main Fields Main Row */
.fc-panel-main {
    display: grid;
    grid-template-columns: 1fr auto 1fr 1fr 1fr auto;
    gap: 4px;
    align-items: center;
}

.fc-field-card {
    background: var(--sb-bg-card);
    padding: 12px 16px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    cursor: pointer;
    border-radius: 4px;
}

.fc-field-card label {
    font-size: 11px;
    font-weight: 600;
    color: var(--sb-text-label);
    margin-bottom: 4px;
}

.fc-field-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--sb-text-main);
    line-height: 1.2;
}

.fc-field-sub {
    font-size: 12px;
    color: var(--sb-text-label);
    font-weight: 600;
}

/* Swap Circle */
.fc-swap-circle {
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid var(--sb-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 -20px;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.fc-swap-circle img.flaticon {
    width: 16px;
    height: 16px;
}

.fc-swap-circle:hover {
    transform: rotate(180deg);
}

/* Dates & Passengers Special */
.fc-dates {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px;
}

.fc-icon-wrap img.flaticon-l {
    width: 32px;
    height: 32px;
    opacity: 0.6;
}

/* Search Button */
.fc-btn-search-image {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0 24px;
    height: 80px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    font-weight: 600;
}

.fc-btn-search-image:hover {
    filter: brightness(1.1);
}

.fc-btn-search-image img.flaticon-btn {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

/* Footer */
.fc-panel-footer {
    margin-top: 20px;
    border-top: 1px solid var(--sb-border);
    padding-top: 15px;
}

.fc-recent-searches {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recent-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--sb-text-label);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-list {
    display: flex;
    gap: 15px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sb-text-main);
    cursor: pointer;
    transition: color 0.2s;
    background: #ededed;
    padding: 5px;
    border-radius: 4px;
}

.recent-item:hover {
    color: var(--sb-blue);
}

.recent-item img.flaticon-xs {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

/* Dropdown Styles */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 300px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    border: 1px solid var(--sb-border);
    overflow: hidden;
}

.dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.list .item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.list .item:hover {
    background: #f1f5f9;
}

.list .item.selected {
    background: #eff6ff;
    border-left: 3px solid var(--sb-blue);
}

.list .item .title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sb-text-main);
}

.list .item .subtitle {
    font-size: 12px;
    color: var(--sb-text-label);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .fc-panel-main {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .fc-swap-circle {
        display: none;
    }

    .fc-btn-search-image {
        grid-column: span 2;
    }

    .fc-panel-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 640px) {
    .fc-panel-main {
        grid-template-columns: 1fr;
    }

    .fc-btn-search-image {
        grid-column: span 1;
    }

    .fc-tab {
        padding: 10px 15px;
        font-size: 12px;
    }
}