/* Request-a-Quote popup — scoped to .quote-* classes. */

body.quote-open { overflow: hidden; }

.quote-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.quote-modal.is-open { display: flex; }

.quote-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.quote-dialog {
    position: relative;
    width: 100%;
    max-width: 1180px;
    height: calc(100vh - 48px);
    max-height: 880px;
    background: var(--surface, #18181b);
    color: var(--text, #fff);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
html.light .quote-dialog {
    background: #fff;
    color: #18181b;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
}

.quote-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-mid, #a1a1aa);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
html.light .quote-close {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #3a3a3c;
}
.quote-close:hover { color: var(--red, #c41717); }

.quote-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--red, #c41717);
    margin-bottom: 6px;
}

/* ── Catalog (left) ───────────────────────────────────────────────────── */

.quote-catalog {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}
html.light .quote-catalog { border-right-color: rgba(0, 0, 0, 0.08); }

.quote-catalog-head {
    padding: 24px 26px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
html.light .quote-catalog-head { border-bottom-color: rgba(0, 0, 0, 0.06); }

.quote-catalog-head h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0 0 4px;
}
.quote-catalog-head p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-mid, #a1a1aa);
    margin: 0 0 14px;
}

.quote-search-row {
    position: relative;
    margin-bottom: 12px;
}
.quote-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-mid, #a1a1aa);
    pointer-events: none;
}
.quote-search {
    width: 100%;
    padding: 10px 12px 10px 34px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    color: var(--text, #fff);
    font-size: 13.5px;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}
html.light .quote-search {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #18181b;
}
.quote-search:focus {
    outline: none;
    border-color: var(--red, #c41717);
    background: rgba(255, 255, 255, 0.07);
}

.quote-cat-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.quote-cat-pills::-webkit-scrollbar { display: none; }
.quote-catpill {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-mid, #a1a1aa);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
}
html.light .quote-catpill {
    background: rgba(0, 0, 0, 0.04);
    color: #3a3a3c;
}
.quote-catpill:hover { color: var(--text, #fff); }
html.light .quote-catpill:hover { color: #18181b; }
.quote-catpill.is-active {
    background: var(--red, #c41717);
    color: #fff;
    border-color: var(--red, #c41717);
}

.quote-catalog-list {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.quote-loading,
.quote-empty {
    text-align: center;
    color: var(--text-mid, #a1a1aa);
    padding: 30px 12px;
    font-size: 13px;
}

.quote-catalog-group-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim, #71717a);
    padding: 0 6px 6px;
}

.quote-product {
    width: 100%;
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: inherit;
    cursor: pointer;
    text-align: left;
    margin-bottom: 6px;
    transition: background 0.12s, border-color 0.12s;
}
html.light .quote-product { border-color: rgba(0, 0, 0, 0.07); }
.quote-product:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(196, 23, 23, 0.5);
}
html.light .quote-product:hover { background: rgba(0, 0, 0, 0.03); }
.quote-product-thumb {
    width: 56px;
    height: 42px;
    background-color: rgba(255, 255, 255, 0.04);
    background-size: cover;
    background-position: center;
    border-radius: 6px;
}
html.light .quote-product-thumb { background-color: rgba(0, 0, 0, 0.05); }
.quote-product-thumb.is-empty::after {
    content: "—";
    color: var(--text-dim, #71717a);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.quote-product-info { min-width: 0; }
.quote-product-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text, #fff);
    line-height: 1.3;
    margin-bottom: 2px;
}
html.light .quote-product-title { color: #18181b; }
.quote-product-desc {
    font-size: 12px;
    color: var(--text-mid, #a1a1aa);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.quote-product-tag {
    display: inline-block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--red, #c41717);
    padding: 2px 6px;
    background: rgba(196, 23, 23, 0.12);
    border-radius: 4px;
}
.quote-product-add {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(196, 23, 23, 0.14);
    color: var(--red, #c41717);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}
.quote-product:hover .quote-product-add {
    background: var(--red, #c41717);
    color: #fff;
}

/* ── Cart (right) ─────────────────────────────────────────────────────── */

.quote-cart {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: rgba(255, 255, 255, 0.02);
}
html.light .quote-cart { background: rgba(0, 0, 0, 0.02); }

.quote-cart-head {
    padding: 24px 26px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
html.light .quote-cart-head { border-bottom-color: rgba(0, 0, 0, 0.06); }
.quote-cart-head h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.quote-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    background: var(--red, #c41717);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    transition: transform 0.18s;
}
.quote-cart-count.is-flash {
    animation: quote-flash 0.32s ease-out;
}
@keyframes quote-flash {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.quote-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quote-cart-empty {
    text-align: center;
    color: var(--text-mid, #a1a1aa);
    padding: 40px 12px;
    font-size: 13px;
}
.quote-cart-line {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    align-items: center;
}
html.light .quote-cart-line {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}
.quote-cart-thumb {
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.04);
    background-size: cover;
    background-position: center;
    border-radius: 6px;
}
html.light .quote-cart-thumb { background-color: rgba(0, 0, 0, 0.05); }
.quote-cart-line-body { min-width: 0; }
.quote-cart-line-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.quote-cart-line-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-top: 4px;
}
.quote-cart-pick {
    font-size: 11px;
    color: var(--text-mid, #a1a1aa);
}
.quote-cart-pick span { color: var(--text-dim, #71717a); }
.quote-cart-line-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}
.quote-qty {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
}
html.light .quote-qty {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}
.quote-qty button {
    width: 24px;
    height: 28px;
    background: transparent;
    color: var(--text-mid, #a1a1aa);
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
.quote-qty button:hover { color: var(--red, #c41717); }
.quote-qty input {
    width: 32px;
    height: 28px;
    background: transparent;
    border: none;
    color: var(--text, #fff);
    text-align: center;
    font-size: 12.5px;
    font-family: inherit;
    -moz-appearance: textfield;
}
html.light .quote-qty input { color: #18181b; }
.quote-qty input::-webkit-outer-spin-button,
.quote-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quote-cart-remove {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-mid, #a1a1aa);
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
}
.quote-cart-remove:hover {
    color: var(--red, #c41717);
    border-color: rgba(196, 23, 23, 0.4);
}

.quote-cart-foot {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
html.light .quote-cart-foot { border-top-color: rgba(0, 0, 0, 0.06); }
.quote-cart-notes-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-mid, #a1a1aa);
}
.quote-cart-notes {
    width: 100%;
    min-height: 64px;
    resize: vertical;
    padding: 9px 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text, #fff);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
}
html.light .quote-cart-notes {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    color: #18181b;
}
.quote-cart-notes:focus {
    outline: none;
    border-color: var(--red, #c41717);
}
.quote-cart-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.quote-btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.005em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    border: 1px solid transparent;
}
.quote-btn--primary {
    background: var(--red, #c41717);
    color: #fff;
}
.quote-btn--primary:hover { background: var(--red-dark, #9e1010); }
.quote-btn--primary:disabled {
    background: rgba(196, 23, 23, 0.5);
    cursor: progress;
}
.quote-btn--ghost {
    background: transparent;
    color: var(--text-mid, #a1a1aa);
    border-color: rgba(255, 255, 255, 0.12);
}
html.light .quote-btn--ghost { border-color: rgba(0, 0, 0, 0.12); }
.quote-btn--ghost:hover {
    color: var(--text, #fff);
    border-color: rgba(255, 255, 255, 0.24);
}
html.light .quote-btn--ghost:hover { color: #18181b; border-color: rgba(0, 0, 0, 0.24); }

.quote-cart-status {
    font-size: 12px;
    color: var(--text-mid, #a1a1aa);
    min-height: 14px;
}
.quote-cart-status.is-err { color: var(--red, #c41717); }
.quote-cart-status.is-ok  { color: #16a34a; }
.quote-cart-status.is-busy { color: var(--text-mid, #a1a1aa); }

/* ── Spec-picker mini-popup ───────────────────────────────────────────── */

.quote-specpick {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.quote-specpick[hidden] { display: none; }

.quote-specpick-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface, #18181b);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
html.light .quote-specpick-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}
.quote-specpick-head h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0 0 4px;
}
.quote-specpick-head p {
    font-size: 12.5px;
    color: var(--text-mid, #a1a1aa);
    line-height: 1.5;
    margin: 0 0 16px;
}
.quote-specpick-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.quote-specpick-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.quote-specpick-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-mid, #a1a1aa);
}
.quote-specpick-select,
.quote-specpick-qty {
    padding: 9px 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text, #fff);
    font-size: 13px;
    font-family: inherit;
}
html.light .quote-specpick-select,
html.light .quote-specpick-qty {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.12);
    color: #18181b;
}
.quote-specpick-select:focus,
.quote-specpick-qty:focus {
    outline: none;
    border-color: var(--red, #c41717);
}
/* Firefox respects option styling for the dropdown menu; Chrome partially
   respects it on some platforms. Combined with the global color-scheme
   hint in style.css, this covers both engines. */
.quote-specpick-select option {
    background: var(--surface, #18181b);
    color: var(--text, #fff);
}
html.light .quote-specpick-select option {
    background: #fff;
    color: #18181b;
}
.quote-specpick-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 920px) {
    .quote-modal { padding: 0; }
    .quote-dialog {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 360px;
    }
    .quote-catalog { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
    html.light .quote-catalog { border-bottom-color: rgba(0,0,0,0.08); }
}
