@charset "UTF-8";

.p-branch-filter {
  padding: 20px 32px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background-color: var(--color-gray-2);
}

.p-branch-filter .c-heading.c-heading--h2{
  font-size: var(--fs-26);
}

.p-branch-filter .c-heading.c-heading--h2:before{
  top: .3em;
}

.p-branch-filter__heading {
  margin: 0 0 8px;
  color: var(--color-text);
  font-size: var(--fs-24);
  font-weight: var(--fw-bold);
  line-height: var(--lh-md);
}

.p-branch-filter__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  appearance: none;
  padding: 12px 48px 12px 24px;
  border: 1px solid var(--color-blue-6);
  border-radius: 30px;
  background-color: var(--color-blue-6);
  color: var(--color-white);
  font-family: var(--font-family-primary);
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
  line-height: var(--lh-md);
  cursor: pointer;
}

.p-branch-filter__toggle[aria-expanded="false"] span,
.p-branch-filter__toggle[aria-expanded="true"] span{
  position: relative;
}

.p-branch-filter__toggle[aria-expanded="false"] span:after,
.p-branch-filter__toggle[aria-expanded="true"] span:after{
  content: '';
  display: block;
  position: absolute;
  top: 50%;
  right: -24px;
  translate: 0 -50%;
}

.p-branch-filter__toggle[aria-expanded="false"] span:after{
  border-right: 8px solid transparent;
  border-left: 8px solid transparent;
  border-top: 12px solid #FFF;
}

.p-branch-filter__toggle[aria-expanded="true"] span:after{
  border-right: 8px solid transparent;
  border-left: 8px solid transparent;
  border-bottom: 12px solid #FFF;
}

.p-branch-filter__panel {
  position: relative;
  margin-top: 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.p-branch-filter__panel::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, var(--color-gray-2));
  content: "";
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.p-branch-filter__panel.is-expanded::after {
  opacity: 0;
}

.p-branch-filter__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.p-branch-filter__reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  appearance: none;
  padding: 12px 24px;
  border: 1px solid var(--color-gray-4);
  border-radius: 30px;
  background-color: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-family-primary);
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
  line-height: var(--lh-md);
  cursor: pointer;
}

@media (hover: hover) {
  .p-branch-filter__toggle:hover {
    opacity: 0.8;
  }

  .p-branch-filter__reset:hover {
    background-color: var(--color-gray-2);
  }
}

.p-branch-filter__group {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 16px 0;
  border: 0;
}

.p-branch-filter__group:not(:last-child){
  border-bottom: 1px solid var(--color-border);
}

.p-branch-filter__title {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 0;
  color: var(--color-text);
  font-size: var(--fs-18);
  font-weight: var(--fw-bold);
  line-height: var(--lh-lg);
}

.p-branch-filter__body {
  min-width: 0;
}

.p-branch-filter__select-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 316px));
  gap: 16px;
}

.p-branch-filter__select-label,
.p-branch-filter__select-wrap {
  display: block;
  min-width: 0;
}

.p-branch-filter__select-wrap {
  position: relative;
}

.p-branch-filter__select-wrap::after {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 10px;
  height: 5px;
  background-color: var(--color-blue-6);
  content: "";
  pointer-events: none;
  transform: translateY(-50%);
  -webkit-mask: var(--icon-triangle-under) no-repeat center / contain;
  mask: var(--icon-triangle-under) no-repeat center / contain;
}

.p-branch-filter__select-wrap:has(.p-branch-filter__select:disabled)::after {
  background-color: var(--color-gray-5);
}

.p-branch-filter__select {
  width: 100%;
  height: 42px;
  padding: 8px 44px 8px 14px;
  border: 1px solid var(--color-gray-4);
  border-radius: 4px;
  outline: none;
  appearance: none;
  background-color: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-family-primary);
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: var(--lh-lg);
  cursor: pointer;
  box-sizing: border-box;
}

.p-branch-filter__select.is-placeholder {
  color: var(--color-text);
}

.p-branch-filter__select[data-filter-prefecture].is-placeholder {
  color: var(--color-text);
}

.p-branch-filter__select:focus-visible {
  padding: 7px 43px 7px 13px;
  border: 2px solid var(--color-primary);
}

.p-branch-filter__select:disabled {
  background-color: var(--color-gray-3);
  color: var(--color-gray-5);
  cursor: not-allowed;
  opacity: 1;
}

.p-branch-filter__keyword-label {
  display: block;
  min-width: 0;
  max-width: 648px;
}

.p-branch-filter__keyword {
  width: 100%;
  height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--color-gray-4);
  border-radius: 4px;
  outline: none;
  appearance: none;
  background-color: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-family-primary);
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: var(--lh-lg);
  box-sizing: border-box;
}

