/* 全ページ共通要素 */
.custom-search-detail {
  html {
    scroll-padding-top: 50px;
  }

  #react-navigation-tabs {
    background-color: var(--color-primary-on-primary);
  }

  .recruitment-box-container.full-height {
    padding-bottom: 250px;
  }

  .searchbtn {
    width: 300px;
    position: relative;
    min-width: 80px;
    min-height: 48px;
    padding: 0px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-full);
    border-width: 0px;
    background: linear-gradient(90deg, #b37a3f, #714623);
    color: var(--color-primary-on-primary);
    font-size: var(--font-size-display-regular);
    font-weight: var(--font-weight-display-xsmall);
    line-height: var(--line-height-display-xsmall);
    margin-top: 0;
    height: 55px;
  }

  .btn-like-custom {
    width: 300px;
    position: relative;
    min-width: 80px;
    min-height: 48px;
    padding: 0px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-full);
    font-size: var(--font-size-display-regular);
    font-weight: var(--font-weight-display-xsmall);
    line-height: var(--line-height-display-xsmall);
    margin-top: 0;
    height: 55px;
    color: #082054;
    border: 1px solid #082054;
  }

  .searchbtn:disabled {
    background: #d3d3d3;
    color: #888888;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
  }

  .icon_grey {
    filter: invert(30%) sepia(0%) saturate(11%) hue-rotate(143deg) brightness(101%) contrast(93%);
  }

  .icon_interested {
    filter: brightness(0) saturate(100%) invert(26%) sepia(79%) saturate(1885%) hue-rotate(187deg) brightness(94%) contrast(101%);
  }

  .recruitment-box-container {
    display: flex;
    justify-content: center;
    padding-bottom: 0px;
    position: relative;
    z-index: 1;
    margin-top: -1px;
    background-color: var(--color-background-primary);
  }

  .button-next:disabled {
    background: #d3d3d3;
    color: #888888;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
  }

  .button-next {
    position: relative;
    width: 90%;
    margin: 0 auto;
    min-width: 80px;
    min-height: 48px;
    padding: 0px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-full);
    border-width: 0px;
    background: linear-gradient(90deg, #b37a3f, #714623);
    color: var(--color-primary-on-primary);
    max-width: 240px;
  }

  .button-next-non {
    position: relative;
    width: 90%;
    margin: 0 auto;
    min-width: 80px;
    min-height: 48px;
    padding: 0px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-full);
    border-width: 0px;
    background-color: var(--color-primary-primary-low);
    color: var(--color-primary-on-primary);
    max-width: 240px;
  }

  .button-back {
    position: relative;
    width: 90%;
    min-width: 80px;
    min-height: 48px;
    padding: 0px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-full);
    border-width: 0px;
    background-color: #8a8d8f;
    color: var(--color-primary-on-primary);
    margin: 0 auto;
    max-width: 240px;
  }

  .button-back::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    background-image: url(../../image/renew/icon-button.svg);
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(180deg);
    /* 回転 */
    position: absolute;
    top: calc(50% - 10px);
    left: 12px;
  }

  .recruitment-name {
    font-size: var(--font-size-display-medium);
    font-weight: var(--font-weight-display-xsmall);
    line-height: var(--line-height-display-xsmall);
    font-family: var(--font-family-display);
  }

  .recruitment-company-name {
    font-size: var(--font-size-display-small);
    font-weight: var(--font-weight-display-xxsmall);
    line-height: var(--line-height-display-xxsmall);
    font-family: var(--font-family-display);
    padding-top: 4px;
  }

  .recruitment-card-list .button-area {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
  }

  .recruitment-card-list label {
    display: block;
    text-align: left;
    /*color: var( --color-border-secondary);*/
    font-weight: normal;
  }

  /* モーダル */

  .alert-box .three-button {
    display: flex;
    justify-content: center;
  }

  .alert-box .three-button .min-w-200 {
    padding: 10px 0;
  }

  .alert-box .three-button .min-w-200:nth-child(1) {
    order: 2;
  }

  .alert-box h5 {
    margin-bottom: 10px;
  }

  .alert-box textarea {
    width: 96% !important;
    padding: 2%;
  }

  .recruitment-card-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-left: 0;
    padding-right: 0;
    margin-top: 20px;
  }

  .note {
    font-size: var(--font-size-display-xxsmall);
  }

  /* 選考ステータスモーダル */

  .alert-status .alert-infomsg {
    text-align: left;
  }

  .alert-box.end {
    padding: 50px 24px;
  }

  /* ====求人詳細==== */

  .page-container.detail-offer {
    margin-left: auto;
    margin-right: auto;
  }

  .detail-offer .detail-header {
    background-color: #ffffff;
    margin-bottom: 10px;
  }

  .detail-header .searchbtn {
    margin: 20px auto;
  }

  .detail-offer .tab-item.selected {
    border-bottom: none;
  }

  .detail-offer h3 {
    background-color: var(--color-primary-primary);
    padding: 10px;
    font-size: var(--font-size-display-small);
    color: #fff;
    margin: 40px 0 20px;
    width: auto;
  }

  .detail-offer h4 {
    padding: 2px 10px 2px 10px;
    margin-bottom: 10px;
    font-size: var(--font-size-display-small);
    border-left: solid 3px var(--color-primary-primary);
    line-height: 1.1em;
  }

  .detail-offer p {
    font-size: var(--font-size-display-xsmall);
    font-weight: 400;
    color: #444;
  }

  .detail-offer span {
    font-size: var(--font-size-display-xsmall);
    font-weight: 400;
    color: #444;
  }

  .detail-offer .recruitment-name {
    color: #444444;
    font-size: var(--font-size-display-xsmall);
    font-weight: 800;
    margin-bottom: 12px;
  }

  .detail-offer .recruitment-company-name {
    font-size: var(--font-size-display-small);
    font-weight: 800;
    line-height: var(--line-height-display-small);
    font-family: var(--font-family-display);
    padding-top: 4px;
    margin-bottom: 10px;
    color: #082054;
  }

  p.salary {
    font-size: var(--font-size-display-small);
  }

  .detail-offer span.salary-unit {
    font-size: 12px;
  }

  .page-container {
    max-width: 896px;
    margin-left: auto;
    margin-right: auto;
  }

  @media (min-width: 768px) {
    .page-container {
      padding: 2rem;
    }
  }

  @media (min-width: 769px) {
    .nav-card {
      display: none !important;
    }
  }

  /* --- アンカーリンクナビゲーション --- */

  .nav-card {
    margin-bottom: 2rem;
    position: relative;
    padding: 16px 0px 0;
    background-color: #f2f3f6;
  }

  .nav-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
  }

  .nav-tab {
    display: block;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    gap: 4px;
    border: none;
    border-top-right-radius: 8px;
    box-shadow: 0 -3px 5px -1px rgba(0,0,0,.2);
    margin-right: 1px;
    width: 100%;
    text-align: center;
    background-color: #fff;
    z-index: 1;
    color: var(--color-text-link-default);
  }

  .nav-tab:nth-child(1) {
    display: block;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    gap: 4px;
    border: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 0;
    box-shadow: 0 -3px 5px -1px rgba(0,0,0,.2);
    margin-right: 1px;
    width: 100%;
    text-align: center;
    background-color: #fff;
    z-index: 1;
    color: var(--color-text-link-default);
    border-bottom: 1px solid #fff;
    border-right: 1px solid #e6e6e6;
  }

  .nav-tab.active {
    border-top: 3px solid var(--color-primary-primary);
    font-weight: 600;
    margin-bottom: -1px;
    border-radius: 0;
    color: var(--color-text-primary);
  }

  .nav-tab > .active {
    background: #b9d9eb;
    border-top-right-radius: 0;
    border-top: solid 2px var(--color-primary-primary);
  }

  .anchor-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    font-size: 14px;
    background-color: var(--color-background-fourth);
    margin-top: -1px;
    z-index: 1;
    position: relative;
    margin: 10px;
  }

  .anchor-links-custom {
    padding: 15px 5px;
    background-color: #f1f1f1 !important;
  }

  .anchor-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    justify-content: center;
  }

  .g-5 {
    gap: 5px;
  }

  .anchor-link:hover {
    text-decoration: underline;
  }

  .anchor-link svg {
    width: 15px;
    height: 15px;
    margin-right: 0.5rem;
  }

  .info-grid-sp {
    display: flex;
    justify-content: space-between;
  }

  .items-like-sp {
    display: flex;
    align-items: center;
  }

  .info-item:first-child {
    padding-top: 0;
    border-top: none;
  }

  .info-grid .info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
  }

  .info-grid .info-item h4 {
    margin-bottom: 0;
    width: 90px;
    font-size: var(--font-size-display-xxsmall);
  }

  .info-grid .info-item p {
    margin-bottom: 0;
    font-size: var(--font-size-display-xxsmall);
  }

  .notice-box .text-right {
    text-align: right;
    margin-bottom: 10px;
    font-size: var(--font-size-display-small);
  }

  .notice-box .note {
    font-size: var(--font-size-display-xxsmall);
    color: #6b7280;
    margin-top: 10px;
  }

  .favorite-button {
    background-color: white;
    cursor: pointer;
    transition: background-color 0.2s;
  }

  .favorite-button:hover {
    background-color: #f3f4f6;
  }

  /* --- ユーティリティ --- */

  .scroll-mt-24 {
    scroll-margin-top: 40px;
  }

  /* 決算情報テーブルのスタイル */

  .financial-table {
    display: table;
    width: 50%;
    border-collapse: collapse;
    margin: 1rem auto;
    font-size: var(--font-size-display-xsmall);
  }

  .financial-table-header {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    background-color: var(--color-primary-primary);
    color: #fff;
    font-weight: 500;
  }

  .financial-table-header-row {
    display: table-header-group;
  }

  .financial-table-body {
    display: table-row-group;
  }

  .financial-table-row {
    display: table-row;
  }

  .financial-table-header,
  .financial-table-data {
    display: table-cell;
  }

  .financial-table-data {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: right;
    font-size: 14px;
    background-color: #fff;
  }

  /* PC */
  @media (min-width: 769px) {
    /* ===求人情報詳細=== */
    .recruitment-card-list:has(.detail-offer) {
      border-radius: 8px;
      margin-top: 30px;
      padding: 1rem;
      max-width: 1000px;
    }

    .detail-offer .recruitment-company-name {
      font-size: var(--font-size-display-medium);
      font-weight: 800;
      line-height: var(--line-height-display-small);
      font-family: var(--font-family-display);
      padding-top: 4px;
      margin-bottom: 10px;
      padding-bottom: 0;
      border-bottom: none;
      color: #082054;
    }

    .detail-offer .recruitment-name {
      color: #444444;
      font-size: var(--font-size-display-small);
      font-weight: 800;
      margin-bottom: 12px;
    }

    .detail-offer span {
      font-size: var(--font-size-display-xsmall);
      font-weight: 400;
      color: #444;
    }

    .detail-offer span.salary-unit {
      font-size: 14px;
    }

    .info-grid {
      display: flex;
      gap: 40px;
    }

    .info-grid .info-item h4 {
      margin-bottom: 0;
      width: 90px;
      font-size: var(--font-size-display-xsmall);
    }

    .info-grid .info-item p {
      margin-bottom: 0;
      font-size: var(--font-size-display-xsmall);
    }

    .detail-offer .anchor-links {
      background-color: #fff;
      margin-bottom: 40px;
    }

    .grid-template-columns-7 {
      grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .grid-template-columns-6 {
      grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .toggle-more-button {
      display: flex;
    }

    .detail-offer .conditions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .detail-offer .conditions .info-item {
      width: 24%;
    }
  }

  /* SP */
  @media (max-width: 768px) {
    .searchbtn {
      background: linear-gradient(90deg, #b37a3f, #714623);
      font-size: var(--font-size-display-xsmall);
      height: 20px;
      width: 300px;
    }

    .favorite-button {
      height: 58px;
      width: 114px;
    }

    .icon-text {
      padding: 0;
    }

    .padding-0-12px {
      padding: 0 12px 0 0;
    }

    .icon_grey {
      filter: invert(30%) sepia(0%) saturate(11%) hue-rotate(143deg) brightness(101%) contrast(93%);
    }

    .icon_interested {
      filter: brightness(0) saturate(100%) invert(26%) sepia(79%) saturate(1885%) hue-rotate(187deg) brightness(94%) contrast(101%);
    }

    .icon_interested--disabled {
      filter: brightness(0) saturate(100%) invert(26%) sepia(79%) saturate(1885%) hue-rotate(187deg) brightness(94%) contrast(101%);
      opacity: 0.5;
    }

    .recruitment-box-container {
      display: flex;
      justify-content: center;
      margin-top: 0px;
    }

    .button-back {
      position: relative;
      width: 90%;
      min-width: 80px;
      min-height: 48px;
      padding: 0px 12px;
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: var(--radius-full);
      border-width: 0px;
      background-color: #8a8d8f;
      color: var(--color-primary-on-primary);
      margin: 0 auto;
      max-width: 240px;
    }

    .button-back::after {
      content: '';
      display: block;
      width: 20px;
      height: 20px;
      background-image: url(../../image/renew/icon-button.svg);
      background-size: contain;
      background-repeat: no-repeat;
      transform: rotate(180deg);
      /* 回転 */
      position: absolute;
      top: calc(50% - 10px);
      left: 12px;
    }

    /* モーダル */
    .alert-box .three-button {
      display: flex;
      justify-content: center;
    }

    .alert-box .three-button .min-w-200 {
      padding: 10px 0;
    }

    .alert-box .three-button .min-w-200:nth-child(1) {
      order: 2;
    }

    .alert-box h5 {
      margin-bottom: 10px;
    }

    .alert-box textarea {
      width: 98% !important;
      padding: 2%;
    }

    .recruitment-card-list {
      display: flex;
      flex-direction: column;
      gap: 14px;
      padding-left: 0;
      padding-right: 0;
      margin-top: 0;
    }

    .recruitment-name {
      font-size: var(--font-size-display-xsmall);
      font-weight: var(--font-weight-display-xsmall);
      line-height: var(--line-height-display-xsmall);
      font-family: var(--font-family-display);
    }

    .recruitment-company-name {
      font-size: var(--font-size-display-xxsmall);
      font-weight: var(--font-weight-display-xxsmall);
      line-height: var(--line-height-display-xxsmall);
      font-family: var(--font-family-display);
      padding-top: 4px;
    }

    .alert-box .three-button {
      display: block;
    }

    .alert-box .three-button .min-w-200:nth-child(1) {
      order: 1;
    }

    .info-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .info-grid .info-item {
      display: flex;
      align-items: flex-start;
      margin-bottom: 10px;
      gap: 20px;
    }

    .info-grid .info-item p {
      flex: 1
    }

    .anchor-link {
      justify-content: flex-start;
    }

    /* ==== 求人詳細 ==== */
    .nav-card {
      margin-bottom: 0;
    }

    .detail-offer .tab-content {
      flex-direction: column;
      gap: 8px;
      width: 100%;
    }

    .nav-tab-bottom {
      background-color: var(--color-background-thirdly);
      margin-top: -1px;
      z-index: 20;
      position: relative;
    }

    /* --- カードとセクション --- */
    .card {
      background-color: white;
      margin-bottom: 2rem;
    }

    .card .subtitle {
      font-size: 1.125rem;
      color: #4b5563;
      margin-bottom: 1.5rem;
    }

    .detail-offer .tab-content {
      padding: 0;
    }

    /* 折りたたみメニュー */
    .collapsible-wrapper {
      position: relative;
      overflow: hidden;
      transition: max-height 0.3s ease-in-out;
    }

    .collapsible-wrapper.is-open {
      /* JSでmax-heightが設定される */
      max-height: 1000px;
      /* フォールバック */
    }

    .collapsible-wrapper:not(.is-open)::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      height: 40px;
      background: linear-gradient(to top, #edf2f7, rgba(249, 250, 251, 0));
      pointer-events: none;
    }

    .toggle-more-button {
      background: none;
      border: 1px solid #d1d5db;
      color: #3b82f6;
      cursor: pointer;
      padding: 0;
      margin: 8px auto 0;
      display: flex;
      /* JSで表示を制御 */
      width: 32px;
      height: 32px;
      border-radius: 50%;
      justify-content: center;
      align-items: center;
      transition: background-color 0.2s,
      transform 0.2s;
      margin-bottom: 10px;
    }

    .toggle-more-button:hover {
      background-color: #f3f4f6;
    }

    .toggle-more-button svg {
      width: 20px;
      height: 20px;
      transition: transform 0.3s ease-in-out;
    }

    .is-open + .toggle-more-button svg {
      transform: rotate(180deg);
    }

    #job-info-content {
      display: block;
    }

    #job-info-content .anchor-links {
      margin-bottom: 15px;
    }

    /* 決算情報テーブルのスタイル */
    .financial-table {
      width: 100%;
      border-collapse: collapse;
      margin: 1rem auto;
      font-size: var(--font-size-display-xsmall);
    }

    section .company-name {
      margin-top: 20px;
    }

    .detail-offer .detail-header {
      margin-bottom: 15px;
    }
  }

  .toggle-more-button {
    background: none;
    border: 1px solid #d1d5db;
    color: #3b82f6;
    cursor: pointer;
    padding: 0;
    margin: 8px auto 0;
    display: flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s,
    transform 0.2s;
    margin-bottom: 10px;
  }

  .toggle-more-button svg {
    width: 20px;
    height: 20px;
    color: #333;
  }

  .js-collapsible p {
    white-space: pre-line;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    font-size: var(--font-size-display-xsmall);
  }

  .div-collapsible {
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    font-size: var(--font-size-display-xsmall);
  }

  .js-collapsible .toggle-more-button {
    display: flex;
    justify-content: flex-end;
  }

  section .info-item {
    margin-bottom: 24px;
  }

  @media (max-width: 728px) {
    .PC-note {
      display: none;
    }
  }

  @media (min-width: 728px) {
    .SP-note {
      display: none;
    }
  }

  .cursor-not-allowed {
    cursor: not-allowed;
  }

  .header-grid {
    display: flex;
    justify-content: space-between;
  }
}