/* Ontario Driver — Buying Score v2.0.0 */

/* ── Score badge (listing cards) ────────────────────────────────────────── */
.od-score-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
/* The circle part */
.od-score-badge .od-b-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.28);
    line-height: 1.1;
}
.od-b-num   { font-size: 18px; font-weight: 700; }
.od-b-lbl   { font-size: 9px; opacity: .8; }
/* Deal label sits below circle as a pill */
.od-b-deal  {
    margin-top: 4px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.od-b-nocf  {
    margin-top: 3px;
    font-size: 8px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,.55);
    color: #fff;
    white-space: nowrap;
}

.od-badge-pending { background: #8A9BB0; }
.od-b-circle.od-badge-green  { background: #187A4A; }
.od-b-circle.od-badge-blue   { background: #154E8F; }
.od-b-circle.od-badge-amber  { background: #8B5500; }
.od-b-circle.od-badge-red    { background: #B03020; }
.od-b-circle.od-badge-pending{ background: #8A9BB0; }
.od-badge-green   { background: #187A4A; }
.od-badge-blue    { background: #154E8F; }
.od-badge-amber   { background: #8B5500; }
.od-badge-red     { background: #B03020; }

/* Card container must be relative */
.adt-car-box, .sb-ad-box, .car-listing-box,
.ad-listing-item, .adforest-car-box { position: relative !important; }

/* ── Score panel (single listing) ───────────────────────────────────────── */
#od-score-panel {
    background: #fff;
    border: 1px solid #DDE6EF;
    border-radius: 12px;
    padding: 22px 24px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}
.od-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.od-panel-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0D1B2A !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
.od-partial-tag {
    font-size: 11px;
    background: #FEF2DC;
    color: #8B5500;
    border: 1px solid #F5D8A0;
    border-radius: 5px;
    padding: 3px 9px;
    font-weight: 600;
}
.od-panel-body {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Gauge */
.od-gauge-wrap {
    flex-shrink: 0;
    width: 130px;
    text-align: center;
}
.od-gauge { width: 130px; height: 78px; display: block; }
.od-gauge-fill { transition: stroke-dasharray .6s ease; }
.od-fill-green  { stroke: #187A4A; }
.od-fill-blue   { stroke: #154E8F; }
.od-fill-amber  { stroke: #C07010; }
.od-fill-red    { stroke: #B03020; }
.od-gauge-score { margin-top: -4px; line-height: 1; }
.od-gauge-num   { font-size: 38px; font-weight: 700; color: #0D1B2A; }
.od-gauge-den   { font-size: 13px; color: #9AA8B6; }
.od-deal-pill {
    display: inline-block;
    margin-top: 7px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 11px;
    border-radius: 5px;
}
.od-pill-green { background: #E4F5EC; color: #187A4A; border: 1px solid #C8E6D4; }
.od-pill-blue  { background: #E4EEF9; color: #154E8F; border: 1px solid #B5CEEC; }
.od-pill-amber { background: #FEF2DC; color: #8B5500; border: 1px solid #F5D8A0; }
.od-pill-red   { background: #FFEBEE; color: #B03020; border: 1px solid #FFCDD2; }

/* Right pane */
.od-panel-right { flex: 1; min-width: 220px; }
.od-summary     { font-size: 13px; color: #3C4D5E; line-height: 1.55; margin: 0 0 14px; }

/* Factors */
.od-factors { display: flex; flex-direction: column; gap: 5px; }
.od-factor {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 7px;
    border: 1px solid #E8EDF2;
    font-size: 12px;
}
.od-f-pos { background: #F0FAF4; border-color: #C8E6D4; }
.od-f-neg { background: #FFF2F2; border-color: #F9C8C8; }
.od-f-neu { background: #F8FAFC; }
.od-f-label  { font-weight: 600; color: #1A2B3C; flex: 0 0 150px; }
.od-f-detail { flex: 1; color: #5A6A7A; }
.od-f-pts    { font-weight: 700; min-width: 36px; text-align: right; }
.od-f-pos .od-f-pts { color: #187A4A; }
.od-f-neg .od-f-pts { color: #B03020; }

/* Flags */
.od-flags {
    margin-top: 12px;
    background: #FFF8E6;
    border: 1px solid #F5D8A0;
    border-radius: 7px;
    padding: 9px 13px;
    font-size: 12px;
    color: #6B4400;
}
.od-flags ul { margin: 5px 0 0 16px; padding: 0; }
.od-flags li { margin-bottom: 3px; }

/* CARFAX upload */
.od-upload-wrap {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #E8EDF2;
}
.od-upload-label {
    font-size: 13px;
    color: #3C4D5E;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.od-cf-check { color: #187A4A; font-weight: 600; }
#od-replace-btn {
    font-size: 11px;
    color: #154E8F;
    background: none;
    border: 1px solid #B5CEEC;
    border-radius: 5px;
    padding: 3px 9px;
    cursor: pointer;
}
#od-drop-zone {
    border: 2px dashed #B5CEEC;
    border-radius: 9px;
    padding: 18px;
    text-align: center;
    background: #F3F8FF;
    transition: border-color .15s, background .15s;
}
#od-drop-zone:hover, #od-drop-zone.od-drag-over {
    border-color: #1976D2;
    background: #EAF2FF;
}
#od-drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: #4A6A8A;
    font-size: 13px;
}
#od-drop-inner svg { color: #1976D2; }
#od-drop-inner em  { font-style: normal; color: #8A9BB0; font-size: 12px; }

#od-upload-progress { padding: 10px 0 4px; }
#od-progress-bar {
    height: 4px;
    background: #1976D2;
    border-radius: 2px;
    width: 0%;
    transition: width .3s;
}
#od-progress-text {
    display: block;
    font-size: 12px;
    color: #4A6A8A;
    margin-top: 6px;
}

/* Misc */
.od-pending {
    text-align: center;
    color: #8A9BB0;
    font-size: 13px;
    padding: 14px 0;
}
.od-disclaimer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #E8EDF2;
    font-size: 11px;
    color: #9AA8B6;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .od-panel-body  { flex-direction: column; }
    .od-gauge-wrap  { width: 100%; }
    .od-factor      { flex-wrap: wrap; }
    .od-f-label     { flex: 0 0 100%; margin-bottom: 2px; }
}

/* ── CARFAX field update confirmation box ─────────────────────────────────── */
.od-fields-updated {
    background: #F0FAF4;
    border: 1px solid #C8E6D4;
    border-left: 4px solid #187A4A;
    border-radius: 9px;
    padding: 16px 20px;
    margin: 0 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
}
.od-fields-updated strong {
    display: block;
    color: #187A4A;
    font-size: 14px;
    margin-bottom: 6px;
}
.od-fields-updated p {
    color: #3C4D3E;
    margin: 0 0 10px;
    font-size: 12px;
}
.od-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #D4EBD9;
    font-size: 13px;
}
.od-field-row:last-of-type { border-bottom: none; }
.od-field-icon { font-size: 14px; width: 20px; flex-shrink: 0; }
.od-field-name { font-weight: 600; color: #1A2B1C; flex: 0 0 160px; }
.od-field-val  { color: #2E7D32; font-weight: 600; }
.od-fields-note {
    margin: 10px 0 0 !important;
    color: #5A7A5C !important;
    font-style: italic;
}
