/* Preserve the original mobile layout with targeted refinements. */
@media (max-width: 700px) {
  /* A compact, joined state control; the results open across its full width. */
  .state-picker {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    min-height: 46px;
    margin-block: 6px 10px;
    padding: 0;
    border: 1px solid #e4e5eb;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 2px 8px rgb(24 24 32 / .035);
  }
  .state-picker:focus-within {
    border-color: #d9939e;
    box-shadow: 0 0 0 2px rgb(198 0 27 / .07);
  }
  .state-picker > label {
    min-width: 0;
    min-height: 44px;
    gap: 6px;
    padding: 0 11px;
    border-right: 1px solid #f0dfe3;
    border-radius: 10px 0 0 10px;
    background: #fff5f6;
    color: #b80019;
    box-shadow: none;
  }
  .state-picker > label strong {
    font-family: Inter, 'Noto Sans Devanagari', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
  }
  .state-picker .state-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border-radius: 0;
    background: transparent;
  }
  .state-picker .state-icon .icon { width: 18px; height: 18px; }
  .state-picker .state-combobox { position: static; border-radius: 0; }
  .state-picker .state-combobox::after {
    content: '';
    display: block !important;
    position: absolute;
    top: 50%;
    right: 14px;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #747480;
    border-bottom: 1.5px solid #747480;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
  }
  .state-picker .state-combobox:has([aria-expanded="true"])::after {
    transform: translateY(-20%) rotate(225deg);
  }
  .state-picker .state-search {
    display: block;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0 34px 0 12px;
    border: 0;
    border-radius: 0 10px 10px 0;
    background: transparent;
    color: #25252e;
    box-shadow: none;
    font: 600 13px/1.4 Inter, 'Noto Sans Devanagari', sans-serif;
  }
  .state-picker .state-search:focus { box-shadow: none; }
  .state-picker .state-search:not(:focus)::-webkit-search-cancel-button { display: none; }
  .state-picker .state-options {
    top: calc(100% + 6px);
    max-height: min(260px, 42dvh);
    padding: 5px;
    border-color: #e4e5eb;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 12px 28px rgb(24 24 32 / .12);
  }
  .state-picker .state-options button {
    position: relative;
    min-height: 44px;
    padding: 10px 34px 10px 12px;
    border-radius: 7px;
    font: 500 13px/1.5 Inter, 'Noto Sans Devanagari', sans-serif;
    overflow-wrap: anywhere;
  }
  .state-picker .state-options button[aria-selected="true"] {
    background: #fff1f3;
    color: #b80019;
    font-weight: 700;
  }
  .state-picker .state-options button[aria-selected="true"]::after {
    content: '✓';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
  }
  .state-picker .state-options button:focus-visible { outline: 2px solid #b80019; outline-offset: -2px; }
  .state-picker .state-no-results { margin: 0; padding: 12px; font-size: 12px; line-height: 1.5; }

  /* Keep the original hero composition, font sizes, spacing, cards and colours. */
  .hero-copy, .update-copy, .mobile-list-copy, .content-card-main > div {
    min-width: 0;
  }
  .hero .eyebrow {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .home-layout :is(.topper-showcase, .topper-viewport, .topper-card, .topper-card img) {
    background: transparent;
    box-shadow: none;
  }
  .home-layout .topper-viewport { padding: .45rem 0 0; }
  .home-layout .topper-card { border-color: #e8e8ee; }

  /* Long titles and links should wrap without widening the existing cards. */
  .mobile-list-copy strong, .content-card h2, .article-detail > h1,
  .attachment-card strong, .account-identity {
    overflow-wrap: anywhere;
  }

  .site-shell .topbar {
    top: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-inline: max(.5rem, env(safe-area-inset-left, 0px))
      max(.5rem, env(safe-area-inset-right, 0px));
    border-inline: 0;
    border-radius: 0;
  }
  .site-shell .side-navigation { border-radius: 0; }

  /* Keep all items reachable inside the mobile menu. */
  .side-navigation {
    max-height: calc(var(--mobile-visible-height, 100dvh) - var(--mobile-header-bottom, 4.35rem) - 12px) !important;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .state-combobox, .news-category-filter, .news-category-filter nav {
    min-width: 0;
  }

  .bottom-nav:has(.bottom-support) {
    overflow: visible;
  }
  .home-layout .bottom-nav {
    background: rgb(255 255 255 / .97);
  }
  .site-shell .bottom-nav {
    inset-inline: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: var(--mobile-nav-height);
    padding-inline: max(.4rem, env(safe-area-inset-left, 0px))
      max(.4rem, env(safe-area-inset-right, 0px));
    padding-bottom: calc(.3rem + var(--mobile-nav-safe-area));
    border: 0;
    border-top: 1px solid #e8e8ee;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }
  .site-shell .bottom-nav::before { display: none; }
  .home-layout .bottom-nav > a {
    border-radius: 18px;
    color: #646470;
  }
  .home-layout .bottom-nav > a.active {
    color: #bb001b;
    background: #fff3f5;
    box-shadow: inset 0 0 0 1px #f8e4e8;
  }
  .bottom-support {
    position: absolute;
    inset-inline-end: max(3px, env(safe-area-inset-right, 0px));
    bottom: calc(100% + 5px);
    width: 70px;
    display: grid;
    grid-template-rows: auto auto auto;
    justify-items: center;
    align-items: center;
  }
  .bottom-support.is-footer-visible:not(:focus-within) { visibility: hidden; }
  .bottom-nav .bottom-help {
    grid-row: 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    color: #fff;
  }
  .bottom-support .bottom-help-icon {
    box-shadow: 0 3px 9px rgb(12 121 62 / .25);
  }
  .bottom-help-label {
    position: static;
    grid-row: 1;
    padding: 4px 8px;
    color: #163c2b;
    background: #fff;
    border: 1px solid #dcebe3;
    border-radius: 9px 9px 3px 9px;
    box-shadow: 0 3px 10px rgb(33 51 43 / .10);
    font-size: 11px;
    line-height: 1.3;
    font-weight: 750;
    white-space: nowrap;
    pointer-events: none;
  }
  .bottom-help-dots {
    grid-row: 2;
    position: relative;
    width: 32px;
    height: 18px;
    pointer-events: none;
  }
  .bottom-help-dots i {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: #25d366;
    box-shadow: 0 1px 3px rgb(8 120 58 / .18);
  }
  .bottom-help-dots i:nth-child(1) { top: 0; left: 3px; width: 7px; height: 7px; }
  .bottom-help-dots i:nth-child(2) { top: 7px; left: 14px; width: 5px; height: 5px; }
  .bottom-help-dots i:nth-child(3) { top: 13px; left: 24px; width: 3px; height: 3px; }
  .home-layout .bottom-nav > a:focus-visible,
  .bottom-nav .bottom-help:focus-visible {
    outline: 2px solid #ad0019;
    outline-offset: 2px;
  }
  .site-shell {
    --mobile-nav-safe-area: env(safe-area-inset-bottom, 0px);
    --mobile-nav-height: calc(4.65rem + var(--mobile-nav-safe-area));
    padding-bottom: var(--mobile-nav-height);
  }
  .static-page-shell:has(.portal-footer) {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--mobile-nav-height));
    min-height: calc(100dvh - var(--mobile-nav-height));
  }
  .static-page-main:has(> .portal-footer) {
    --mobile-static-gutter: 1rem;
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    gap: clamp(20px, 6vw, 40px);
    padding-inline: 0;
    padding-block-end: 0;
  }
  .static-page-main:has(> .portal-footer) > .static-page { margin-inline: var(--mobile-static-gutter); }
  .site-shell .static-page-main > .portal-footer { margin-block-start: auto; }
  .catalog-mobile-buybar {
    bottom: var(--mobile-nav-height);
  }
  .site-shell:has(.catalog-mobile-buybar) .bottom-support {
    bottom: calc(100% + 80px);
  }

  /* Fixed actions must not cover a field while the software keyboard is open. */
  .mobile-keyboard-open .bottom-nav,
  .mobile-keyboard-open .catalog-mobile-buybar {
    display: none;
  }
}
@media (max-width: 500px) {
  .static-page-main:has(> .portal-footer) { --mobile-static-gutter: .75rem; }
}
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .bottom-help-label { animation: bottom-help-prompt 5s ease-in-out infinite; }
  .bottom-support:focus-within .bottom-help-label {
    animation: none;
  }
}
@keyframes bottom-help-prompt {
  0%, 100% { opacity: .82; transform: translateY(2px) scale(.97); }
  28%, 64% { opacity: 1; transform: translateY(-2px) scale(1.04); }
  82% { opacity: .9; transform: translateY(0) scale(1); }
}

/* Prominent but compact WhatsApp support action. */
@media (max-width: 700px) {
  .bottom-nav .bottom-help {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #25d366;
    box-shadow: 0 10px 24px rgb(37 211 102 / .30);
  }
  .bottom-support .bottom-help-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: transparent !important;
    box-shadow: none;
  }
  .bottom-support .bottom-help-icon .icon {
    width: 34px !important;
    height: 34px !important;
    color: #fff;
    fill: currentColor;
  }
  .bottom-help-label {
    min-width: 70px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #08783a;
    font-size: 11.5px;
    font-weight: 900;
    letter-spacing: .01em;
    text-align: center;
    text-shadow: 0 1px 0 #fff, 0 0 5px #fff, 0 0 9px #fff;
  }
}
@media (max-width: 359px) {
  .state-picker > label { gap: 5px; padding-inline: 8px; }
  .state-picker > label strong { font-size: 10.5px; }
  .state-picker .state-search { padding-left: 10px; }
}
@supports (-webkit-touch-callout: none) {
  /* Keep iOS from zooming the page when the state search receives focus. */
  @media (max-width: 700px) {
    .state-picker .state-search { font-size: 16px; }
  }
}
