/* Home page user path (docs/specs/TZ-2026-10-26-home-ux.md). Loaded last,
   on top of daymilo-sot.css; colors from --dm-* tokens only.
   :root.dm-list-empty is set while the stop list is empty
   (route-list-view.js AddressList_EmptyRefresh, SSR on first paint). */

/* —— 1.1 Brand header first (it used to have order:1 after the SEO shell) —— */
#page-wrapper.daymilo-shell > .daymilo-header.site-header { order: -1; }

/* —— 1.2 Hero: chips + demo link under the SEO intro —— */
.dm-hero-row {
  width: 100%;
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.dm-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dm-hero-chips li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--dm-chip-border);
  border-radius: 999px;
  background: var(--dm-chip-bg);
  color: var(--dm-success-ink);
  font: 500 13px/1 var(--font);
}
.dm-hero-chips li::before {
  content: "\2713";
  font-weight: 700;
}
.dm-hero-row .dm-video-open-row { margin: 0; }
.daymilo-seo.is-collapsed .dm-hero-row { display: none; }

/* —— 1.4 Empty state: Paste is the primary action —— */
html .daymilo-side .daymilo-empty .daymilo-empty-paste {
  display: inline-flex !important;
  height: 40px !important;
  padding: 0 18px !important;
  border: 0 !important;
  background: var(--dm-primary-fill) !important;
  color: #fff !important;
  font-size: 15px !important;
}
html .daymilo-side .daymilo-empty .daymilo-empty-paste:hover {
  background: var(--dm-primary-fill-hover, var(--dm-primary-fill)) !important;
  color: #fff !important;
}
.daymilo-empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
}
.daymilo-empty-add {
  height: 40px !important;
  padding: 0 10px !important;
  border: 0 !important;
  background: none !important;
  color: var(--dm-link) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
.daymilo-empty-add:hover { text-decoration: underline; }
/* The act row (Paste / + Add stop) is for a list that already has stops. */
.dm-list-empty .daymilo-side .daymilo-act { display: none !important; }
/* Optimize stays visible but quiet until there is something to optimize. */
@media (min-width: 768px) {
  .dm-list-empty .daymilo-side #route-optimize-btn {
    height: 36px !important;
    font-size: 13px !important;
  }
}

/* —— 1.3 Start is optional —— */
.daymilo-optional {
  margin-left: 4px;
  font: 400 11px/1 var(--font);
  color: var(--dm-muted);
}

/* —— 1.5 Paste dialog: other ways under the textarea —— */
.bulk-import-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 10px 0 0;
  font: 400 12px/1.3 var(--font);
  color: var(--dm-muted);
}
.bulk-import-more .bulk-import-option.bulk-import-more-way {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  width: auto;
  height: 26px !important;
  padding: 0 8px !important;
  border: 1px solid var(--dm-border) !important;
  border-radius: 999px;
  background: var(--dm-card);
  color: var(--dm-muted) !important;
  font: 500 12px/1 var(--font) !important;
  opacity: 1;
  box-shadow: none !important;
  cursor: pointer;
}
.bulk-import-more .bulk-import-option.bulk-import-more-way[disabled] { cursor: default; opacity: 0.7; }
.bulk-import-more .anticon { font-size: 13px; }
@media (max-width: 575px) {
  /* Three short steps do not fit a phone without breaking words. */
  #popover-bulk-import .bulk-import-steps { display: none; }
}

/* —— 1.6 / 2.1 Header: Share only once there are stops —— */
.dm-list-empty #share-hit { display: none !important; }

