/* Nearme search results (Google-like) */
:root {
  --nm-blue: #1a73e8;
  --nm-text: #202124;
  --nm-muted: #5f6368;
  --nm-border: rgba(60, 64, 67, 0.18);
  --nm-bg: #fff;
  --nm-surface: #fff;
}

/* Hide global site chrome to match Google SERP */
.nm-serp-body .site-header,
.nm-serp-body .site-footer {
  display: none !important;
}

.nm-serp-body .site-bg {
  background: #fff;
}

.nm-serp-body main {
  padding-top: 0;
}

.nm-serp {
  color: var(--nm-text);
  background: var(--nm-bg);
  font-family: arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nm-serp__top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
}

.nm-serp__bar {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 16px 10px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.nm-serp__logo {
  font-weight: 900;
  color: var(--nm-blue);
  font-size: 18px;
  white-space: nowrap;
}

.nm-serp__search {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--nm-border);
  border-radius: 999px;
  padding: 8px 12px 8px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  position: relative;
}

.nm-serp__qRow {
  flex: 1;
  min-width: 0;
}

.nm-serp__qRow .nm-serp__q {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font-size: 15px;
  color: var(--nm-text);
  background: transparent;
}

.nm-serp__qRow .search-panel-clear {
  flex: 0 0 auto;
  margin-right: 2px;
}

.nm-serp__btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nm-serp__btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--nm-blue);
  stroke-width: 2.5;
}

.nm-serp__loc {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 6px 10px 6px 8px;
  background: #fff;
  flex-wrap: wrap;
  min-width: 0;
}

.nm-serp__locIcon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.nm-serp__locWrap {
  position: relative;
  flex: 1 1 140px;
  min-width: 0;
}

.nm-serp__locInputRow {
  min-width: 0;
}

.nm-serp__locInputRow .nm-serp__locInput {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font-size: 12px;
  color: var(--nm-text);
  background: transparent;
  padding: 4px 2px;
}

.nm-serp__locInputRow .search-panel-clear {
  width: 28px;
  height: 28px;
  margin-right: 2px;
  border-radius: 999px;
  font-size: 1.1rem;
  line-height: 1;
}

/* input-clear.js: keep × slot so layout does not jump (wins over main.css [hidden]) */
.nm-serp .nm-serp__locInputRow .search-panel-clear[hidden],
.nm-serp .nm-serp__qRow .search-panel-clear[hidden] {
  display: flex !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.nm-serp__tabs {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px 12px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.nm-serp__tab {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  color: #3c4043;
  font-weight: 700;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}

.nm-serp__tab:hover {
  background: rgba(26, 115, 232, 0.10);
  color: var(--nm-blue);
}

.nm-serp__main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 16px 42px;
}

.nm-serp__meta {
  color: var(--nm-muted);
  font-size: 13px;
  margin: 6px 0 14px;
}

.nm-serp__layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
}

.nm-serp__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nm-serp__status {
  color: var(--nm-muted);
  font-size: 13px;
  margin: 0 0 10px;
  min-height: 1em;
}

.nm-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

.nm-item__row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  min-width: 0;
}

.nm-item__ico {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: #5f6368;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nm-item__ico svg {
  display: block;
}

.nm-item__rowBody {
  flex: 1;
  min-width: 0;
}

.nm-item__siteLink {
  font-size: 12px;
  color: var(--nm-muted);
  text-decoration: none;
  word-break: break-all;
}

.nm-item__siteLink:hover {
  color: var(--nm-blue);
  text-decoration: underline;
}

.nm-item__title {
  display: inline-block;
  margin: 0;
  font-size: 14px;
  color: #1a0dab;
  font-weight: 700;
  line-height: 1.25;
}

.nm-item__title:hover {
  text-decoration: underline;
}

.nm-item__address {
  margin: 0;
  color: #3c4043;
  font-size: 14px;
  line-height: 1.5;
}

