/*
  ここにある内容

  --- col-1 ---
    ● col-1-post-thumb
    ● search-and-filter

  --- col-2 ---
    ● head pagination
    ● sort ( latest / oldest )
    ● resolut posts
    ● foot pagination
  
  ※ タイルそのもののデザインは tile__front-and-search.css に記載

*/


/* ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍   col-1   ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ */

.col-1-post-thumb {
  position: absolute;
  width: 730px;
  height: clamp(540px, 65dvh, 702px);
  bottom: 0px;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

@media (min-width: 1280px) and (max-height: 830px) {
  .col-1-post-thumb {
    top: 290px;
    bottom: auto;
  }
}

.col-1-post-thumb img {
  width: auto;
  height: 100%;
  object-fit: contain;
  object-position: left bottom;
  opacity: 0.5;
}


/* - - - - - - - - - - - - - - - - - - - - */

.search-and-filter-wrp {
  position: absolute;
  top: 0;
  left: 0;
  width: min(480px, min(25%, calc((100% - 700px) / 2)));
  height: 100dvh;
  display: grid;
  align-items: end;
  justify-items: center;
  padding-bottom: 50px;
  pointer-events: none;
  z-index: 3;
}

.search-and-filter {
  width: 300px;
  height: 200px;
  display: grid;
  padding-top: 20px;
  align-content: start;
  row-gap: 20px;
  background-color: var(--bg-main-trsp);
  border: 1.2px solid ;
  border-color: #333;
  border-radius: 20px;
  pointer-events: auto;
}

/* - - - - - - - - - - - - - - - - - - - - */

input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  border: none;
  outline: none;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration,
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}


/* - - - - - - - - - - - - - - - - - - - - */

.search-box {
  position: relative;
  width: 93%;
  height: 40px;
  justify-self: center;
  display: grid;
  background-color: var(--hover);
  border-radius: 9999px;
}

.search-icon {
  position: absolute;
  top: 8px;
  left: 8px;
  color: #333;
}

.search-icon.is-typing {
  display: none;
}

.search-box-input {
  bottom: 12px;
  width: calc(100% - 50px);
  align-self: center;
  font-family: var(--m-plus-1p);
  font-size: 1rem;
  line-height: 1;
  padding-left: 35px;
}

.search-box-input.is-typing {
  padding-left: 16px;
}

.cancel-btn,
.submit-btn {
  position: absolute;
  top: 0px;
  right: 4px;
  width: 40px;
  height: 40px;
  display: none;
  place-items: center;
  cursor: pointer;
  outline: none;
}

@media (max-width: 1279px) {
  .cancel-btn.is-typing {
    display: grid;
  }
}

@media (min-width: 1280px) {
  .submit-btn.is-typing {
    display: grid;
  }
}

.cancel-btn-outline,
.submit-btn-outline {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, border 0.15s ease;
}

.cancel-btn:hover .cancel-btn-outline,
.cancel-btn:focus-visible .cancel-btn-outline,
.submit-btn:hover .submit-btn-outline,
.submit-btn:focus-visible .submit-btn-outline {
  outline: 1px solid ;
  outline-color: #333;
  background-color: var(--bg-main);
}

.cancel-btn svg,
.submit-btn svg {
  color: #333;
}


/* - - - - - - - - - - - - - - - - - - - - */

.category-filter {
  position: relative;
  width: 93%;
  height: 40px;
  justify-self: center;
  display: grid;
  grid-template-columns: 100px 1fr;
  font-family: var(--rubik);
  background-color: var(--hover);
  border-radius: 9999px;
}

.cat-fil-label {
  width: 100px;
  line-height: 1;
  align-self: center;
  padding-left: 15px;
}

.cat-fil-trigger {
  position: relative;
  width: 100%;
  outline: none;
  cursor: pointer;
  color: #333;
  display: grid;
}

.cat-fil-value {
  width: 100%;
  align-self: center;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  padding-right: 40px;
}

.open-cat-outline {
  position: absolute;
  top: 5px;
  right: 9px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, border 0.15s ease;
}

.category-filter.is-open .open-cat-outline {
  display: none;
}

.close-cat-outline {
  position: absolute;
  top: 5px;
  right: 9px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: none;
  place-items: center;
  transition: background-color 0.15s ease, border 0.15s ease;
}

.category-filter.is-open .close-cat-outline {
  display: grid;
}

.cat-fil-trigger:hover .open-cat-outline,
.cat-fil-trigger:focus-visible .open-cat-outline,
.cat-fil-trigger:hover .close-cat-outline,
.cat-fil-trigger:focus-visible .close-cat-outline {
  outline: 1px solid ;
  outline-color: #333;
  background-color: var(--bg-main);
}

