/* ============================================================
   /jobs/{type}/{dealer} — dealer profile page, Design 02
   "Hero-Integrated" redesign.
   Adapted from Designs/design_handoff_dealer_v2/.

   Base tokens and .ap-* atoms are duplicated from account.css on
   purpose: only one of the two stylesheets ever loads on a given
   page, so each is self-contained.
   ============================================================ */

:root {
  --primary:        #01579b;
  --primary-hover:  #039be5;
  --primary-tint:   #e1f5fe;
  --ink-1:          rgba(0,0,0,0.87);
  --ink-2:          rgba(0,0,0,0.60);
  --ink-3:          rgba(0,0,0,0.38);
  --ink-4:          rgba(0,0,0,0.26);
  --line:           #e0e0e0;
  --line-2:         #eeeeee;
  --bg-2:           #fafbfc;
  --card:           #ffffff;

  --ok:             #2e7d32;

  --z1: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
  --z2: 0 2px 4px rgba(0,0,0,.06), 0 4px 8px rgba(0,0,0,.06);
}

/* Deliberately no `main { background }` here: the site template leaves main
   transparent, and tinting it paints over the nav bar's box-shadow (main is
   painted after <header>), which makes the header sit differently on this page
   than every other one. Everything below styles page content only. */

.ap-wrap { max-width: 1180px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; color: var(--ink-1); line-height: 1.5; }
.ap-wrap button { font: inherit; cursor: pointer; }
.ap-wrap a { text-decoration: none; }
/* Defensive overrides against Materialize globals */
.ap-wrap h1, .ap-wrap h2, .ap-wrap h3 { line-height: 1.3; }
.ap-wrap h2 { font-size: inherit; font-weight: inherit; margin: 0; }
.ap-wrap .material-icons { line-height: 1; }