@media (max-width: 767px) {
  /* One row: logo · Errands/Courier · Sign in. Trust lives in the hero chips. */
  .daymilo-header.site-header {
    /* One row when it fits; wrap rather than widen the page (360px + Share). */
    flex-wrap: wrap !important;
    gap: 6px 8px !important;
    padding: 8px 12px !important;
  }
  /* Share: icon only on phones, the word stays for screen readers. */
  #share-link-btn.daymilo-header-share {
    width: 36px;
    padding: 0 !important;
    justify-content: center;
  }
  #share-link-btn.daymilo-header-share > span:not(.ant-btn-icon) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .daymilo-header .daymilo-seg-item { padding-left: 10px !important; padding-right: 10px !important; }
  .daymilo-header .daymilo-trust,
  .daymilo-header #dm-auth-routes { display: none !important; }
  .daymilo-header #logo { height: 20px !important; }
  .daymilo-header .dm-auth { margin-left: auto; }

  .daymilo-seo { padding: 10px 16px 12px; }
  .daymilo-seo h1 { font-size: 17px; }
  .dm-hero-chips li { min-height: 26px; font-size: 12px; padding: 0 8px; }

  /* No sticky Optimize bar over an empty list: the empty card carries Paste. */
  .dm-list-empty .daymilo-side .address-list-buttons-wrapper { display: none !important; }
  .dm-list-empty .daymilo-side .route-card .ant-card-body { padding-bottom: 12px !important; }
  .dm-list-empty .daymilo-shell .content-row.daymilo-main > .daymilo-map { padding-bottom: 0 !important; }
  .dm-list-empty .daymilo-shell > .site-footer { margin-bottom: 0 !important; }
}

/* —— 2.3 Sample stops —— */
.daymilo-empty-sample-row {
  margin: 10px 0 0;
  font: 400 12.5px/1.4 var(--font);
  color: var(--dm-muted);
}
.daymilo-empty-sample {
  padding: 0;
  border: 0;
  background: none;
  color: var(--dm-link);
  font: 600 12.5px/1.4 var(--font);
  text-decoration: underline;
  cursor: pointer;
}

/* —— 2.1 Send to driver leads the handoff —— */
.daymilo-handoff .daymilo-send-driver {
  margin: 0 8px 8px 0;
}

/* —— 4.2 How it works: three steps —— */
.dm-steps {
  display: grid;
  gap: 10px;
  margin: 8px 0 14px;
  padding: 0;
  list-style: none;
  counter-reset: dm-step;
}
@media (min-width: 768px) {
  .dm-steps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  /* Phone: number on the left of the text. */
  .dm-steps li { padding-left: 48px; }
  .dm-steps li::before { position: absolute; top: 12px; left: 12px; margin: 0; }
}
.dm-steps li {
  position: relative;
  padding: 12px;
  border: 1px solid var(--dm-border);
  border-radius: 12px;
  background: var(--dm-card);
  counter-increment: dm-step;
}
.dm-steps li::before {
  content: counter(dm-step);
  display: block;
  margin-bottom: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--dm-primary-fill);
  color: #fff;
  font: 700 13px/26px var(--font);
  text-align: center;
}
.dm-steps b {
  display: block;
  margin-bottom: 2px;
  font: 600 15px/1.3 var(--font);
  color: var(--dm-ink);
}
.dm-steps span {
  display: block;
  font: 400 13.5px/1.45 var(--font);
  color: var(--dm-ink-soft);
}
.daymilo-about .dm-video-open-row { margin: 0 0 18px; }

/* —— 4.3 Guides & related tools: two columns on wide screens —— */
@media (min-width: 768px) {
  .daymilo-about .daymilo-related ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 24px;
  }
  .daymilo-about .daymilo-related li + li { margin-top: 0; }
}

/* —— 4.4 FAQ accordion —— */
.dm-faq-item {
  border-bottom: 1px solid var(--dm-border);
}
.dm-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}
.dm-faq-item summary::-webkit-details-marker { display: none; }
.dm-faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  font: 400 22px/1 var(--font);
  color: var(--dm-link);
}
.dm-faq-item[open] summary::after { content: "\2212"; }
.dm-faq-item summary h3 { margin: 0 !important; }
.dm-faq-item p { margin: 0 0 14px !important; }
.dm-faq-item + .tool-cta { margin-top: 20px; }

/* —— 4.6 Footer links —— */
.dm-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  font: 400 13px/1.4 var(--font);
}
.dm-footer-links a { color: var(--dm-link); }
.dm-footer-copy { color: var(--dm-muted); }
.daymilo-handoff .daymilo-send-driver {
  height: 40px !important;
  font: 600 15px/1 var(--font) !important;
}
