:root {
      --navy: #173b68;
      --navy-dark: #102f56;
      --link: #005a87;
      --text: #2e2929;
      --muted: #606060;
      --panel: #f1f2f3;
      --border: #d7d7d7;
      --red: #e41e2b;
      --green: #76b77d;
      --yellow: #f4b400;
      --grey: #7b8791;
    }

    * { box-sizing: border-box; }

    html, body {
      margin: 0;
      padding: 0;
      background: transparent;
      color: var(--text);
      font-family: Arial, Helvetica, sans-serif;
    }

    button, input { font: inherit; }

    .app {
      width: 100%;
      max-width: 980px;
      margin: 0 auto;
      padding: 12px;
    }

    .search-panel {
      padding: 22px 20px 28px;
      border-radius: 7px;
      background: var(--panel);
    }

    .search-label {
      display: block;
      margin-bottom: 16px;
      font-weight: 700;
    }

    .search-wrap { position: relative; }

    .search-row {
      display: flex;
      width: 100%;
    }

    #addressInput {
      flex: 1;
      min-width: 0;
      height: 50px;
      padding: 0 50px 0 14px;
      border: 1px solid #b8b8b8;
      border-right: 0;
      border-radius: 4px 0 0 4px;
      background: #fff;
      outline: none;
    }

    #addressInput:focus {
      border-color: var(--navy);
      box-shadow: inset 0 0 0 1px var(--navy);
    }

    #clearButton {
      position: absolute;
      top: 12px;
      right: 121px;
      width: 26px;
      height: 26px;
      padding: 0;
      border: 0;
      border-radius: 50%;
      background: #a5a5a5;
      color: #fff;
      font-size: 20px;
      line-height: 24px;
      cursor: pointer;
    }

    #clearButton[hidden] { display: none; }

    #searchButton {
      width: 110px;
      height: 50px;
      border: 0;
      border-radius: 0 4px 4px 0;
      background: var(--navy);
      color: #fff;
      font-weight: 700;
      cursor: pointer;
    }

    #searchButton:hover { background: var(--navy-dark); }
    #searchButton:disabled { opacity: .7; cursor: wait; }

    #suggestions {
      position: absolute;
      z-index: 1000;
      top: 50px;
      left: 0;
      display: none;
      width: calc(100% - 110px);
      max-height: 280px;
      overflow-y: auto;
      border: 1px solid #c7c7c7;
      border-top: 0;
      border-radius: 0 0 4px 4px;
      background: #fff;
      box-shadow: 0 5px 14px rgba(0,0,0,.15);
    }

    .suggestion {
      display: block;
      width: 100%;
      padding: 12px 14px;
      border: 0;
      border-bottom: 1px solid #eee;
      background: #fff;
      text-align: left;
      cursor: pointer;
    }

    .suggestion:hover,
    .suggestion:focus {
      background: #eef3f8;
      outline: none;
    }

    #status {
      display: none;
      margin-top: 18px;
      padding: 14px 16px;
      border-left: 4px solid var(--navy);
      background: #f4f5f6;
      line-height: 1.45;
    }

    #status.error {
      border-left-color: #b3261e;
      background: #fff1f0;
    }

    #changeNotice {
      display: none;
      margin-top: 20px;
      padding: 17px 18px 18px;
      border-left: 4px solid var(--navy);
      background: var(--panel);
    }

    #changeNotice h2 {
      margin: 0 0 14px;
      font-size: 18px;
    }

    #changeNotice p {
      margin: 0 0 12px;
      line-height: 1.5;
    }

    #changeNotice p:last-child { margin-bottom: 0; }

    a {
      color: var(--link);
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    #results {
      display: none;
      margin-top: 22px;
    }

    .selected-address {
      margin: 0 0 14px;
      line-height: 1.45;
    }

    .cards {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 20px 26px;
    }

    .card {
      position: relative;
      min-height: 310px;
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: 7px;
      background: #fff;
    }

    .card-content {
      padding: 24px 22px 72px;
    }

    .card.no-footer .card-content {
      padding-bottom: 24px;
    }

    .card h2 {
      margin: 0 0 22px;
      font-size: 22px;
      line-height: 1.2;
    }

    .card-main {
      display: grid;
      grid-template-columns: 58px 1fr;
      gap: 18px;
      align-items: start;
    }

    .bin-icon {
      width: 58px;
      height: 76px;
    }

    .bin-icon svg {
      display: block;
      width: 100%;
      height: 100%;
    }

    .frequency {
      margin: 1px 0 13px;
      line-height: 1.4;
    }

    .service-link {
      display: inline-block;
      max-width: 250px;
      line-height: 1.45;
    }

    .date-line {
      margin-top: 30px;
      line-height: 1.5;
    }

    .date-line strong {
      margin-left: 10px;
    }

    .night-note {
      margin-top: 3px;
      line-height: 1.45;
    }

    .card-footer {
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      min-height: 48px;
      display: flex;
      align-items: center;
      padding: 11px 18px;
      background: var(--navy);
      color: #fff;
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
    }

    .card-footer[hidden] { display: none; }

    .calendar-note {
      margin-top: 20px;
      padding: 16px 18px;
      border-radius: 7px;
      background: var(--panel);
      line-height: 1.5;
    }

    @media (min-width: 721px) and (max-width: 900px) {
      .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    @media (max-width: 720px) {
      .cards { grid-template-columns: 1fr; }
    }

    @media (max-width: 480px) {
      .app { padding: 8px; }
      .search-panel { padding: 18px 14px 22px; }
      #searchButton { width: 86px; }
      #clearButton { right: 97px; }
      #suggestions { width: calc(100% - 86px); }
      .card-content { padding: 20px 18px 68px; }
      .card h2 { font-size: 20px; }
      .card-main {
        grid-template-columns: 48px 1fr;
        gap: 14px;
      }
      .bin-icon {
        width: 48px;
        height: 68px;
      }
    }

/* Production accessibility helpers */
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}