.cat-fil-ul {
  position: absolute;
  right: 10px;
  bottom: 43px;
  width: 220px;
  max-height: 250px;
  display: none;
  padding: 5px;
  align-content: start;
  background-color: var(--bg-main);
  border: 1.2px solid ;
  border-color: #333;
  border-radius: 10px;
  overflow-y: scroll;
}

.category-filter.is-open .cat-fil-ul {
  display: grid;
}

.cat-fil-ul::-webkit-scrollbar-track {
  background: transparent; /* レール */
}

.cat-fil-ul::-webkit-scrollbar {
  width: 12px;
}

.cat-fil-ul::-webkit-scrollbar-thumb {
  background: #ddd; /* つまみ */
  border-radius: 9999px;
  border: 4px solid transparent;
  background-clip: content-box; 
}

/* Firefox */
@supports (-moz-appearance: none) {
  .cat-fil-ul {
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent; 
  }
}

.cat-fil-li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  line-height: 1.2;
  cursor: pointer;
}

.cat-fil-li::before {
  content: "";
  position: absolute;
  inset: 3px 2px;
  background: transparent;
  border-radius: 9999px;
  z-index: 0;
}

.cat-fil-li > * {
  position: relative;
  z-index: 1;
}

.cat-fil-li-check {
  display: none;
}

.cat-fil-li[aria-selected="true"] .cat-fil-li-check {
  display: inline-flex;
}

.cat-fil-li:focus-visible::before,
.cat-fil-li:hover::before {
  background-color: var(--hover-trsp);
}

.cat-fil-li:focus-visible {
  outline: none;
}


/* - - - - - - - - - - - - - - - - - - - - */

.result-count {
  padding-left: 20px;
  font-family: var(--rubik);
  font-size: 0.9rem;
}


/* ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍   col-2   ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ ◌ ◍ ● ◍ */

/* ----------------   resolut head   ---------------- */
.result-head {
  margin-top: 2.5cqw;
  width: 90cqw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--rubik);
  z-index: 1;
}

.rst-head-pagination {
  height: 30px;
  display: flex;
  gap: 15px;
  align-items: center;
  color: var(--hover);
}

.rst-head-btn-prev,
.rst-head-btn-next {
  display: inline-block;
  width: 30px;
  height: 30px;
  background-color: var(--bg-main);
  border: 1.2px solid ;
  border-color: var(--hover-trsp);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, border 0.15s ease;
}

.rst-head-btn-prev:not(.is-disabled):hover,
.rst-head-btn-prev:not(.is-disabled):focus-visible,
.rst-head-btn-next:not(.is-disabled):hover,
.rst-head-btn-next:not(.is-disabled):focus-visible {
  background-color: var(--hover);
  color: var(--bg-main);
}


/* - - - - - - - - - - - - - - - - - - - - */

.sort {
  position: relative;
  width: 110px;
  height: 30px;
  background-color: var(--bg-main);
  border: 1.2px solid ;
  border-color: var(--hover);
  border-radius: 9999px;
}

.sort-trigger {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  color: var(--hover);
  border-radius: 9999px;
  cursor: pointer;
}

.sort-trigger * {
  pointer-events: none;
}

.sort-value {
  width: 100%;
  align-self: center;
  font-size: 1rem;
  text-align: center;
  padding-left: 10px;
  padding-right: 27px;
}

.open-sort-outline {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, border 0.15s ease;
}

.sort.is-open .open-sort-outline {
  display: none;
}

.close-sort-outline {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
  place-items: center;
  transition: background-color 0.15s ease, border 0.15s ease;
}

.sort.is-open .close-sort-outline {
  display: grid;
}

.sort-trigger:hover .open-sort-outline,
.sort-trigger:focus-visible .open-sort-outline,
.sort-trigger:hover .close-sort-outline,
.sort-trigger:focus-visible .close-sort-outline {
  background-color: var(--hover);
  color: var(--bg-main);
}

.sort-ul {
  position: absolute;
  right: 5%;
  top: 33px;
  width: 120%;
  display: none;
  padding: 4px;
  align-content: start;
  background-color: var(--bg-main);
  border: 1.2px solid ;
  border-color: #333;
  border-radius: 10px;
}

.sort.is-open .sort-ul {
  display: grid;
}

.sort-li {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  cursor: pointer;
}

.sort-li * {
  pointer-events: none;
}

.sort-li::before {
  content: "";
  position: absolute;
  inset: 3px 2px;
  background: transparent;
  border-radius: 9999px;
  z-index: 0;
}

.sort-li > * {
  position: relative;
  z-index: 1;
}

