/**
 * CSS File: rn-toolbtn.css
 * 2026-05-19 | Final checked
 */

.u-show-pc {
  display: none;
}

.u-show-sp {
  display: inline;
}

@media screen and (min-width: 768px) {
  .u-show-pc {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .u-show-sp {
    display: none;
  }
}

.c-toolbtn {
  position: fixed;
  bottom: 50px;
  left: 0;
  right: 0;
  width: 100%;
  margin-bottom: 5px;
  z-index: var(--z_990-tool);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  gap: 8px;
}

.c-toolbtn.is-show {
  opacity: 1;
  visibility: visible;
}

.c-toolbtn__item,
.c-toolbtn__breadcrumb,
.c-toolbtn__sns-wrapper {
  pointer-events: auto;
}

.c-toolbtn__breadcrumb {
  background-color: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 0.6875rem;
  margin-top: 10px;
  padding: 8px 14px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex: 0 1 auto;
  width: fit-content;
  max-width: calc(100% - 120px);
  display: flex;
  align-items: center;
  line-height: 1;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: breathe 2.5s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  50% {
    opacity: 1;
    box-shadow: 0 2px 15px rgba(255, 255, 255, 0.3);
  }
}

.c-toolbtn__breadcrumb-path {
  opacity: 0.7;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 4px;
}

.c-toolbtn__breadcrumb-current {
  font-weight: bold;
  flex-shrink: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.current-text {
  display: inline-block;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}

.c-toolbtn__sns-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.c-toolbtn__sns-list {
  display: flex;
  gap: 8px;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s ease;
}

.c-toolbtn__sns-wrapper.is-open .c-toolbtn__sns-list {
  max-width: 300px;
  opacity: 1;
  margin-right: 4px;
}

.c-toolbtn__item {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 25%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.c-toolbtn__item.--toggle {
  background-color: #ffffff;
  color: #333;
  font-size: 0.5625rem;
  font-weight: bold;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.c-toolbtn__item.--back-to-top {
  margin-left: auto;
  background-color: #004098;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.c-toolbtn__item.--sns {
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 4px 10px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(1px);
}

.c-toolbtn__item.--sns:hover {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.1) 60%,
    rgba(0, 0, 0, 0.3) 100%
  );
  box-shadow:
    inset 0 -1px 3px rgba(0, 0, 0, 0.1),
    inset 0 0 10px rgba(255, 255, 255, 0.6),
    0 8px 20px rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

.c-toolbtn__item.--sns img {
  height: auto;
  max-width: 95%;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

@media screen and (min-width: 768px) {
  .c-toolbtn {
    bottom: 55px;
    padding: 0 30px 0 5px;
    gap: 12px;
  }

  .c-toolbtn__sns-list {
    max-width: none;
    opacity: 1;
    overflow: visible;
    gap: 12px;
  }

  .c-toolbtn__item.--toggle {
    display: none;
  }

  .c-toolbtn__item {
    width: 56px;
    height: 56px;
    font-size: 1rem;
  }

  .c-toolbtn__item.--sns img {
    transform: scale(1.3);
  }

  .c-toolbtn__breadcrumb {
    flex: 0 1 auto;
    max-width: calc(100% - 250px);
    font-size: 0.75rem;
  }
}

/* アクセシビリティ */
/* .c-toolbtn__item.--back-to-top:focus-visible {
  outline: 3px solid #0066cc !important;
  outline-offset: 3px;
  transform: scale(1.05);
}

.c-toolbtn__breadcrumb-path a:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 1px;
  background-color: rgba(255, 255, 255, 0.2);
}

.c-toolbtn__item:focus:not(:focus-visible),
.c-toolbtn__breadcrumb-path a:focus:not(:focus-visible) {
  outline: none;
} */
