:root {
  --search-main-color: rgba(61, 121, 213, 1);
  --search-checked-label-color: rgba(61, 121, 213, .7);
  --search-checked-color: #fff;
  --contents-bottom-margin: 0 auto 26px;
}

body.no-scroll {
  overflow: hidden;
}

/* ------------------------------------------------------ */
/* 案件検索フォーム */
/* ------------------------------------------------------ */
/*.search-form {*/
/*  font-size: 16px;*/
/*}*/

.search-form .swell-block-accordion__title {
  background-color: var(--search-main-color);
  color: #fff;
  border-radius: 6px;
}

.search-form.is-opened .swell-block-accordion__title {
  border-radius: 6px 6px 0 0;
}

.search-form .swell-block-accordion__body {
  border: 1px solid var(--search-main-color);
  padding: 0 !important;
}

.product-form {
  padding: 0 1em 2em;
}

.product-form .form-group {
  padding: 0 0 1em;
  min-width: 33%;
}

.product-form .search-form-h {
  color: var(--search-main-color);
  padding: .5em 0;
}

.product-form .group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  padding: 0;
}

.product-form .checkbox label {
  cursor: pointer;
  width: 45%;
}

.product-form .checkbox label input[type="checkbox"],
.product-form .checkbox label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.product-form .checkbox label span {
  display: block;
  text-align: center;
  width: 100%;
  padding: .6em;
  color: #696969;
  border: 1px solid #c5c5c5;
  border-radius: 5px;
  line-height: 1.2em;
}

/* チェックされたときの背景色・文字色・枠色 */
.product-form .checkbox label input[type="checkbox"]:checked + span,
.product-form .checkbox label input[type="radio"]:checked + span {
  background-color: var(--search-checked-label-color);
  color: var(--search-checked-color);
}

.product-form #searchButton {
  display: block;
  margin: 1.8em auto 0;
  width: 80%;
  border-radius: 6px;
  color: #fff;
  background-color: var(--search-main-color);
  line-height: 60px;
  font-size: 1.2em;
  height: 60px;
  padding: 0;
}

@media (min-width: 960px) {
  .product-form .group.checkbox label {
    cursor: pointer;
    width: 30%;
  }

}

/* ------------------------------------------------------ */
/* 案件検索結果 */
/* ------------------------------------------------------ */
#search-result {
  position: fixed;
  left: -9999px;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background-color: rgba(0, 0, 0, 0.8);
}

#search-result .content-bottom > div {
  margin: var(--contents-bottom-margin);
}

#search-result.active {
  left: 0;
  height: 100vh;
}

#search-result .wrap {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100vh);
  transition: transform 0.5s ease-out;
  width: 100%;
  max-height: 100vh;
  background-color: #fff;
  overflow-y: auto;
  padding: 0;
}

@supports (height: 100dvh) {
  #search-result.active {
    height: 100dvh;
  }

  #search-result .wrap {
    transform: translate(-50%, 100dvh);
    max-height: 100dvh;
  }
}

#search-result .wrap.active {
  transform: translate(-50%, 0);
}

#search-result .wrap.active.not-record {
  bottom: auto;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
}

#search-result .search-result-head {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--search-main-color);
  padding: 10px 0;
  text-align: center;
  color: #fff;
  z-index: 1;
}

#search-result .search-result-list {
  padding: 10px 10px 30px;
}

/* 閉じボタン */
.close-btn {
  position: absolute;
  width: 30px; /* ボタンの横幅 */
  height: 30px; /* ボタンの高さ */
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: block;
  top: 3px;
  right: 10px;
}

.close-btn::before,
.close-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px; /* 線の太さ */
  height: 16px; /* 線の長さ */
  background-color: #fff; /* 線の色 */
  transform-origin: center;
}

.close-btn::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-btn::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#search-result .close-btn2 {
  width: auto;
  padding: 10px 0;
  color: var(--search-main-color);
  border: 1px solid var(--search-main-color);
  margin: 0 auto;
  text-align: center;
  max-width: 6em;
  line-height: 1em;
  cursor: pointer;
  border-radius: 6px;
  font-size: .8em;
}

/* ローディング画面 */
#search-result .loading {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px; /* 中央に配置 */
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--search-main-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

#search-result .loading.active {
  display: block;
}

/* 検索結果リスト */
#search-result .result-item {
  padding: 0 0 4em;
}

#search-result .result-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

#search-result .content-top {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

#search-result .content-top-left {
  display: block;
  margin: 0 8px 0 0;
  width: 40%;
}

#search-result .content-top-right {
  width: 60%;
}

#search-result .content-top img {
  max-height: 150px;
}

#search-result .content-top .j-link-button {
  padding: .5em 0;
}

#search-result .content-top .official_url {
  line-height: 1.6em;
}

