/* ============================================================
   CarZoon — Find My Next Car Homepage Widget
   Redesigned: white card, stacked fields, segmented tabs
   ============================================================ */

.czfc-wrap {
    width: 100%;
    background: #ffffff;
    padding: 40px 24px;
    font-family: inherit;
    border-radius: 16px;
    border: 1px solid #e8edf5;
    box-shadow: 0 4px 24px rgba(15, 39, 68, 0.07);
}

.czfc-inner {
    max-width: 600px;
    margin: 0 auto;
}

/* ── HEADING ── */
.czfc-heading {
    text-align: center;
    margin-bottom: 28px;
}
.czfc-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: #0f2744;
    font-style: normal;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
    line-height: 1.15;
}
.czfc-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* ── TABS ── */
.czfc-tabs {
    display: flex;
    justify-content: stretch;
    gap: 0;
    margin-bottom: 28px;
    background: #f1f5f9;
    border-radius: 14px;
    padding: 5px;
    width: 100%;
    position: relative;
}

.czfc-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: #0F2B46;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 1;
    line-height: 1.2;
}
.czfc-tab:hover {
    color: #0f2744;
    background: rgba(255,255,255,1);
}
.czfc-tab.is-active {
    color: #ffffff !important;
    background: #0f2744 !important;
    box-shadow: 0 2px 6px rgba(15, 39, 68, 0.16);
}

/* ── TAB ICONS ──
   NOTE: mask ke andar wale elements ko kabhi recolor mat karo,
   warna icon faded/blur lagta hai. Isliye .cz-cut / mask > rect
   ko explicitly lock kiya gaya hai. */
.czfc-tab svg { flex-shrink: 0; }

/* "All Cars" tab ke liye dedicated pre-coloured icons —
   currentColor trick is complex multi-path icon par sahi nahi
   dikhti thi (active state me poora white blob ban jata tha).
   Isliye do alag SVG render hote hain aur .is-active se swap hote hain. */
.czfc-tab-icon--active { display: none; }
.czfc-tab.is-active .czfc-tab-icon--default { display: none; }
.czfc-tab.is-active .czfc-tab-icon--active  { display: inline-flex; }

/* detail (window / wheel) ka colour = tab ka background */
.czfc-tab                       { --cz-icon-detail: #f1f5f9; }
.czfc-tab:hover:not(.is-active) { --cz-icon-detail: #ffffff; }
.czfc-tab.is-active             { --cz-icon-detail: #0f2744; }

/* body: currentColor dono states handle kar leta hai
   NOTE: '> svg' (direct child) — is se sirf Dealer/Private Seller tab ke
   icons currentColor lete hain. "All Cars" ke icons ab <span> ke andar
   (nested) hain aur apna khud ka colour rakhte hain, kyunki uski SVG
   khud multi-tone hai — currentColor force karne se detail gum ho jati thi. */
.czfc-tab > svg path,
.czfc-tab > svg rect,
.czfc-tab > svg circle {
    fill: currentColor;
    stroke: none;
}

/* "All Cars" ke andar wali detail cut-lines */
.czfc-tab svg .cz-detail path { fill: var(--cz-icon-detail); }

/* MASK internals — inhe kabhi override na karein */
.czfc-tab svg mask > rect  { fill: #ffffff; }
.czfc-tab svg .cz-cut path { fill: #000000; }

/* ── FORM ── */
.czfc-form {
    background: transparent;
    padding: 0;
}

.czfc-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── FIELD ── */
.czfc-field {}

.czfc-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #0f2744;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 8px;
}
.czfc-field-label svg path { fill: #0f2744; }

/* ── SELECT + INPUT ── */
.czfc-select,
.czfc-input {
    width: 100% !important;
    padding: 14px 18px !important;
    border: 1.5px solid #dde3ee !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 400;
    color: #0f2744;
    background: #ffffff;
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
}
.czfc-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%230f2744' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-color: #ffffff;
    padding-right: 44px;
    cursor: pointer;
    opacity: 1 !important;
    visibility: visible !important;
}
.czfc-select:disabled {
    background-color: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}
.czfc-select:focus,
.czfc-input:focus {
    border-color: #0f2744;
    box-shadow: 0 0 0 3px rgba(15, 39, 68, 0.10);
    background: #fff;
}
.czfc-input::placeholder { color: #94a3b8; }

/* ── SEARCH BUTTON ── */
.czfc-field-btn { margin-top: 4px; }

.czfc-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 28px;
    background: #0f2744;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
    box-shadow: 0 4px 16px rgba(15, 39, 68, 0.22);
    font-family: inherit;
    letter-spacing: 0.1px;
}
.czfc-search-btn:hover {
    background: #1a3d66;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15, 39, 68, 0.28);
}
.czfc-search-btn:active { transform: translateY(0); }

/* ── STATS / BROWSE LINK ── */
.czfc-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.czfc-stat {
    font-size: 14px;
    color: #64748b;
}
.czfc-stat strong {
    color: #0f2744;
    font-weight: 700;
}
.czfc-stat-sep { color: #cbd5e1; }
.czfc-browse-link {
    color: #2f68ff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.czfc-browse-link:hover { color: #1a50d8; text-decoration: underline; }
/* ── TAB ICONS ── */
.czfc-tab svg { flex-shrink: 0; }

/* body currentColor se aata hai; details mask se transparent hain.
   '> svg' direct child — All Cars ke nested icons ko exclude karta hai,
   see note above. */
.czfc-tab > svg path,
.czfc-tab > svg rect,
.czfc-tab > svg circle {
    fill: currentColor;
    stroke: none;
}
/* ── RESPONSIVE ── */
@media (max-width: 540px) {
    .czfc-wrap { padding: 20px 16px; border-radius: 12px; }

    .czfc-heading { margin-bottom: 18px; }
    .czfc-title { font-size: 22px; margin-bottom: 4px; }
    .czfc-subtitle { font-size: 13px; }

    .czfc-tabs { margin-bottom: 18px; padding: 4px; border-radius: 12px; }
    .czfc-tab { padding: 4px 6px; font-size: 12px; gap: 4px; }
    .czfc-tab svg { width: 30px !important; height: 30px !important; }
    .czfc-tab-icon--default svg,
    .czfc-tab-icon--active svg { width: 32px !important; height: 32px !important; }

    .czfc-fields { gap: 12px; }
    .czfc-field-label { font-size: 10px; margin-bottom: 6px; }
    .czfc-select,
    .czfc-input { padding: 11px 14px !important; font-size: 14px !important; }
    .czfc-select { padding-right: 38px !important; }

    .czfc-search-btn { padding: 13px 18px; font-size: 14px; border-radius: 10px; }

    .czfc-stats { margin-top: 14px; gap: 8px; }
    .czfc-stat,
    .czfc-browse-link { font-size: 13px; }
}