/* =========================================================
   Meibo — traditional content styles (search.css aligned)
   Loaded with parent/child CSS, not newhome-only layout.
   ========================================================= */

.meibo-back {
  margin-bottom: 1em;
}

.yudou {
  margin-bottom: 4px;
}

.meibo-button-info {
  margin-bottom: 8px;
}

/* Tabs — black base (distinct from .link-button blue). Subs open on hover. */
.meibo-tabs {
  margin-bottom: 16px;
  position: relative;
  z-index: 5;
}
.meibo-tabs__list {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.meibo-tabs__item {
  list-style: none !important;
  margin: 0;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  line-height: 1;
}
.meibo-tabs__list > li::before,
.meibo-tabs__list > li::marker {
  content: none !important;
  display: none !important;
}
.meibo-tabs__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid #32373c;
  border-radius: 3px;
  background: #fff;
  color: #32373c !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  vertical-align: middle;
}
.meibo-tabs__btn:hover,
.meibo-tabs__btn:focus,
.meibo-tabs__btn:visited {
  border-color: #32373c;
  background: #eceef0;
  color: #32373c !important;
  opacity: 1;
}
.meibo-tabs__btn.is-active,
.meibo-tabs__btn.is-active:visited {
  background: #32373c;
  border-color: #32373c;
  color: #fff !important;
}

/* Subcategory dropdown (header-menu style) */
.meibo-tabs__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0;
  padding: 8px 0 0;
  list-style: none !important;
  min-width: max(100%, 11em);
  width: max-content;
  max-width: min(90vw, 280px);
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 20;
  box-sizing: border-box;
}
.meibo-tabs__dropdown::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border: 1px solid #32373c;
  border-radius: 3px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  z-index: -1;
  pointer-events: none;
}
.meibo-tabs__dropdown > li {
  list-style: none !important;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}
.meibo-tabs__dropdown > li::before,
.meibo-tabs__dropdown > li::marker {
  content: none !important;
  display: none !important;
}
.meibo-tabs__item.has-sub:hover > .meibo-tabs__dropdown,
.meibo-tabs__item.has-sub:focus-within > .meibo-tabs__dropdown,
.meibo-tabs__item.has-sub.is-open > .meibo-tabs__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.meibo-tabs__drop-btn {
  display: block;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: #32373c !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none !important;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}
.meibo-tabs__drop-btn:hover,
.meibo-tabs__drop-btn:focus {
  background: transparent;
  color: #007bc4 !important;
}
.meibo-tabs__drop-btn:visited {
  color: #32373c !important;
}
.meibo-tabs__drop-btn:hover:visited,
.meibo-tabs__drop-btn:focus:visited {
  color: #007bc4 !important;
}
.meibo-tabs__drop-btn.is-active,
.meibo-tabs__drop-btn.is-active:visited {
  background: #32373c;
  color: #fff !important;
  font-weight: 700;
}
.meibo-tabs__drop-btn.is-active:hover,
.meibo-tabs__drop-btn.is-active:focus {
  background: #32373c;
  color: #fff !important;
}

/* Search form — follow search.css conventions */
.meibo-search {
  overflow: auto;
  margin-bottom: 12px;
}
.meibo-search__fields {
  display: block;
}
.meibo-search__item {
  display: inline-block;
}
.meibo-search__item input {
  margin-right: 10px;
  margin-bottom: 10px;
}
.meibo-search__item select {
  color: #666;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 3px;
  margin-right: 10px;
  margin-bottom: 10px;
}
.meibo-search__submit {
  font-size: 16px;
  max-width: 200px;
  border-radius: 30px;
  transition: .3s;
  text-align: center;
  background-color: #007bc4;
  color: #fff;
  padding: 8px 20px;
  border: 0;
  margin-bottom: 20px;
  cursor: pointer;
}
.meibo-search__submit:hover {
  opacity: .8;
}

.meibo-heading {
  margin: 48px 0 16px;
  font-size: 1.6em;
  font-weight: 700;
  line-height: 1.35;
  color: #222;
}
.meibo-hit {
  margin: 0 0 12px;
}

.meibo-empty {
  margin: 1em 0;
  color: #666;
}

/* Table
   - 16pt body text
   - few columns: content width (not stretched)
   - many columns: horizontal scroll + nowrap short fields
*/
.meibo-table-scroller {
  margin-bottom: 1.5em;
}
.meibo-table-hint {
  display: none;
  margin: 0 0 6px;
  padding: 0;
  font-size: 16px;
  line-height: 1.4;
  color: #9ca3af;
  letter-spacing: 0.02em;
  user-select: none;
  pointer-events: none;
}
.meibo-table-scroller.is-scrollable .meibo-table-hint {
  display: block;
}
.meibo-table-wrap {
  overflow: auto;
  max-height: min(70vh, calc(100vh - 12rem));
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0;
}
.meibo-table {
  font-size: 16px;
  line-height: 1.45;
  width: max-content;
  max-width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", "Hiragino Sans", "Meiryo", sans-serif;
}
.meibo-table--wide {
  width: max-content;
  max-width: none;
}
.meibo-table--compact {
  width: auto;
  min-width: 36em;
}
.meibo-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #007bc4;
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 0.55em 0.75em;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 #000;
}
.meibo-table th + th {
  border-left: 1px solid #000;
}
.meibo-table td {
  border-top: 1px solid #000;
  padding: 0.5em 0.75em;
  vertical-align: middle;
  text-align: left;
  background-color: #fff;
}
.meibo-table td + td {
  border-left: 1px solid #ddd;
}

/* Short fields: keep one line */
.meibo-table .meibo-cell--nowrap {
  white-space: nowrap;
}

/* Long fields: wrap within a readable measure */
.meibo-table .meibo-cell--wrap {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 12em;
  max-width: 22em;
}
.meibo-table td[data-field="住所"].meibo-cell--wrap {
  max-width: 28em;
}
.meibo-table td[data-field="会社名"],
.meibo-table th[data-field="会社名"] {
  min-width: 10em;
}
.meibo-table td[data-field="氏名"],
.meibo-table th[data-field="氏名"],
.meibo-table td[data-field="代表者氏名"],
.meibo-table th[data-field="代表者氏名"] {
  white-space: nowrap;
}

/* Inline gaiji SVG */
.meibo-gaiji {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin: 0 0.02em;
  vertical-align: -0.12em;
  object-fit: contain;
}
.meibo-gaiji--missing {
  width: 1.05em;
  text-align: center;
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fdba74;
  font-size: 0.85em;
  line-height: 1.05em;
  vertical-align: middle;
  cursor: help;
}

.meibo-public {
  margin: 12px 0 32px;
}

@media screen and (min-width: 1081px) {
  .page-meibo .entry-content {
    margin-left: calc(490px - 46vw);
    width: 94vw;
  }
}