#search-result .content-bottom {
  width: 100%;
  flex-grow: 1;
}

#search-result h3 {
  font-size: 1.4em;
}

#search-result h4 {
  font-size: 1.2em;
}

#search-result h3,
#search-result h4,
#search-result .j-link,
#search-result .content-text,
#search-result .merit-content,
#search-result .demerit-content,
#search-result .content-top,
#search-result table.spec {
  margin-bottom: 8px;
}

#search-result h4,
#search-result .content-text {
  margin: 14px 0;
}

#search-result .content-text {
  padding-left: 10px;
  padding-right: 10px;
}

#search-result .content-text p {
  line-height: 1.8em;
}

#search-result .merit-content,
#search-result .demerit-content {
  width: 94%;
  margin: 0 auto 8px;
  border-radius: 6px;
}

#search-result .merit-content ul,
#search-result .demerit-content ul {
  list-style: inherit;
  padding: 0 1em;
}

#search-result .merit-content {
  border: 1px solid rgba(70, 130, 180, 1);
  color: #4682b4;
}

#search-result .demerit-content {
  border: 1px solid rgba(255, 99, 71, 1);
  color: #ff6347;
}

#search-result .mdt {
  text-align: center;
  padding: .6em 0;
  /*color: #333;*/
}

#search-result .mdt.merit-content-title {
  background-color: rgba(70, 130, 180, .1);
  border-bottom: 1px solid rgba(70, 130, 180, 1);
}

#search-result .mdt.demerit-content-title {
  background-color: rgba(255, 99, 71, .1);
  border-bottom: 1px solid rgba(255, 99, 71, 1);
}

#search-result .mdtext {
  padding: .6em .5em;
}

#search-result table.spec > tbody {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  border: 1px solid #dcdcdc;
  font-size: .9em;
}

#search-result table.spec tr {
  width: 100%;
  display: flex;
  border-bottom: 1px solid #dcdcdc;
}

#search-result table.spec tr:last-child {
  border-bottom: none;
}

#search-result table.spec th {
  width: 30%;
  background-color: var(--tbody-th-color--bg, hsla(0, 0%, 59%, .05));
  font-weight: 400;
  vertical-align: middle;
  border-right: 1px solid #dcdcdc;
  min-width: 7em;
}

#search-result table.spec td {
  width: 70%;
}

#search-result table.spec th,
#search-result table.spec td {
  flex-grow: 1;
  padding: 4px;
}

#search-result .related-articles {
  font-size: .9em;
  padding: 6px 0 0;
}

#search-result .related-articles:nth-of-type(1) {
  margin-top: 14px;
}

#search-result .agency-details {
  display: flex;
  flex-wrap: wrap;
  gap: .5em;
  margin: 0 auto 26px;
}

#search-result .agency-details span {
  display: block;
  border-radius: 3px;
  background-color: #d3d3d3;
  color: #808080;
  padding: 5px 6px;
  line-height: 1.0em;
  font-size: .8em;
}

#search-result .agency-details span.agency-details-match {
  color: #f5f5f5;
  background-color: #f09f4d;
}

/*#search-result .fee-plans {*/
/*  margin: 0 auto 26px;*/
/*}*/

#search-result .fee-plans h4 {
  margin-bottom: 0;
}

#search-result .fee-plans .plan {
  padding: 10px;
  border-bottom: 1px solid #dcdcdc;
}

#search-result .fee-plans .plan .fee {
  color: #e44141;
  font-weight: 700;
}

/*#search-result .employment-type {*/
/*  margin-bottom: 26px;*/
/*}*/

#search-result .employment-type table {
  display: table; /* Gridではなくtableに */
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* 均等割り付け */
}

#search-result .employment-table tr {
  display: table-row;
}

#search-result .employment-type table th,
#search-result .employment-type table td {
  display: table-cell; /* FlexやGridではなく */
  width: 33.33%;
  padding: 6px 0;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
  position: relative; /* ::before 用の基準 */
  line-height: 1.0em;
  font-weight: 400;
  font-size: .9em;
}

#search-result .employment-type table td {
  position: relative;
  box-sizing: border-box;
  text-align: center;
  vertical-align: middle;
}

#search-result .employment-type table th {
  background-color: var(--tbody-th-color--bg, hsla(0, 0%, 59%, .05));
}

#search-result .employment-table td span {
  visibility: hidden;
}

/* ○ を描く */
#search-result .employment-table td.match::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1em; /* 円の直径 */
  height: 1em;
  border: 1px solid #63a84d;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* × を描く （２本の線） */
#search-result .employment-table td:not(.match)::before,
#search-result .employment-table td:not(.match)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px; /* 線の太さ */
  height: 1em; /* 線の長さ */
  background: #e44141;
  transform-origin: center;
}

/* 斜め45度 */
#search-result .employment-table td:not(.match)::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