.sort-li-check {
  display: none;
}

.sort-li[aria-selected="true"] .sort-li-check {
  display: inline-flex;
}

.sort-li:focus-visible::before,
.sort-li:hover::before {
  background-color: var(--hover-trsp);
}

.sort-li:focus-visible {
  outline: none;
}


/* ----------------   resolut posts   ---------------- */

.result-posts {
  margin-top: 2.7cqw;
  width: 94.6cqw;
  min-height: max(300px, calc(100dvh - 365px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.6cqw;
  row-gap: 2.7cqw;
}

.result-posts > * {
  --tile-scale: 1;         /* 平常時のスケール */
  transform: scale(var(--tile-scale));
  transform-origin: center center;
  transition: transform 0.2s ease;
  will-change: transform;
}


/* - - - - - - - - - - - - - - - - - - - - */

.no-page-blank {
  width: 90px;
  height: 24px;
}

.no-result {
  position: absolute;
  top: 300px;
  width: 100%;
  line-height: 1.7;
  font-family: var(--rubik);
  text-align: center;
  color: #888;
}

.no-result-blank {
  height: 80px;
}


/* ----------------   resolut foot   ---------------- */

.rst-foot-pagination {
  margin-top: 50px;
  height: 30px;
  display: flex;
  gap: 15px;
  align-items: center;
  color: var(--hover);
  font-family: var(--rubik);
}

.rst-foot-btn-first,
.rst-foot-btn-prev,
.rst-foot-btn-next,
.rst-foot-btn-last {
  display: inline-block;
  width: 30px;
  height: 30px;
  color: var(--hover);
  background-color: var(--bg-main);
  border: 1.2px solid ;
  border-color: var(--hover-trsp);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  white-space: nowrap;
  text-align: center;
  transition: background-color 0.15s ease, border 0.15s ease;
}

.rst-foot-btn-first:not(.is-disabled):hover,
.rst-foot-btn-first:not(.is-disabled):focus-visible,
.rst-foot-btn-prev:not(.is-disabled):hover,
.rst-foot-btn-prev:not(.is-disabled):focus-visible,
.rst-foot-btn-next:not(.is-disabled):hover,
.rst-foot-btn-next:not(.is-disabled):focus-visible,
.rst-foot-btn-last:not(.is-disabled):hover,
.rst-foot-btn-last:not(.is-disabled):focus-visible {
  background-color: var(--hover);
  color: var(--bg-main);
}


/* - - - - - - - - - - - - - - - - - - - - */

.is-disabled {
  pointer-events: none;
  cursor: default;
}

.rst-head-btn-prev.is-disabled,
.rst-head-btn-next.is-disabled,
.rst-foot-btn-first.is-disabled,
.rst-foot-btn-prev.is-disabled,
.rst-foot-btn-next.is-disabled,
.rst-foot-btn-last.is-disabled {
  pointer-events: none;
  cursor: default;
  color: var(--hover-trsp);
  background-color: var(--bg-main);
}





/* ▦ ▥ ▤ ▦ ▥ ▤ ▦   M: 幅500〜1279px（タブレットなど）   ▦ ▥ ▤ ▦ ▥ ▤ ▦ */

@media (min-width: 500px) and (max-width: 1279px) {

  .col-1-post-thumb {
    width: 100%;
    height: 540px;
    overflow: hidden;
  }

  .col-1-post-thumb img {
    width: 100%;
    height: 100%;
  }

  .search-and-filter-wrp {
    width: min(700px, 100%);
    height: 670px;
    justify-items: start;
    padding-bottom: 30px;
    padding-left: 30px;
  }


  /* - - - - - - - - - - - - - - - - - - - - */

  .result-posts {
    min-height: 300px;
  }

  .no-result {
    top: 230px;
  }

}


/* ▦ ▥ ▤ ▦ ▥ ▤ ▦   S: 幅499px 以下（スマホなど）   ▦ ▥ ▤ ▦ ▥ ▤ ▦ */

@media (max-width: 499px) {

  .col-1-post-thumb {
    width: 100%;
    height: calc(70vh - 80px);
    height: calc(70svh - 80px);
    overflow: hidden;
  }

  .search-and-filter-wrp {
    width: 100%;
    height: 70vh;
    height: 70svh;
    justify-items: start;
    padding-bottom: 20px;
    padding-left: 20px;
  }


  /* - - - - - - - - - - - - - - - - - - - - */

  .result-posts {
    margin-top: 4cqw;
    width: 92cqw;
    min-height: 300px;
    grid-template-columns: 1fr;
    row-gap: 4cqw;
  }

  .no-result {
    top: 250px;
  }

}
