/* ============================================================
   Honda & Acura — Persistent Vehicle Bar
   Sits at the top of every page via wp_body_open
   ============================================================ */

.haymm-bar {
    --bar-bg:      #1a1d20;
    --bar-border:  #2a2f3a;
    --bar-text:    #e4e8f0;
    --bar-muted:   #8a8f9a;
    --bar-acc:     #cc1b1b;
    --bar-acc-lt:  rgba(204,27,27,.12);
    --bar-radius:  6px;
    --bar-font:    system-ui, -apple-system, sans-serif;

    width: 100%;
    background: var(--bar-bg);
    border-bottom: 1px solid var(--bar-border);
    font-family: var(--bar-font);
    font-size: 13px;
    color: var(--bar-text);
    position: relative;
    z-index: 9999;
}

/* ── Active state (vehicle selected) ── */
.haymm-bar__active {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.haymm-bar__car-icon {
    color: var(--bar-acc);
    flex-shrink: 0;
}

.haymm-bar__label {
    font-weight: 600;
    color: var(--bar-text);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.haymm-bar__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.haymm-bar__btn {
    background: none;
    border: 1px solid var(--bar-border);
    color: var(--bar-muted);
    border-radius: var(--bar-radius);
    cursor: pointer;
    font-size: 12px;
    font-family: var(--bar-font);
    padding: 4px 10px;
    transition: all .15s;
    line-height: 1.4;
}

.haymm-bar__btn:hover {
    border-color: var(--bar-acc);
    color: #fff;
}

.haymm-bar__btn--clear {
    font-size: 16px;
    padding: 2px 8px;
    line-height: 1.2;
}

.haymm-bar__btn--clear:hover {
    background: var(--bar-acc);
    border-color: var(--bar-acc);
    color: #fff;
}

.haymm-bar__btn--cancel {
    border-color: transparent;
    color: var(--bar-muted);
}

/* ── Selector state (dropdowns visible) ── */
.haymm-bar__selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.haymm-bar__prompt {
    color: var(--bar-muted);
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.haymm-bar__fields {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
}

/* ── Individual bar fields ── */
.haymm-bar-field {
    position: relative;
    flex: 1;
    min-width: 100px;
    max-width: 160px;
}

.haymm-bar-field--disabled {
    opacity: .45;
    pointer-events: none;
}

.haymm-bar-field--hidden {
    display: none;
}

.haymm-bar-select-wrap {
    position: relative;
}

.haymm-bar-select-wrap select {
    width: 100%;
    appearance: none;
    background: #242830;
    border: 1px solid var(--bar-border);
    border-radius: var(--bar-radius);
    color: var(--bar-text);
    font-size: 12px;
    font-family: var(--bar-font);
    padding: 6px 26px 6px 10px;
    cursor: pointer;
    transition: border-color .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.haymm-bar-select-wrap select:focus {
    outline: none;
    border-color: var(--bar-acc);
}

.haymm-bar-select-wrap select:disabled {
    color: var(--bar-muted);
    cursor: not-allowed;
}

.haymm-bar-select-wrap svg {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    color: var(--bar-muted);
    pointer-events: none;
}

/* ── Set Vehicle button ── */
.haymm-bar__set-btn {
    background: var(--bar-acc);
    color: #fff;
    border: none;
    border-radius: var(--bar-radius);
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--bar-font);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.haymm-bar__set-btn:hover:not(:disabled) {
    background: #a31515;
}

.haymm-bar__set-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ── Screen reader only ── */
.haymm-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Responsive ── */
@media ( max-width: 600px ) {
    .haymm-bar__selector { padding: 8px 12px; }
    .haymm-bar__active   { padding: 8px 12px; }
    .haymm-bar-field     { min-width: 80px; max-width: 120px; }
    .haymm-bar__prompt   { display: none; }
}

/* ── Auto-select prefill notice (product pages) ── */
.haymm-prefill-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f7ff;
    border: 1px solid #b6d4fe;
    border-radius: 6px;
    padding: 9px 14px;
    font-size: 13px;
    color: #1e40af;
    margin-bottom: 16px;
}

.haymm-prefill-notice strong {
    color: #1e3a8a;
}

.haymm-prefill-dismiss {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.haymm-prefill-dismiss:hover {
    color: #1e40af;
}