.nm-item__opening {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #137333;
  font-weight: 600;
}

.nm-item__todayTxt {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #3c4043;
}

.nm-item__area {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--nm-muted);
}

.nm-item__hours {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
}

.nm-item__hourChip {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 5px 8px;
  min-width: 0;
  min-height: 38px;
  max-width: 100%;
  font: inherit;
  font-size: 10px;
  line-height: 1.15;
  color: #3c4043;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(60, 64, 67, 0.22);
  border-radius: 10px;
  cursor: default;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.nm-item__hourChip:focus {
  outline: 2px solid rgba(26, 115, 232, 0.45);
  outline-offset: 1px;
}

.nm-item__hourChip--single {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #3c4043;
}

.nm-item__hourChip-day {
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--nm-blue);
  text-transform: capitalize;
}

.nm-item__hourChip-time {
  font-size: 10px;
  font-weight: 600;
  color: #5f6368;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nm-item__phone {
  display: inline-block;
  color: var(--nm-blue);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  line-height: 1.4;
}

.nm-item__phone--text {
  color: var(--nm-blue);
}

.nm-item__phone:hover {
  text-decoration: underline;
}

.nm-serp__card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.nm-serp__card h3 {
  font-size: 14px;
  margin: 0 0 10px;
}

.nm-serp__card ul {
  margin: 0;
  padding-left: 18px;
  color: #3c4043;
  font-size: 13px;
  line-height: 1.6;
}

/* Pagination (Google-like) */
.nm-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 18px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.nm-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  color: #3c4043;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.nm-page:hover {
  background: rgba(26, 115, 232, 0.10);
  color: var(--nm-blue);
}

.nm-page.is-active {
  background: rgba(26, 115, 232, 0.14);
  color: var(--nm-blue);
}

.nm-page.is-disabled {
  opacity: 0.5;
  cursor: default;
}

/* reuse suggest dropdown */
.nm-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 50;
  text-align: left;
}

.nm-suggest__item {
  padding: 10px 12px;
  font-size: 13px;
  color: #111;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nm-suggest__item:last-child {
  border-bottom: 0;
}

.nm-suggest__item:hover,
.nm-suggest__item.is-active {
  background: rgba(26, 115, 232, 0.10);
  color: var(--nm-blue);
}

.nm-suggest--loc {
  z-index: 60;
}

.nm-suggest__item--loc {
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 980px) {
  .nm-serp__layout {
    grid-template-columns: 1fr;
  }
  .nm-serp__right {
    display: none;
  }
}

/* Mobile SERP header: stack logo / search / location, full-width controls */
@media (max-width: 720px) {
  .nm-serp__top {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }

  .nm-serp__bar {
    flex-direction: column;
    align-items: stretch;
    padding: max(8px, env(safe-area-inset-top, 0px)) 12px 10px;
    gap: 10px;
  }

  .nm-serp__logo {
    align-self: flex-start;
    font-size: 16px;
    line-height: 1.2;
  }

  .nm-serp__search {
    flex: none;
    width: 100%;
    min-width: 0;
    padding: 6px 10px 6px 12px;
    gap: 8px;
  }

  .nm-serp__qRow .nm-serp__q {
    min-width: 0;
    font-size: 16px;
  }

  .nm-serp__btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .nm-serp__btn svg {
    width: 19px;
    height: 19px;
  }

  .nm-serp__loc {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .nm-serp__locIcon {
    width: 18px;
    height: 18px;
  }

  .nm-serp__locWrap {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  .nm-serp__loc .nm-serp__locInputRow .nm-serp__locInput {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    max-width: 100%;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nm-serp__locInputRow .search-panel-clear {
    width: 32px;
    height: 32px;
  }

  .nm-serp__main {
    padding: 10px 12px max(28px, env(safe-area-inset-bottom, 0px));
  }

  .nm-serp__meta {
    margin: 4px 0 10px;
  }
}

