/* ─── CarSell — Ownership Trail / Vehicle History ────────────────────────── */

/* ── Lookup shortcode ────────────────────────────────────────────────────── */

.csot-lookup-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    max-width: 640px;
}

.csot-lookup-form {
    margin-bottom: 20px;
}

.csot-lookup-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.csot-lookup-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #1d2327;
    background: #fff;
}
.csot-lookup-input:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}

.csot-lookup-btn {
    padding: 10px 20px;
    background: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.csot-lookup-btn:hover { background: #1e40af; }

.csot-empty {
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #475569;
}

/* ── Trail block ─────────────────────────────────────────────────────────── */

.csot-trail {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #1d2327;
    margin-top: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.csot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1e293b;
    color: #fff;
}

.csot-key-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Timeline list ───────────────────────────────────────────────────────── */

.csot-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
}

.csot-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}
.csot-item:last-of-type { border-bottom: none; }

/* Vertical line connecting events */
.csot-list li:not(:last-of-type) .csot-icon::after {
    content: '';
    position: absolute;
    left: 27px;
    top: 44px;
    bottom: -14px;
    width: 2px;
    background: #e2e8f0;
}

.csot-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Event colour accents */
.csot-event-sold    .csot-icon { background: #dcfce7; }
.csot-event-inspected .csot-icon { background: #dbeafe; }
.csot-event-delisted  .csot-icon { background: #fee2e2; }
.csot-event-noted     .csot-icon { background: #fef9c3; }

.csot-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.csot-label {
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
}

.csot-date {
    font-size: 12px;
    color: #94a3b8;
}

.csot-note {
    margin: 4px 0 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

/* ── Add note form ───────────────────────────────────────────────────────── */

.csot-note-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.csot-note-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    color: #1d2327;
    resize: vertical;
    box-sizing: border-box;
}
.csot-note-input:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}

.csot-note-btn {
    align-self: flex-start;
    padding: 7px 16px;
    background: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.csot-note-btn:hover    { background: #1e40af; }
.csot-note-btn:disabled { opacity: .6; cursor: not-allowed; }

.csot-note-msg {
    font-size: 13px;
    color: #15803d;
    font-weight: 500;
}
.csot-note-msg.csot-error { color: #991b1b; }
