/* ============================================================
   Distributor Lookup — styles
   ============================================================ */

.dist-lookup {
    font-family: inherit;
    max-width: 100%;
}

/* Search row ------------------------------------------------ */

.dist-lookup__search-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.dist-lookup__search-row select,
.dist-lookup__search-row input[type="search"] {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.dist-lookup__search-row select {
    flex: 0 0 140px;
}

.dist-lookup__search-row input[type="search"] {
    flex: 1 1 280px;
    min-width: 200px;
}

.dist-lookup__search-row button {
    padding: 8px 20px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.dist-lookup__search-row button:hover {
    background: #333;
}

/* Status / count ------------------------------------------- */

#dist-lookup-status {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    min-height: 20px;
}

.dist-lookup__count {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

/* Errors --------------------------------------------------- */

.dist-lookup__errors {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 12px;
}

.dist-lookup__errors ul {
    margin: 6px 0 0 16px;
    padding: 0;
}

/* Table ---------------------------------------------------- */

.dist-lookup__table-wrap {
    width: 100%;
}

.dist-lookup__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed; /* keeps columns from blowing out the width */
}

.dist-lookup__table th,
.dist-lookup__table td {
    padding: 7px 8px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dist-lookup__table th {
    background: #f5f5f5;
    font-weight: 600;
}

.dist-lookup__table tbody tr:hover {
    background: #fafafa;
}

/* Column widths — description flexes, everything else is tight */
.dist-lookup__table .col-dist  { width: 14%; }
.dist-lookup__table .col-sku   { width: 12%; white-space: nowrap; }
.dist-lookup__table .col-desc  { width: auto; white-space: normal; } /* wraps */
.dist-lookup__table .col-price { width: 8%;  text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dist-lookup__table .col-num   { width: 6%;  text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Status badges -------------------------------------------- */

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status--in-stock    { background: #e8f5e9; color: #2e7d32; }
.status--low-stock   { background: #fff3e0; color: #e65100; }
.status--out         { background: #fce4ec; color: #c62828; }
.status--discontinued { background: #f3e5f5; color: #6a1b9a; }
.status--not-carried { background: #eceff1; color: #607d8b; }
.status--unavailable { background: #fff8e1; color: #f57f17; }

/* "Does not carry" / unavailable rows — muted */
.dist-row--none td { color: #90a4ae; }
.dist-row--none .col-dist { color: #455a64; font-weight: 600; }
.dist-row--none .dist-msg { font-style: italic; }

/* Open-at-distributor link ---------------------------------- */

.dist-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}

.dist-open:hover {
    background: #333;
    color: #fff;
}

.dist-open--none {
    background: transparent;
    color: #bbb;
    padding: 4px 10px;
    cursor: default;
}

/* Search-at-distributor link (used on not-carried rows) — outlined, not solid */
.dist-open--search {
    background: #fff;
    color: #1565c0;
    border: 1px solid #1565c0;
}
.dist-open--search:hover {
    background: #1565c0;
    color: #fff;
}

.dist-open__key {
    display: inline-block;
    padding: 1px 5px;
    background: rgba( 255, 255, 255, 0.18 );
    border-radius: 3px;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.dist-hint {
    color: #888;
    font-size: 12px;
}

/* TX Arms quoted price box -------------------------------------------------- */

.dist-quote {
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
    background: #fafafa;
    max-width: 460px;
}

.dist-quote__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.dist-quote__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
}

.dist-quote__type {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    background: #e3f2fd;
    color: #1565c0;
}

.dist-quote__type--unknown {
    background: #fff3e0;
    color: #e65100;
}

.dist-quote__main {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.dist-quote__price {
    font-size: 34px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.dist-quote__flag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 4px;
    background: #fce4ec;
    color: #c62828;
}

.dist-quote__alt {
    margin-top: 4px;
    font-size: 13px;
    color: #555;
}

.dist-quote__basis {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.dist-quote__warn {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #c62828;
}

.dist-quote__lowstock {
    color: #e65100;
    font-weight: 600;
}

.dist-quote__secondary {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ccc;
    font-size: 13px;
    color: #2e7d32;
}
