/*
 * Curebell Header CSS（新ヘッダー / UPDATE 用 全文）
 * React の features/header/header.css.ts（design-tokens 解決値）を 1:1 で写したもの。
 * メニュー定義の正本: packages/web/app/config/nav.config.json
 * ブレークポイント: SP = max-width: 48em(768px) / PC = min-width: 48.02em(768.32px)
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.cb-header {
  background-color: #ffffff;
  border-bottom: 1px solid #eff0f2;
  position: sticky;
  top: 0;
  z-index: 202;
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
}

@media screen and (max-width: 48em) {
  .cb-header {
    display: flex;
    flex-direction: column;
  }
}

@media screen and (min-width: 48.02em) {
  .cb-header {
    height: 75px;
  }
}

.cb-header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

@media screen and (max-width: 48em) {
  .cb-header__content {
    height: 67px;
  }
}

@media screen and (min-width: 48.02em) {
  .cb-header__content {
    height: 100%;
    padding: 16px 20px 16px 32px;
    gap: 24px;
  }
}

.cb-header__logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.cb-header__logo-link:hover {
  opacity: 0.8;
}

.cb-header__logo-image {
  height: 40px;
  object-fit: contain;
}

@media screen and (min-width: 48.02em) {
  .cb-header__logo-image {
    height: 50px;
  }
}

.cb-header__search {
  display: none;
}

@media screen and (min-width: 48.02em) {
  .cb-header__search--pc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    height: 100%;
  }
}

@media screen and (max-width: 48em) {
  .cb-header__search--sp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    padding: 5px 16px;
    border-top: 1px solid #eff0f2;
  }
}

.cb-header__search-anchor {
  display: inline-flex;
  align-items: center;
  color: #939aa1;
  flex-shrink: 0;
}

.cb-header__search-anchor svg {
  display: block;
}

.cb-header__search-tab {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: #383838;
  transition: color 0.2s;
}

@media screen and (min-width: 48.02em) {
  .cb-header__search-tab {
    height: 44px;
    padding: 0 18px;
  }
}

.cb-header__search-tab[data-active='true'] {
  color: #0066cc;
}

.cb-header__search-text {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: inherit;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  padding-top: 4px;
  padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
}

.cb-header__search-tab:hover .cb-header__search-text {
  border-bottom-color: #7aafe4;
}

.cb-header__search-tab[data-active='true'] .cb-header__search-text {
  border-bottom-color: #5586ce;
}

.cb-header__account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  height: 100%;
}

.cb-header__divider {
  width: 1px;
  height: 41px;
  flex-shrink: 0;
  background-color: #eff0f2;
}

@media screen and (min-width: 48.02em) {
  .cb-header__divider {
    height: 43px;
  }
}

.cb-header__account-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 9px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

@media screen and (max-width: 48em) {
  .cb-header__account-button {
    padding: 0 6px;
  }
}

.cb-header__account-button[hidden] {
  display: none;
}

.cb-header__account-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 100%;
}

@media screen and (min-width: 48.02em) {
  .cb-header__account-content {
    gap: 4px;
  }
}

.cb-header__account-icon {
  display: block;
  width: 20px;
  height: 20px;
  color: #383838;
}

.cb-header__account-text {
  font-size: 10px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #383838;
  white-space: nowrap;
}

/*
 * テーマ共通 style.css の `a:hover { opacity: 0.7 }` を、ヘッダーの検索タブ／
 * アカウントナビでは打ち消す（React 版に合わせ、hover で opacity を変えない）。
 * ※ ロゴは .cb-header__logo-link:hover { opacity: 0.8 } を維持（React と同じ）。
 */
.cb-header__search-tab:hover,
.cb-header__account-button:hover {
  opacity: 1;
}
