/* =============================================================
   HPL My Listings Dashboard
   ============================================================= */

.hpl-dash-wrap {
    width: 100%;
    font-family: inherit;
    color: #222;
}

/* ── Header ─────────────────────────────────────────────────── */
.hpl-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.hpl-dash-title {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hpl-dash-title h2 {
    margin: 0 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #222 !important;
}

.hpl-dash-cap {
    background: #f0f0f0;
    color: #555;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.hpl-dash-cap.hpl-cap-full {
    background: #fdecea;
    color: #8B1A1A;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.hpl-dash-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.hpl-dash-btn--primary {
    background: #8B1A1A;
    color: #fff !important;
    border: none;
}

.hpl-dash-btn--primary:hover {
    background: #a82020;
    color: #fff !important;
}

.hpl-dash-btn--disabled {
    background: #ddd;
    color: #999 !important;
    cursor: not-allowed;
}

/* ── Empty state ─────────────────────────────────────────────── */
.hpl-dash-empty {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 60px 24px;
    text-align: center;
    color: #777;
}

.hpl-dash-empty p {
    margin-bottom: 16px;
    font-size: 15px;
}

/* ── Table ───────────────────────────────────────────────────── */
.hpl-dash-table-wrap {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.hpl-dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hpl-dash-table thead th {
    background: #fafafa;
    color: #555;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

.hpl-dash-table .hpl-col-img      { width: 64px; }
.hpl-dash-table .hpl-col-actions  { width: 100px; }
.hpl-dash-table .hpl-col-price    { width: 90px; }
.hpl-dash-table .hpl-col-status   { width: 80px; }
.hpl-dash-table .hpl-col-featured { width: 110px; }
.hpl-dash-table .hpl-col-date     { width: 100px; }

.hpl-dash-row {
    border-bottom: 1px solid #f3f3f3;
    transition: background 0.1s;
}

.hpl-dash-row:last-child {
    border-bottom: none;
}

.hpl-dash-row:hover {
    background: #fafafa;
}

.hpl-dash-row.hpl-row-removing {
    opacity: 0.4;
    pointer-events: none;
}

.hpl-dash-table td {
    padding: 12px 14px;
    vertical-align: middle;
    color: #333;
}

/* ── Thumbnail ───────────────────────────────────────────────── */
.hpl-dash-thumb {
    width: 52px;
    height: 42px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    border: 1px solid #e0e0e0;
}

/* ── Listing title cell ──────────────────────────────────────── */
.hpl-dash-listing-title {
    font-weight: 600;
    color: #222;
    text-decoration: none;
    display: block;
    line-height: 1.3;
}

.hpl-dash-listing-title:hover {
    color: #8B1A1A;
}

.hpl-dash-vehicle {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 2px;
}

.hpl-dash-contact {
    font-size: 12px;
    color: #aaa;
    font-style: italic;
}

/* ── Status badges ───────────────────────────────────────────── */
.hpl-status-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hpl-status--active  { background: #e6f4ea; color: #1a7f37; }
.hpl-status--sold    { background: #fdecea; color: #8B1A1A; }
.hpl-status--expired { background: #f5f5f5; color: #888; }
.hpl-status--pending { background: #fff8e1; color: #b08700; }

/* ── Row actions ─────────────────────────────────────────────── */
.hpl-dash-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 90px;
}

.hpl-dash-action {
    display: block;
    width: 100%;
    padding: 5px 0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.12s;
    background: none;
    white-space: nowrap;
}

.hpl-dash-action--edit {
    background: #f0f0f0;
    color: #444;
    border-color: #ddd;
}

.hpl-dash-action--edit:hover {
    background: #e4e4e4;
    color: #222;
}

.hpl-dash-action--sold {
    background: #fff;
    color: #8B1A1A;
    border-color: #8B1A1A;
}

.hpl-dash-action--sold:hover {
    background: #8B1A1A;
    color: #fff;
}

.hpl-dash-action--relist {
    background: #fff;
    color: #1a7f37;
    border-color: #1a7f37;
}

.hpl-dash-action--relist:hover {
    background: #1a7f37;
    color: #fff;
}

.hpl-dash-action--feature {
    background: #fff;
    color: #b08700;
    border-color: #b08700;
}

.hpl-dash-action--feature:hover {
    background: #b08700;
    color: #fff;
}

.hpl-dash-featured-on {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #b08700;
}

.hpl-dash-featured-until {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-top: 1px;
}

/* ── Feature modal ───────────────────────────────────────────── */
#hpl-feature-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hpl-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.hpl-modal-box {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 36px 32px 28px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.hpl-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.hpl-modal-close:hover { color: #333; }

.hpl-modal-icon {
    font-size: 40px;
    color: #b08700;
    margin-bottom: 10px;
}

.hpl-modal-box h3 {
    margin: 0 0 10px !important;
    font-size: 18px !important;
    color: #222 !important;
}

.hpl-modal-box p {
    color: #555;
    font-size: 14px;
    margin: 0 0 8px;
}

.hpl-modal-note {
    background: #fffbea;
    border: 1px solid #ffe58f;
    border-radius: 5px;
    padding: 10px 14px !important;
    color: #7a5c00 !important;
    font-size: 13px !important;
    margin-top: 10px !important;
}

.hpl-modal-ok {
    margin-top: 20px;
    background: #8B1A1A;
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.hpl-modal-ok:hover { background: #a82020; }

.hpl-dash-action--delete {
    background: #fff;
    color: #bbb;
    border-color: #ddd;
}

.hpl-dash-action--delete:hover {
    background: #fdecea;
    color: #8B1A1A;
    border-color: #8B1A1A;
}

/* ── Pagination ───────────────────────────────────────────────── */

.hpl-dash-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 0 8px;
    flex-wrap: wrap;
}

.hpl-dash-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s;
}

.hpl-dash-page-btn:hover { background: #f5f5f5; border-color: #bbb; }

.hpl-dash-page-btn--active {
    background: #8B1A1A !important;
    border-color: #8B1A1A !important;
    color: #fff !important;
    pointer-events: none;
}

.hpl-dash-page-ellipsis {
    color: #aaa;
    padding: 0 4px;
    font-size: 13px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .hpl-dash-table .hpl-col-date,
    .hpl-dash-table .hpl-col-img,
    .hpl-dash-table .hpl-col-featured {
        display: none;
    }
}
