/* Store availability (Oscar Care): chips, product availability panel, hire offer, "Choose your store" dialog,
   listing-card extras and cart notes. Loaded only on stores with store availability. Colours follow the brand
   variables set by oscarMaster (--theme-A = primary green). */

:root {
    --oc-green: var(--theme-A, #309C46);
    --oc-green-bg: #e7f2e9;
    --oc-green-line: #c3e6cb;
    --oc-blue: #1f5f8b;
    --oc-blue-bg: #e8f1f8;
    /* "Hire Me": solid deep brand green (white text passes contrast), set apart from the pale "In stock" chip. */
    --oc-hire: #1f7a33;
    --oc-hire-bg: #e6f4e9;
    --oc-hire-line: #cce6d1;
    --oc-grey: #5b6470;
    --oc-grey-bg: #f2f4f6;
    --oc-line: #dfe3e8;
    --oc-text: #212529;
    --oc-radius: 8px;
}

/* ---------- chips ---------- */
.oc-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.oc-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
    font-size: 13px; font-weight: 600; line-height: 1.4; text-decoration: none; border: 1px solid transparent;
    white-space: nowrap;
}
.oc-chip:hover { text-decoration: none; filter: brightness(0.97); }
.oc-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.oc-chip--showroom { background: var(--oc-green-bg); color: #1e7a33; border-color: var(--oc-green-line); }
/* One "In stock" look whether it's in a showroom or only the warehouse: the chip doesn't say where. */
.oc-chip--instock { background: var(--oc-green-bg); color: #1e7a33; border-color: var(--oc-green-line); }
.oc-chip--order { background: var(--oc-grey-bg); color: var(--oc-grey); border-color: var(--oc-line); }
.oc-chip--hire { background: var(--oc-hire); color: #fff; border-color: var(--oc-hire); letter-spacing: .01em; }
a.oc-chip--hire:hover { filter: brightness(1.1); }
.oc-chip--hire svg { flex: none; }

/* ---------- product page: stock tile (above Add to Cart) ---------- */
.oc-avail { margin: 16px 0 12px; color: var(--oc-text); }
.oc-tile {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; margin: 0;
    background: #fff; border: 1.5px solid var(--oc-green); border-radius: 10px; color: var(--oc-text);
    font: inherit; text-align: left; cursor: pointer; transition: background-color .15s ease;
}
.oc-tile:hover { background: #f5fbf6; }
.oc-tile:focus-visible { outline: 3px solid var(--oc-green-line); outline-offset: 2px; }
.oc-tile__icon { flex: none; display: inline-flex; color: var(--oc-green); }
.oc-tile--order .oc-tile__icon { color: var(--oc-grey); }
.oc-ico { display: none; }
.oc-tile--showroom .oc-ico--showroom, .oc-tile--warehouse .oc-ico--warehouse, .oc-tile--order .oc-ico--order { display: block; }
.oc-tile__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.oc-tile__title { font-weight: 700; font-size: 16px; line-height: 1.3; }
.oc-tile__sub { font-size: 14px; line-height: 1.35; color: var(--oc-grey); }
.oc-tile__chev { flex: none; color: var(--oc-text); }

/* ---------- product page: stock side panel (opened from the tile or the chip) ---------- */
.oc-drawer {
    position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; border: 0; border-radius: 0;
    width: min(440px, 100%); max-width: 100%; height: 100%; max-height: 100%;
    background: #fff; color: var(--oc-text); box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18); overflow-y: auto;
}
.oc-drawer[open] { animation: oc-drawer-in .2s ease-out; }
@keyframes oc-drawer-in { from { transform: translateX(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .oc-drawer[open] { animation: none; } }
.oc-drawer::backdrop { background: rgba(15, 23, 30, 0.45); }
.oc-drawer__head {
    position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; background: #fff; border-bottom: 1px solid var(--oc-line);
}
.oc-drawer__title { font-size: 20px; font-weight: 700; margin: 0; }
.oc-drawer__close { background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: var(--oc-grey); padding: 0 4px; }
.oc-drawer__close:hover { color: var(--oc-text); }
.oc-drawer__body { padding: 18px 20px 28px; }
.oc-drawer__product { font-size: 14px; color: var(--oc-grey); margin: 0 0 14px; }
.oc-drawer__sub { font-size: 15px; font-weight: 700; margin: 18px 0 6px; }
.oc-drawer__help { display: inline-block; margin-top: 16px; color: var(--oc-green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.oc-drawer__help:hover { color: #1e7a33; }
.oc-avail__status { display: flex; gap: 12px; align-items: flex-start; }
.oc-avail__icon { width: 14px; height: 14px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--oc-grey); box-shadow: 0 0 0 4px var(--oc-grey-bg); }
.oc-avail__status--showroom .oc-avail__icon { background: var(--oc-green); box-shadow: 0 0 0 4px var(--oc-green-bg); }
.oc-avail__status--warehouse .oc-avail__icon { background: var(--oc-blue); box-shadow: 0 0 0 4px var(--oc-blue-bg); }
.oc-avail__headline { font-size: 17px; font-weight: 700; margin: 0 0 2px; }
.oc-avail__status--showroom .oc-avail__headline { color: #1e7a33; }
.oc-avail__status--warehouse .oc-avail__headline { color: var(--oc-blue); }
.oc-avail__detail { font-size: 14px; margin: 0; color: #3d4650; }
.oc-avail__mystore {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px;
    border-top: 1px solid var(--oc-line); font-size: 14px; color: #3d4650;
}
.oc-avail__mystore svg { color: var(--oc-green); }
.oc-link {
    background: none; border: 0; padding: 0; color: var(--oc-green); font-weight: 600; text-decoration: underline;
    text-underline-offset: 2px; cursor: pointer; font-size: inherit;
}
.oc-link:hover { color: #1e7a33; }
.oc-avail__stores { font-size: 14px; }
.oc-avail__stores[hidden] { display: none; }
.oc-storelist { list-style: none; margin: 8px 0 0; padding: 0; }
.oc-storelist__item {
    display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 7px 0;
    border-bottom: 1px dashed var(--oc-line);
}
.oc-storelist__item:last-child { border-bottom: 0; }
.oc-storelist__name { font-weight: 600; }
.oc-storelist__km { color: var(--oc-grey); font-size: 13px; }
.oc-storelist__state { font-size: 13px; text-align: right; color: var(--oc-grey); }
.oc-storelist__item.is-in .oc-storelist__state { color: #1e7a33; font-weight: 600; }
.oc-avail__note { font-size: 13px; color: var(--oc-grey); margin: 8px 0 0; }
.oc-ways { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; font-size: 14px; color: #3d4650; }
.oc-ways li { display: inline-flex; align-items: center; gap: 6px; }
.oc-ways li[hidden] { display: none; }
.oc-ways .oc-link { text-align: left; }
.oc-ways svg { color: var(--oc-green); flex: none; }

/* ---------- hire offer ---------- */
.oc-hire {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; margin: 8px 0 16px;
    border-radius: var(--oc-radius); background: var(--oc-hire-bg); border: 1px solid var(--oc-hire-line);
}
.oc-hire__headline { font-weight: 700; margin: 0; color: var(--oc-hire); font-size: 16px; }
.oc-hire__detail { margin: 2px 0 0; font-size: 14px; color: #2f4a35; }
.oc-hire__btn {
    flex: none; background: var(--oc-hire); color: #fff; border: 1.5px solid var(--oc-hire); border-radius: 6px;
    padding: 8px 16px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.oc-hire__btn:hover { background: #17612a; border-color: #17612a; color: #fff; text-decoration: none; }

/* ---------- header chip ---------- */
.oc-mystore-chip {
    background: transparent; border: 0; color: inherit; padding: 0 6px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px; font: inherit;
}
.oc-mystore-chip small { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- "Choose your store" dialog ---------- */
.oc-dialog {
    border: 0; border-radius: 12px; padding: 24px; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
    color: var(--oc-text); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.oc-dialog::backdrop { background: rgba(15, 23, 30, 0.45); }
.oc-dialog__close-form { position: absolute; top: 8px; right: 10px; margin: 0; }
.oc-dialog__close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--oc-grey); }
.oc-dialog__title { font-size: 22px; margin: 0 0 4px; }
.oc-dialog__intro { font-size: 14px; color: #3d4650; margin: 0 0 14px; }
.oc-dialog__postcode label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.oc-dialog__row { display: flex; gap: 8px; margin-bottom: 6px; }
.oc-dialog__row input {
    flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #c7ced6; border-radius: 6px; font-size: 16px;
}
.oc-dialog__error { color: #b42318; font-size: 14px; margin: 6px 0 0; }
.oc-btn {
    background: var(--oc-green); color: #fff; border: 1.5px solid var(--oc-green); border-radius: 6px;
    padding: 9px 16px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.oc-btn:hover { filter: brightness(0.95); }
.oc-btn--ghost { background: #fff; color: var(--oc-green); }
.oc-dialog__stores { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--oc-line); }
.oc-dialog__store {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid var(--oc-line);
}
.oc-dialog__store.is-selected { background: linear-gradient(90deg, var(--oc-green-bg), transparent); margin: 0 -8px; padding: 12px 8px; }
.oc-dialog__addr { font-size: 13px; color: var(--oc-grey); margin-top: 2px; }
.oc-dialog__km { font-size: 13px; color: var(--oc-grey); margin-left: 6px; }
.oc-dialog__current { font-size: 13px; font-weight: 700; color: #1e7a33; white-space: nowrap; }
.oc-dialog__forget { margin-top: 12px; font-size: 13px; color: var(--oc-grey); }
.oc-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--oc-grey); background: var(--oc-grey-bg); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }

/* ---------- listing cards ---------- */
.oc-card-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.oc-card-price { font-weight: 700; font-size: 16px; color: var(--oc-text); }
.oc-card-price small { font-weight: 500; color: var(--oc-grey); font-size: 13px; margin-right: 3px; }
.oc-card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.oc-card-chips .oc-chip { font-size: 12px; padding: 2px 8px; }
.oc-filter-group label { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; cursor: pointer; }
.oc-filter-group input[type="checkbox"] { accent-color: var(--oc-green); width: 16px; height: 16px; flex: none; }
.oc-filter-group .oc-filter-count { color: var(--oc-grey); font-size: 12px; margin-left: auto; }
.oc-filter-store { font-size: 13px; color: var(--oc-grey); margin: 8px 0 0; }

/* ---------- cart drawer ---------- */
.oc-cart-avail { font-size: 12px; font-weight: 600; margin-top: 4px; }
.oc-cart-avail::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.oc-cart-avail--showroom { color: #1e7a33; }
.oc-cart-avail--warehouse { color: #1e7a33; }
.oc-cart-avail--order { color: var(--oc-grey); }

@media (max-width: 575px) {
    .oc-hire { flex-direction: column; align-items: flex-start; }
    .oc-storelist__item { grid-template-columns: 1fr auto; }
    .oc-storelist__km { display: none; }
    .oc-dialog { padding: 20px 16px; }
}