/* 斜め-45度 */
#search-result .employment-table td:not(.match)::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------ */
/* フッター検索ボタン
/* ------------------------------------------------------ */
#slide-footer-search-bar {
  position: fixed;
  bottom: -999px; /* 初期位置は画面外 */
  left: 0;
  width: 100%;
  padding: 0 8px 8px;
  transition: bottom .5s; /* スライドインのアニメーション */
  z-index: 999;
  /*background-color: rgba(0, 0, 0, 0.6);*/
  /*border-radius: 6px 6px 0 0;*/
}

#slide-footer-search-bar .slide-footer-search-bar-text {
  position: relative;
  top: .5rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-block;
  width: auto;
  max-width: 90%; /* 必要に応じて調整 */
  min-width: 100px; /* 最低限の幅 */
  color: var(--search-checked-label-color);
  padding: 8px 20px;
  border: 2px solid var(--search-main-color);
  border-radius: 1.5em;
  line-height: 1.0em;
  background-color: var(--jlink-footer-bg-color);
  text-align: center;
}

#slide-footer-search-bar #showSearchFormButton {
  display: block;
  width: 100%;
  padding: 24px 10px 24px;
  text-align: center;
  cursor: pointer;
  color: var(--jlink-text-color);
  text-decoration: none;
  background-color: var(--search-main-color);
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.2em;
  line-height: 1.0em;
}

#slide-footer-bar .j-link {
  padding: 24px 10px 24px !important;
}

/* フッターボタンの検索から検索結果を表示した場合の#search-resultの背景を透明にする */
body.modal-open #search-result.overlay {
  background-color: transparent !important;
}

#search-form-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 10001;
}

#search-form-modal img.search-banner {
  
}

#search-form-modal .modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 0;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
}

#search-form-modal .product-form {
  font-size: 14px;
  padding: 1.0em 1.0em 3.0em;
}

/* ======== モーダル閉じるボタン ======== */
#search-form-modal .close-btn {
  background-color: #696969;
}

@supports (height: 100dvh) {
  #search-form-modal {
    height: 100dvh;
  }

  #search-form-modal .modal-content {
    max-height: 100dvh;
  }
}

@media (min-width: 960px) {
  #search-result .wrap {
    max-height: 94vh;
    width: 680px;
    bottom: auto;
    top: 50%;
  }

  @supports (height: 100dvh) {
    #search-result .wrap {
      max-height: 94dvh;
    }
  }

  #search-result .wrap.active {
    transform: translateX(-50%) translateY(-50%);
  }

  #search-result .result-item {
    padding: 0 0 3em;
  }

  #search-result .content-top {
    align-items: normal;
  }

  #search-result .content-top img {
    width: 100%;
    max-height: none;
  }

  #search-result .content-bottom {
    width: 70%;
  }

  #search-result table.spec tr {
    width: 50%;
  }

  #search-result table.spec th:nth-last-child(2) {
    border-left: 1px solid #dcdcdc;
  }


  #search-result table.spec tr:nth-last-child(2) {
    border-bottom: none;
  }

  #search-result table.spec th,
  #search-result table.spec td {
    width: 50%;
  }

  #search-result .merit-demerit {
    display: flex;
    gap: 0.5em;
  }

  #search-result .merit-content,
  #search-result .demerit-content {
    width: 100%;
  }

  #search-result .j-link-button {
    width: 100%;
    padding: .6em 1.5em
  }

  #search-result .fee-plans .plan {
    font-size: .9em;
  }

  /* フッター検索 */
  #search-form-modal .modal-content {
    height: auto;
    max-height: 94vh;
    width: 680px;
  }

  @supports (height: 100dvh) {
    #search-form-modal .modal-content {
      max-height: 94dvh;
    }
  }

  #search-form-modal .product-form {
    font-size: 1em;
  }

  #slide-footer-search-bar {
    width: 680px;
    left: 50%;
    transform: translate(-50%, 0);
    border-radius: 6px 6px 0 0;
    padding: 0 12px 16px;
    background-color: rgba(0, 0, 0, 0.6);
  }

  body.isSidebarButton #slide-footer-search-bar {
    background: none;
    width: auto;
    min-width: var(--swl-sidebar_width);
    bottom: -20px;
    padding: 0;
    transform: none;
    font-size: .8em;
  }

  body.isSidebarButton #slide-footer-search-bar #showSearchFormButton {
    font-weight: 400;
  }

  body.isSidebarButton #slide-footer-bar {
    width: auto !important;
    min-width: var(--swl-sidebar_width) !important;
    border-radius: 0 !important;
    transform: none !important;
    padding: 0 !important;
    font-size: .8em;
    background: none !important;
  }

  body.isSidebarButton #slide-footer-bar .j-link {
    font-weight: 400 !important;
  }
}