/* Bin icons now use supplied image assets rather than inline SVG. */
.bin-icon img { display:block; width:100%; height:100%; object-fit:contain; }

/* Collection details sit above the three existing bin cards. */
.collection-overview { margin: 0 0 14px; padding: 18px 20px; background: var(--panel); border-radius: 7px; }
.collection-overview h2 { margin: 0 0 12px; font-size: 21px; }
.collection-overview p { margin: 7px 0; line-height: 1.5; }
.collection-overview .put-out-reminder { margin: 12px 0 0; font-weight: 700; line-height: 1.5; }

/* Bin cards: original visual style, content arranged to match reference. */
.card { min-height: 352px; }
.card-content, .card.no-footer .card-content { padding: 22px 22px 24px; }
.card h2 { margin: 0 0 6px; font-size: 22px; }
.card .frequency { margin: 0 0 16px; }
.card .card-main { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 14px; align-items: start; }
.card .bin-icon { width: 54px; height: 58px; }
.card .date-line { margin: 6px 0 0; line-height: 1.45; }
.card .date-line span, .card .date-line strong { display: block; }
.card .date-line strong { margin: 4px 0 0; }
@media (max-width: 480px) {
  .card-content, .card.no-footer .card-content { padding: 20px 18px 24px; }
  .card .card-main { grid-template-columns: 48px minmax(0,1fr); gap: 14px; }
  .card .bin-icon { width: 48px; height: 56px; }
}

/* Typography adjustments only: preserve existing card layout and colours. */
.collection-overview h2 { font-size: 18px; line-height: 1.4; }
.collection-overview .collection-for { font-size: 16px; font-weight: 400; }
.collection-overview #selectedAddress { font-size: 18px; font-weight: 700; }
.card h2 { font-size: 19px; line-height: 1.3; }
@media (max-width: 480px) { .card h2 { font-size: 18px; } }

/* Final collection information typography */
.collection-overview h2 { font-weight: 400; }
.collection-overview p { font-weight: 400; font-size: 18px; }
.collection-overview .put-out-reminder { font-weight: 400; }

/* Compact cards and revised collection typography */
.collection-overview p { font-size: 18px; font-weight: 400; }
.collection-overview #summaryDate { font-size: 18px; font-weight: 400; }
.card { min-height: 245px; }
.card h2 { font-size: 19px; line-height: 1.3; margin-bottom: 8px; }
.card h2 .lid-label { display: block; }
.card-content, .card.no-footer .card-content { padding: 20px 22px 22px; }
.card .date-line { margin-top: 18px; }
@media (max-width: 480px) { .card { min-height: 225px; } .card h2 { font-size: 18px; } }

/* Next collection date matches the selected address size. */
.collection-overview p:has(#summaryDate) { font-size: 16px; font-weight: 400; }
.collection-overview #summaryDate { font-size: 18px; font-weight: 400; }

/* Latest requested adjustments */
.collection-overview p:has(#summaryDate) { font-size: 18px; font-weight: 400; }
.collection-overview #summaryDate { font-size: 18px; font-weight: 700; }
/* Centre the this-week/next-week text vertically alongside the bin image. */
.card .card-main { align-items: center; }
.card .date-line { margin: 0; line-height: 1.45; }
.card .date-line strong { margin-top: 4px; }

/* Larger bin icons; preserve text alignment and card styling */
.card .card-main { grid-template-columns: 76px minmax(0, 1fr); align-items: center; }
.card .bin-icon { width: 76px; height: 82px; }
@media (max-width: 480px) {
  .card .card-main { grid-template-columns: 64px minmax(0, 1fr); }
  .card .bin-icon { width: 64px; height: 70px; }
}

/* Consistent vertical spacing between the address panel, collection panel and bin cards. */
:root { --section-spacing: 20px; }
#results { margin-top: var(--section-spacing); }
.collection-overview { margin-bottom: var(--section-spacing); }

/* Requested tile layout: two columns, third tile on the second row. */
.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { min-height: 245px; }
.card .tile-reminder { margin: 10px 0 0; font-size: 13px; font-weight: 400; line-height: 1.4; }
.card .date-line { min-width: 0; }
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
}

/* Single-line collection information and reminder within each tile. */
.card .date-line .collection-date-row { display: flex; align-items: baseline; flex-wrap: nowrap; gap: 5px; white-space: nowrap; }
.card .date-line .collection-date-row span,
.card .date-line .collection-date-row strong { display: inline; margin: 0; }
.card .date-line .tile-reminder { white-space: nowrap; margin-top: 8px; }
@media (max-width: 760px) {
  .card .date-line .collection-date-row, .card .date-line .tile-reminder { white-space: normal; }
}

/* Reminder matches the This week label and stays on one line.
   Placing it below the icon/date row gives the text the full card width. */
.card .tile-reminder { font-size: 16px; font-weight: 400; line-height: 1.45; white-space: nowrap; margin: 10px 0 0; }
@media (max-width: 420px) {
  .card .tile-reminder { white-space: normal; }
}

/* Collection heading only: remove grey panel and reduce gap to tiles. */
.collection-overview {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-bottom: 10px;
}
.collection-overview h2 { margin: 0; }

/* Collection week and date on separate lines, with date bold. */
.card .date-line .collection-date-row { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; white-space: normal; }
.card .date-line .collection-date-row span,
.card .date-line .collection-date-row strong { display: block; margin: 0; }

/* Slightly shorter tiles; all other styling remains unchanged. */
.card { min-height: 225px; }
@media (max-width: 480px) { .card { min-height: 215px; } }
