/* =============================================================
   HPL Dealer Dashboard
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; }

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

/* ── Onboarding banner ────────────────────────────────────── */

.hpl-dd-onboarding {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.hpl-dd-onboarding-inner {
    font-size: .95rem;
    color: #1c1917;
    line-height: 1.65;
}

.hpl-dd-onboarding-inner h1,
.hpl-dd-onboarding-inner h2,
.hpl-dd-onboarding-inner h3,
.hpl-dd-onboarding-inner h4 {
    margin-top: 0;
    color: #1c1917;
}

.hpl-dd-onboarding-inner p:last-child,
.hpl-dd-onboarding-inner ul:last-child,
.hpl-dd-onboarding-inner ol:last-child {
    margin-bottom: 0;
}

.hpl-dd-onboarding-inner a {
    color: #8B0000;
    font-weight: 600;
}

.hpl-dd-onboarding-inner ul,
.hpl-dd-onboarding-inner ol {
    padding-left: 20px;
}

/* ── Header ───────────────────────────────────────────────── */

.hpl-dd-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
}

.hpl-dd-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 0 4px !important;
    color: #111 !important;
}

.hpl-dd-view-profile {
    font-size: 13px;
    color: #8B1A1A;
    text-decoration: none;
}

.hpl-dd-view-profile:hover { text-decoration: underline; }

/* ── Section ──────────────────────────────────────────────── */

.hpl-dd-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
}

.hpl-dd-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.hpl-dd-section-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 0 16px !important;
    color: #222 !important;
}

.hpl-dd-section-header .hpl-dd-section-title { margin-bottom: 0 !important; }

.hpl-dd-hint {
    font-size: 12px !important;
    color: #999 !important;
    margin: 0 0 16px !important;
}

/* ── Messages ─────────────────────────────────────────────── */

.hpl-dd-msg {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    border-left: 4px solid;
}

.hpl-dd-msg--success { background: #f0fdf4; border-color: #22c55e; color: #166534; }
.hpl-dd-msg--error   { background: #fef2f2; border-color: #ef4444; color: #991b1b; }

/* ── Logo upload row ──────────────────────────────────────── */

.hpl-dd-logo-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.hpl-dd-logo-wrap {
    width: 90px;
    height: 90px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f8f8;
    flex-shrink: 0;
}

.hpl-dd-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hpl-dd-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #bbb;
    text-align: center;
}

.hpl-dd-logo-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

/* ── Form grid ────────────────────────────────────────────── */

.hpl-dd-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.hpl-dd-field { display: flex; flex-direction: column; gap: 5px; }
.hpl-dd-field--full { grid-column: 1 / -1; }

.hpl-dd-field label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #444 !important;
    margin: 0 !important;
}

.hpl-dd-field input,
.hpl-dd-field select,
.hpl-dd-field textarea {
    border: 1px solid #d0d0d0 !important;
    border-radius: 6px !important;
    padding: 9px 12px !important;
    font-size: 14px !important;
    color: #222 !important;
    background: #fff !important;
    outline: none !important;
    width: 100% !important;
    font-family: inherit !important;
    transition: border-color 0.15s !important;
    box-shadow: none !important;
}

.hpl-dd-field input:focus,
.hpl-dd-field textarea:focus { border-color: #8B1A1A !important; }

.hpl-dd-field textarea { resize: vertical; min-height: 90px; }

/* ── Buttons ──────────────────────────────────────────────── */

.hpl-dd-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s, opacity 0.15s;
}

.hpl-dd-btn--primary  { background: #8B1A1A; color: #fff; }
.hpl-dd-btn--primary:hover { background: #a82020; color: #fff; }
.hpl-dd-btn--secondary { background: #f0f0f0; color: #333; border: 1px solid #d0d0d0; }
.hpl-dd-btn--secondary:hover { background: #e4e4e4; }
.hpl-dd-btn--ghost   { background: transparent; color: #888; border: 1px solid #d0d0d0; }
.hpl-dd-btn--ghost:hover { background: #f8f8f8; }
.hpl-dd-btn--danger  { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.hpl-dd-btn--danger:hover { background: #fee2e2; }
.hpl-dd-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Location list ────────────────────────────────────────── */

.hpl-dd-empty-locs { color: #bbb; font-size: 14px; margin: 0 0 16px; }

.hpl-dd-loc-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e8e8e8;
    border-radius: 7px;
    margin-bottom: 10px;
    background: #fafafa;
}

.hpl-dd-loc-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: #555;
}

.hpl-dd-loc-info strong { font-size: 14px; color: #222; }

.hpl-dd-loc-geocoded { font-size: 11px; color: #22c55e; }
.hpl-dd-loc-pending  { font-size: 11px; color: #f59e0b; }

.hpl-dd-loc-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.hpl-dd-action {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #444;
    font-weight: 600;
    transition: background 0.12s;
}

.hpl-dd-action:hover { background: #f0f0f0; }

.hpl-dd-action--delete {
    border-color: #fca5a5;
    color: #b91c1c;
    background: #fef2f2;
}

.hpl-dd-action--delete:hover { background: #fee2e2; }

/* ── Location form ────────────────────────────────────────── */

.hpl-dd-loc-form {
    border: 1px solid #8B1A1A;
    border-radius: 8px;
    padding: 20px;
    margin-top: 14px;
    background: #fff;
}

.hpl-dd-loc-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

@media (max-width: 600px) {
    .hpl-dd-form-grid { grid-template-columns: 1fr; }
    .hpl-dd-logo-row  { flex-direction: column; align-items: flex-start; }
}