.p-branch-filter__keyword:focus-visible {
  padding: 7px 13px;
  border: 2px solid var(--color-primary);
}

.p-branch-filter__choice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(176px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.p-branch-filter__choice-list > li {
  min-width: 0;
  margin: 0;
}

.p-branch-filter__choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 40px;
  padding-left: 32px;
  color: var(--color-text);
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: var(--lh-md);
  cursor: pointer;
  box-sizing: border-box;
}

.p-branch-filter__choice > span:last-child {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.p-branch-filter__choice input {
  position: absolute;
  top: 9px;
  left: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  opacity: 0;
}

.p-branch-filter__choice-mark {
  position: absolute;
  top: 50%;
  left: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--color-gray-4);
  border-radius: 4px;
  background-color: var(--color-white);
  transform: translateY(-50%);
  box-sizing: border-box;
}

.p-branch-filter__choice input:checked + .p-branch-filter__choice-mark::after {
  position: absolute;
  top: 5px;
  left: 6px;
  width: 9px;
  height: 6px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
  transform: rotate(-45deg);
  box-sizing: border-box;
}

.p-branch-filter__choice input:checked + .p-branch-filter__choice-mark {
  border-color: var(--color-blue-6);
  background-color: var(--color-blue-6);
  color: var(--color-white);
}

.p-branch-filter__choice input:focus-visible + .p-branch-filter__choice-mark {
  outline: 2px solid var(--color-green-5);
  outline-offset: 2px;
}

@media (hover: hover) {
  .p-branch-filter__choice:hover input:not(:checked) + .p-branch-filter__choice-mark {
    color: var(--color-blue-6);
  }

  .p-branch-filter__choice:hover input:not(:checked) + .p-branch-filter__choice-mark::after {
    position: absolute;
    top: 5px;
    left: 6px;
    width: 9px;
    height: 6px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    content: "";
    transform: rotate(-45deg);
    box-sizing: border-box;
  }
}

.p-branch-filter__empty {
  margin: 40px 0 0;
  padding: 32px 20px;
  border-radius: 8px;
  background-color: var(--color-gray-2);
  color: var(--color-text);
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
  line-height: var(--lh-lg);
  text-align: center;
}

[data-filter-item][hidden],
.p-branch-filter__empty[hidden] {
  display: none !important;
}

/* 一覧用css ここから */
/* ========================================
   Base
======================================== */

.shop-list {
  width: 100%;
}

/* ========================================
   PC：見出しとデータ行 共通Grid
======================================== */

.shop-head,
.shop-row {
  display: grid;
  grid-template-columns: minmax(115px, 0.5fr) minmax(150px, 1.5fr) minmax(45px, 0.3fr) minmax(160px, 2fr) minmax(100px, 1fr);
  column-gap: 32px;
  align-items: center;
}

/* ========================================
   見出し
======================================== */

.shop-head {
  padding: 24px 32px;
  border-bottom: 1px solid #aaa;
  font-size: 18px;
  font-weight: 700;
}

.shop-head>* {
  min-width: 0;
}

.shop-head-label {
  white-space: nowrap;
}

/* ========================================
   データ行
======================================== */

.shop-row {
  padding: 32px;
  border-bottom: 1px solid #aaa;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.shop-row:hover {
  background-color: #f6f7fb;
}

.shop-row:focus-visible {
  outline: 2px solid #3150c5;
  outline-offset: -2px;
}


/* ========================================
   データセル
======================================== */

.shop-cell {
  min-width: 0;
  font-size: var(--fs-16);
  line-height: 1.6;
}

/* 電話番号はPCでは基本的に折り返さない */
.shop-cell:nth-child(5) {
  white-space: nowrap;
}


/* ========================================
   タグ
======================================== */