/* Buttons */
.ap-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 2px; font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  box-shadow: var(--z1);
}
.ap-btn:hover { background: var(--primary-hover); color: #fff; }
.ap-btn.ghost { background: transparent; color: var(--primary); box-shadow: none; border: 1px solid var(--line); }
.ap-btn.ghost:hover { background: var(--primary-tint); }
.ap-btn.sm { height: 30px; padding: 0 12px; font-size: 11px; }
.ap-btn.lg { height: 44px; padding: 0 24px; font-size: 14px; }
.ap-btn .material-icons { font-size: 16px; }
.ap-btn.lg .material-icons { font-size: 18px; }
.ap-btn[disabled] { opacity: 0.65; pointer-events: none; }

/* Subscribed state — the alert CTA turns into a muted "on" affordance */
.ap-btn.subscribed { background: var(--ok); }
.ap-btn.subscribed:hover { background: #1b5e20; }

/* ---- Breadcrumb ----
   Markup comes from Breadcrumbs::render() and is styled entirely by
   ul.breadcrumb in style.css — no overrides here on purpose, so the bar and its
   default 14px margins match every other page. Two things to avoid:
   - don't zero margin-top: it sets the gap below the nav (43px site-wide);
   - don't wrap it in a <nav>: Materialize's nav rules (red bar, 56px height,
     nav ul li { float: left }) collapse the bar and break the layout after it. */

/* ---- Dealer logo tile ---- */
.dp-logo {
  width: 96px; height: 96px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  letter-spacing: -0.02em;
  overflow: hidden;
  position: relative;
  box-shadow: var(--z1);
  text-align: center;
}
.dp-logo img { width: 100%; height: 100%; object-fit: contain; }
.dp-logo .top { font-size: 28px; line-height: 1; }
.dp-logo.lg { width: 120px; height: 120px; }
.dp-logo.lg .top { font-size: 36px; }

/* ---- Section header ---- */
.dp-sec-h {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 0 14px 0; gap: 12px; flex-wrap: wrap;
}
.dp-sec-h h2 {
  font-size: 18px; font-weight: 700; color: var(--ink-1);
  margin: 0; display: flex; align-items: center; gap: 10px; letter-spacing: -0.01em;
}
.dp-sec-h h2 .count {
  background: var(--primary-tint); color: var(--primary);
  font-size: 12px; font-weight: 700; padding: 2px 9px;
  border-radius: 10px; letter-spacing: 0;
}
.dp-sec-h .link {
  font-size: 13px; color: var(--primary); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.dp-sec-h .link .material-icons { font-size: 14px; }

/* ---- Open job card ---- */
.dp-job {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 16px; align-items: center;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--z1);
  transition: box-shadow .15s, transform .15s;
}
.dp-job:hover { box-shadow: var(--z2); transform: translateY(-1px); }
.dp-job + .dp-job { margin-top: 10px; }
.dp-job .thumb {
  width: 52px; height: 52px; border-radius: 4px;
  background: linear-gradient(135deg, var(--primary-tint), #fff);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  border: 1px solid var(--line);
  overflow: hidden;
}
.dp-job .thumb .material-icons { font-size: 28px; }
.dp-job .thumb img { width: 100%; height: 100%; object-fit: contain; }
.dp-job .title {
  font-size: 15px; font-weight: 600; color: var(--ink-1);
  line-height: 1.3; margin: 0;
}
.dp-job .title a { color: var(--ink-1); }
.dp-job .title a:hover { color: var(--primary); }
.dp-job .meta {
  font-size: 12px; color: var(--ink-2); margin-top: 4px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.dp-job .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }
.dp-job .meta .pay { color: var(--ok); font-weight: 600; }
@media (max-width: 700px) {
  .dp-job { grid-template-columns: 52px 1fr; }
  .dp-job .ap-btn { grid-column: 1 / -1; justify-content: center; }
}

/* ---- Empty state (no open jobs) ---- */
.dp-empty {
  padding: 32px 22px; background: var(--bg-2);
  border: 1px dashed var(--line); border-radius: 8px; text-align: center;
}
.dp-empty .icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary-tint); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.dp-empty .icon .material-icons { font-size: 28px; }
.dp-empty h3 { margin: 0 0 4px 0; font-size: 16px; font-weight: 700; color: var(--ink-1); }
.dp-empty p {
  margin: 0; font-size: 13px; color: var(--ink-2);
  max-width: 420px; margin-left: auto; margin-right: auto;
}

/* ============================================================
   Alert CTA — the centrepiece of this redesign.
   Yellow accent on white so it reads as the primary action.
   ============================================================ */
.dp-alert {
  background: linear-gradient(180deg, #fffdf3 0%, #fff8e1 100%);
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--z1);
  position: relative;
  overflow: hidden;
}
.dp-alert::before {
  content: ""; position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #ffb300 0%, #ffd54f 100%);
}
.dp-alert .bell {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #ffb300 0%, #ffd54f 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255,179,0,0.32);
  margin-bottom: 14px;
}
.dp-alert .bell .material-icons { font-size: 26px; }
.dp-alert h3 { font-size: 17px; font-weight: 700; color: var(--ink-1); margin: 0 0 6px 0; line-height: 1.3; }
.dp-alert p { font-size: 13px; color: var(--ink-2); margin: 0 0 16px 0; line-height: 1.5; }
.dp-alert .ap-btn { width: 100%; justify-content: center; height: 42px; }
.dp-alert .signin { display: block; margin-top: 10px; text-align: center; font-size: 12px; color: var(--ink-2); }
.dp-alert .signin a { color: var(--primary); font-weight: 600; }

/* Inline / banner variant — horizontal */
.dp-alert.inline { display: flex; align-items: center; gap: 18px; padding: 16px 22px; }
.dp-alert.inline .bell { margin-bottom: 0; width: 44px; height: 44px; flex-shrink: 0; }
.dp-alert.inline .bell .material-icons { font-size: 22px; }
.dp-alert.inline .body { flex: 1; min-width: 0; }
.dp-alert.inline h3 { font-size: 15px; margin: 0 0 2px 0; }
.dp-alert.inline p { margin: 0; font-size: 12px; }
.dp-alert.inline .actions { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.dp-alert.inline .ap-btn { width: auto; height: 36px; }
.dp-alert.inline .signin { margin: 0; }
@media (max-width: 800px) {
  .dp-alert.inline { flex-wrap: wrap; }
  .dp-alert.inline .actions { width: 100%; }
  .dp-alert.inline .ap-btn { flex: 1; justify-content: center; }
}

/* ============================================================
   Hero — colored gradient card with the alert CTA pinned right
   ============================================================ */
.v2d-hero {
  background: linear-gradient(135deg, #0e529e 0%, #01579b 60%, #0277bd 100%);
  border-radius: 10px;
  padding: 28px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--z2);
}
.v2d-hero::after {
  content: ""; position: absolute;
  right: -80px; top: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,213,79,0.22) 0%, rgba(255,213,79,0) 70%);
  pointer-events: none;
}
.v2d-hero-grid {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px;
  align-items: center;
  position: relative; z-index: 1;
}
.v2d-hero h1 {
  font-size: 30px; font-weight: 700; letter-spacing: -0.01em;
  margin: 0; line-height: 1.15; color: #fff;
}
.v2d-hero .loc {
  font-size: 14px; margin: 6px 0 0 0; color: rgba(255,255,255,0.85);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.v2d-hero .loc .material-icons { font-size: 17px; }
@media (max-width: 900px) {
  .v2d-hero-grid { grid-template-columns: 96px 1fr; }
  .v2d-hero-alert { grid-column: 1 / -1; width: 100%; }
  .v2d-hero h1 { font-size: 24px; }
}
@media (max-width: 560px) {
  .v2d-hero { padding: 22px 18px; }
  .v2d-hero-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Alert card pinned inside the hero */
.v2d-hero-alert {
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  width: 260px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  position: relative;
}
.v2d-hero-alert .bell {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #ffb300 0%, #ffd54f 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(255,179,0,0.35);
  margin-bottom: 10px;
}
.v2d-hero-alert .bell .material-icons { font-size: 22px; }
.v2d-hero-alert h3 { font-size: 14px; font-weight: 700; color: var(--ink-1); margin: 0 0 4px 0; }
.v2d-hero-alert p { font-size: 12px; color: var(--ink-2); margin: 0 0 12px 0; line-height: 1.4; }
.v2d-hero-alert .ap-btn { width: 100%; justify-content: center; }
.v2d-hero-alert .signin { display: block; margin-top: 8px; text-align: center; font-size: 11px; color: var(--ink-2); }
.v2d-hero-alert .signin a { color: var(--primary); font-weight: 600; }

/* ---- Body ---- */
.v2d-main { margin-top: 24px; display: grid; gap: 24px; }
.v2d-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--z1);
}
.v2d-card .body p {
  font-size: 14px; line-height: 1.7; color: var(--ink-1);
  margin: 0 0 14px 0;
}
.v2d-card .body p:last-child { margin-bottom: 0; }
.v2d-card .body ul { margin: 0 0 14px 0; padding-left: 20px; }
.v2d-card .body ul li { list-style-type: disc; font-size: 14px; line-height: 1.7; }
.v2d-card .body a { color: var(--primary); font-weight: 500; }

/* ---- "More jobs in {state}" 3-up grid ---- */
.v2d-more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .v2d-more-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .v2d-more-grid { grid-template-columns: 1fr; } }

.v2d-more-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--z1);
  display: flex; flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.v2d-more-card:hover { box-shadow: var(--z2); transform: translateY(-1px); }
.v2d-more-card .thumb {
  width: 40px; height: 40px; border-radius: 6px;
  background: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; overflow: hidden; flex-shrink: 0;
}
.v2d-more-card .thumb .material-icons { font-size: 20px; }
.v2d-more-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.v2d-more-card h3 {
  font-size: 14px; font-weight: 600; color: var(--ink-1);
  margin: 0 0 6px 0; line-height: 1.35;
}
.v2d-more-card h3 a { color: var(--ink-1); }
.v2d-more-card h3 a:hover { color: var(--primary); }
.v2d-more-card .dealer { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.v2d-more-card .place {
  font-size: 12px; color: var(--ink-3);
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.v2d-more-card .place .material-icons { font-size: 13px; }
/* margin-top:auto pins the footer to the card bottom so footers line up across
   a row regardless of which optional rows above it rendered. */
.v2d-more-card .foot {
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--line-2);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.v2d-more-card .foot .pay { font-size: 12px; color: var(--ok); font-weight: 600; }
.v2d-more-card .foot .link { font-size: 12px; color: var(--primary); font-weight: 600; }