.tag {
  display: inline-block;
  width: 100%;
  max-width: 110px;
  padding: 3px 15px;
  border-radius: 20px;
  background: var(--color-gray-6);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.c-listtag-tenpo{
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
}

.c-listtag-atm{
  background-color: var(--color-blue-5);
  color: var(--color-white);
  text-align: center;
}


/* ========================================
   ソートボタン
======================================== */

.sort-button {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 7px;
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

/* ========================================
   ソート三角
======================================== */

.sort-icon {
  display: inline-flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 2px;
}

/* 上向き */
.sort-up {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid #aaa;
}

/* 下向き */
.sort-down {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #aaa;
}

/* ========================================
   ソート状態
======================================== */

/* 未ソート */
.sort-button:not(.is-asc):not(.is-desc) .sort-up,
.sort-button:not(.is-asc):not(.is-desc) .sort-down {
  opacity: 0.65;
}

/* 昇順 */
.sort-button.is-asc .sort-up {
  border-bottom-color: var(--color-gray-6);
  opacity: 1;
}

.sort-button.is-asc .sort-down {
  opacity: 1;
}

/* 降順 */
.sort-button.is-desc .sort-up {
  opacity: 1;
}

.sort-button.is-desc .sort-down {
  border-top-color: var(--color-gray-6);
  opacity: 1;
}
/* 一覧用css ここまで */

@media screen and (min-width: 768px) {
  .p-branch-filter__choice-list{
    gap: 0 16px;
  }
  
  .pc-textal{
    text-align: center;
  }
}

@media screen and (min-width: 768px) and (max-width: 1100px) {
  .p-branch-filter {
    padding: 24px;
  }

  .p-branch-filter__group {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .p-branch-filter__choice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-head {
    padding: 20px 24px;
  }

  .shop-row {
    padding: 24px;
  }

  .shop-cell {
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .tag {
    min-width: 0;
    max-width: 100%;
    padding: 10px 12px;
  }

  .sort-button {
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
  }
}

@media screen and (max-width: 767px) {
  .p-branch-filter .c-heading.c-heading--h2{
    font-size: var(--fs-22);
  }
  
  .p-branch-filter .c-heading.c-heading--h2:before{
    top: .4em;
  }
  
  .p-branch-filter {
    padding: 12px 16px;
  }

  .p-branch-filter__heading {
    font-size: var(--fs-22);
  }

  .p-branch-filter__panel {
    max-height: 0;
    margin-top: 16px;
  }

  .p-branch-filter__toggle,
  .p-branch-filter__reset {
    width: 100%;
    min-width: 0;
  }

  .p-branch-filter__group {
    display: block;
    padding: 0 0 8px;
  }

  .p-branch-filter__title {
    padding: 0;
    font-size: var(--fs-16);
  }

  .p-branch-filter__body {
    margin-top: 12px;
  }
  
  .p-branch-filter__choice-list{
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
  }
  
  .p-branch-filter__toggle,
  .p-branch-filter__reset{
    padding: 8px 4px;
    font-size: var(--fs-14);
  }
  
  .p-branch-filter__toggle{
    padding: 8px 4px;
  }
  
  .p-branch-filter__toggle[aria-expanded="false"] span:after {
    border: none;
  }
  
  .p-branch-filter__toggle[aria-expanded="true"] span:after {
    border: none;
  }
  
  .p-branch-filter__choice-list > li{
    width: calc((100% - 24px) / 2);
    flex: 0 0 calc((100% - 24px) / 2);
  }

  .p-branch-filter__select-list {
    gap: 12px;
  }
  
  .p-branch-filter__select{
    height: 36px;
    padding: 8px 28px 8px 8px;
    font-size: var(--fs-13);
    line-height: var(--lh-xs);
  }
  
  .p-branch-filter__select-wrap::after{
    right: 12px;
  }

  .p-branch-filter__keyword-label {
    max-width: none;
  }

  .p-branch-filter__keyword {
    height: 36px;
    padding: 8px;
    font-size: var(--fs-13);
    line-height: var(--lh-xs);
  }

  .p-branch-filter__choice {
    min-height: 40px;
  }

  .p-branch-filter__choice input {
    top: 9px;
  }

  .p-branch-filter__empty {
    margin-top: 24px;
  }
  
  /* 一覧用css ここから */
  /* ----------------------------------------
     見出しは非表示にせず、
     ソート操作エリアとして残す
  ---------------------------------------- */
  .shop-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
    font-size: 13px;
  }

  .shop-head-label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
  }


  /* ソート可能な見出し */
  .sort-button {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
  }


  /* ----------------------------------------
     データ行
     1件全体がリンク
  ---------------------------------------- */

  .shop-row {
    display: block;
    padding: 20px 16px;
  }

  /* ----------------------------------------
     各項目
  ---------------------------------------- */

  .shop-cell {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
    padding: 7px 0;
    font-size: 16px;
    white-space: normal;
  }

  /* data-labelをスマホ用項目名として表示 */
  .shop-cell::before {
    content: attr(data-label);
    color: #777;
    font-size: 13px;
    line-height: 1.6;
  }

  /* 電話番号もスマホでは通常表示 */
  .shop-cell:nth-child(5) {
    white-space: normal;
  }

  /* ----------------------------------------
     タグ
  ---------------------------------------- */

  .tag {
    width: fit-content;
    min-width: 120px;
    max-width: 100%;
    padding: 8px 18px;
    font-size: 14px;
  }
  
  .c-listtag-tenpo{
    grid-area: auto;
  }
  /* 一覧用css ここまで */
}
