@charset "utf-8";

@import url(destyle.css);
@import url(variable.css);
@import url(base.css);
@import url(component.css);
@import url(layout.css);
@import url(comment.css);
@import url(utility.css);

/* メインコンテンツ */

/* ログインページ */
.p-login {
  max-width: 600px;
  padding: 160px 20px 60px;
  margin-right: auto;
  margin-left: auto;
}

.p-login-form {
  margin-top: 32px;
}

.p-login-form-content {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 4px;
}

.p-login-form-content dd {
  margin-bottom: 20px;
}

.p-login-form-content input {
  padding: 8px 12px;
  width: 100%;
  line-height: 1.4;
  border: 1px solid var(--c-gray-light);
  border-radius: 4px;
}

.p-login-form-submit {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.p-login-form-submit button {
  padding: 12px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--c-white);
  background-color: var(--c-main);
  border-radius: 4px;
  min-width: 200px;
}

.p-login-panel {
  padding: 40px 100px 100px;
  border-radius: 30px;
  background-color: #fff;
}

@media (max-width: 768px) {
  .p-login {
    padding-top: 80px;
  }

  .p-login-panel {
    padding: 40px;
  }
}

/* ダッシュボード */
.p-home-panel-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 48px;
}

.p-home-panel {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
}

.p-home-panel.p-home-panel--wide {
  grid-column: span 2;
}

.p-home-panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 10px;
}

.p-home-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(18px, 4vw, 22px);
  font-weight: bold;
}

.p-home-panel-title img {
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
}

.p-home-panel-more {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-left: auto;
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 400;
}

.p-home-panel-more::after {
  content: "";
  -webkit-mask: var(--svg-icon-arrow) no-repeat center / contain;
  mask: var(--svg-icon-arrow) no-repeat center / contain;
  width: 8px;
  height: 13px;
  background-color: currentColor;
}

.p-home-panel-body {
  flex-grow: 1;
  padding: 20px 30px;
  border-radius: 10px;
  background-color: #fff;
}

@media (max-width: 1024px) {
  .p-home-panel {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .p-home-panel:not(.p-home-panel--sm-show) {
    display: none;
  }
}

/* 投稿表示 */
.p-home-loop {
}

.p-loop-item {
}

.p-loop-item:not(:last-child) {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #aeaeae;
}

.p-loop-item__link {
  position: relative;
  display: block;
  padding-right: 20px;
}

.p-loop-item__link::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 8px;
  translate: 0 -50%;
  -webkit-mask: var(--svg-icon-arrow) no-repeat center / contain;
  mask: var(--svg-icon-arrow) no-repeat center / contain;
  width: 8px;
  height: 13px;
  background-color: #2b2b2b;
}

/* 投稿メタ情報 */
.p-post-info {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 8px;
}

.p-post-info > * {
  min-width: fit-content;
}

.p-post-date {
  color: #717171;
  font-size: 10px;
  font-weight: 400;
}

.p-post-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
}

.p-post-term {
  padding: 0 4px;
  border-radius: 2px;
  background-color: var(--c-font);
  color: #fff;
}

.p-post-title {
  font-size: 15px;
  font-weight: 500;
}

.p-post-desc {
  margin-top: 0.5em;
  font-size: 13px;
  font-weight: 400;
}

/* 詳細ページ */
.p-post-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #ddd;
}

.p-post-detail-title {
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 500;
}

/* Thank you! */
.p-thankyou-post-title {
  margin-bottom: 8px;
  font-size: 14px;
}

.p-thankyou-post-staff {
  display: flex;
  gap: 20px;
}

.p-thankyou-post-avatar {
  text-align: center;
}

.p-thankyou-post-avatar img {
  width: 48px;
  border-radius: 5px;
}

.p-thankyou-post-avatar figcaption {
  margin: 6px -8px 0;
  font-size: 10px;
  font-weight: 400;
}

.p-thankyou-post-from-to {
  align-self: center;
  width: 8px;
  height: 12px;
  margin-bottom: 20px;
  margin-left: 2px;
  background-color: var(--c-main);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.p-thankyou-loop-item__text {
  margin-top: 0.5em;
  font-size: 12px;
}

/* アイデアBOX */
.p-create .c-btn {
  border: none;
}

.p-create .acf-field {
  padding: 16px 0 !important;
}

.p-create .acf-field input[type="text"] {
  font-size: 1rem;
}

.p-create .acf-button {
  margin: 0 8px;
  color: var(--c-link);
  font-size: rem(14);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.p-create .wp-switch-editor.switch-html {
  display: none;
}

/* 送信完了 */
.p-create__updated-message {
  margin-bottom: clamp(24px, 6vw, 32px);
  padding: 1rem 1.5rem;
  background-color: #efe;
}

/* ページネーション */
.p-pagination {
  margin: clamp(28px, 5vw, 50px) auto 0;
  max-width: fit-content;
}

.p-pagination__inner {
  display: flex;
  gap: 16px;
}

.p-pagination__prev--dummy,
.p-pagination__next--dummy {
  opacity: 0;
  visibility: hidden;
}

.p-pagination__prev-link,
.p-pagination__next-link,
.p-pagination__link {
  display: inline-grid;
  place-content: center;
  width: 32px;
  height: 32px;
  padding-bottom: 2px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background-color: #fff;
  color: var(--c-main);
  font-size: 16px;
  font-weight: normal;
}

.p-pagination__prev-link.-current,
.p-pagination__next-link.-current,
.p-pagination__link.-current,
.p-pagination__prev-link:hover,
.p-pagination__next-link:hover,
.p-pagination__link:hover,
.p-pagination__prev-link:focus,
.p-pagination__next-link:focus,
.p-pagination__link:focus {
  border-color: transparent;
  background-color: var(--c-main);
  color: #fff;
}

.p-pagination__prev-link::before {
  content: "<";
}

.p-pagination__next-link::before {
  content: ">";
}

/* スタッフ情報 */
.p-users-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.p-users-panel {
}

.p-user-panel-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 15px;
}

.p-user-panel__avatar {
}

.p-user-panel__avatar img {
  width: 60px;
  border-radius: 5px;
  aspect-ratio: 1;
}

.p-user-panel__name {
  font-size: clamp(20px, 4.5vw, 24px);
  font-weight: bold;
}

.p-user-panel__name::after {
  content: "さん";
  margin-left: 4px;
  font-size: clamp(13px, 3vw, 16px);
  letter-spacing: 0.1em;
}

.p-user-panel__position {
  font-size: clamp(12px, 2.5vw, 14px);
  font-weight: 400;
}

.p-user-panel__position span:not(:last-child)::after {
  content: " /";
}

/* ポイントパネル全体 */
.p-user-panel-points-panel {
  margin-top: 20px;
  padding: 20px 15px;
  border-radius: 5px;
  background-color: #fff;
}

/* 1. 利用可能ポイント（最重要） */
.p-user-panel-points__total {
  text-align: center;
  padding-bottom: 1em;
  border-bottom: 2px solid var(--c-main);
  margin-bottom: 1em;
}

.p-user-panel-points__total .label {
  font-size: clamp(14px, 3vw, 16px);
  font-weight: 700;
  color: #333;
}

.p-user-panel-points__total .value {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.2em;
  line-height: 1;
  margin-top: 0.2em;
  color: var(--c-main);
}

.p-user-panel-points__total .num {
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 700;
}

.p-user-panel-points__total .unit {
  font-size: clamp(14px, 3vw, 16px);
  font-weight: 700;
}

/* 2. 獲得サマリー（補足情報） */
.p-user-panel-points__acquired-summary {
  display: flex; /* ★★★ 横並びにする */
  gap: 15px; /* ボックス間の隙間 */
  margin-bottom: 1.5em;
  text-align: center;
}

.p-user-panel-points__acquired-item {
  flex: 1;
  padding: 1em 0.5em;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.p-user-panel-points__acquired-item .label {
  display: block;
  font-size: 12px;
  color: #555;
  margin-bottom: 0.25em;
}

.p-user-panel-points__acquired-item .value {
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 700;
  line-height: 1;
  color: #333;
}

.p-user-panel-points__acquired-item .unit {
  font-size: 0.6em;
  font-weight: normal;
}

/* 3. 内訳（開閉式） */
.p-user-panel-points__details {
  margin-bottom: 1.5em;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden; /* 角丸をキレイに見せるため */
}

.p-user-panel-points__details[open] {
  border-bottom: 1px solid #e0e0e0;
}

.p-user-panel-points__details-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  cursor: pointer;
  padding: 0.8em 1em;
  background-color: #f7f7f7;
  transition: background-color 0.2s;
  user-select: none; /* テキスト選択を無効化 */
}

/* ブラウザデフォルトの三角アイコンを消す */
.p-user-panel-points__details-summary::-webkit-details-marker,
.p-user-panel-points__details-summary::marker {
  display: none;
}

/* 開閉アイコンの追加 */
.p-user-panel-points__details-summary::after {
  content: "▼";
  font-size: 0.8em;
  color: #555;
  transition: transform 0.2s;
  transform: rotate(0deg);
}

.p-user-panel-points__details[open] > .p-user-panel-points__details-summary::after {
  transform: rotate(180deg);
}

.p-user-panel-points__details-summary:hover {
  background-color: #e9e9e9;
}

.p-user-panel-points__details-content {
  margin-top: 0;
  padding: 1em;
  border-left: none; /* 既存の左線を削除 */
  border-top: 1px solid #e0e0e0;
}

/* 3-a. 内訳リスト本体 */
.p-user-panel-points {
  font-size: clamp(12px, 2.5vw, 14px);
  font-weight: 500;
}
.p-user-panel-points__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
.p-user-panel-points__row:last-child {
  border-bottom: none;
}
.p-user-panel-points__row .num {
  color: var(--c-main);
  font-size: clamp(15px, 3vw, 18px);
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

/* 4. アクションボタン */
.p-user-panel-points__actions {
  margin-top: 25px;
  text-align: center; /* 全体を中央揃えに */
}

/* プライマリーボタン（一番目立たせたいアクション） */
.cps-button--primary {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: var(--c-main, #0073aa); /* テーマのメインカラーがあれば使い、なければデフォルト色 */
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-radius: 5px;
  transition: opacity 0.2s;
}
.cps-button--primary:hover {
  opacity: 0.8;
  color: #fff;
}

/* セカンダリーリンク（補足的なアクション） */
.cps-link--secondary {
  display: inline-block;
  margin-top: 15px; /* プライマリーボタンとの間隔 */
  font-size: 13px;
  color: #555;
  text-decoration: underline;
}
.cps-link--secondary:hover {
  color: #000;
}

/* プロフィール */
.p-users-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 20px 15px;
  border-radius: 5px;
  background-color: #fff;
}

.p-users-profile__row {
  font-size: clamp(12px, 2.5vw, 16px);
}

.p-users-profile__title {
  margin-bottom: 4px;
  color: var(--c-main);
  font-weight: 500;
}

.p-users-profile__content {
  padding: 4px 10px;
  background-color: #f4f4f4;
}

.p-users-profile__department {
  white-space: nowrap;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.p-users-list {
  width: 100%;
  margin: 32px auto;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 12px;
}

.p-users-list__item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: first baseline;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-gray-light);
  font-weight: 700;
}

.p-users-list__link {
  text-underline-offset: 3px;
  font-size: calc_clamp(16, 18);
}

.p-users-list__link:hover,
.p-users-list__link:focus-visible {
  text-decoration: underline;
}

.p-users-list__title {
  width: 150px;
  color: var(--c-main);
  text-align: right;
}

/* 	検索
---------------------------------------------*/
.p-users-list-filter {
  margin: 12px auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.p-users-list-filter__link {
  display: block;
  padding: 0.5em;
  border: 1px solid #aaa;
  border-radius: 3px;
  background-color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  transition: 0.3s;
  transition-property: background-color, color;
}

.p-users-list-filter__link:hover,
.p-users-list-filter__link:focus,
.p-users-list-filter__link.is-active {
  border-color: transparent;
  background-color: var(--c-main);
  color: #fff;
}

/* 	パスワード保護ページ
---------------------------------------------*/
.post-password-form {
}

.post-password-form > p + p {
  margin-top: 1em;
}

.post-password-form input[type="password"] {
  padding: 0.25em 0.5em;
  border: 1px solid #ccc;
}

.post-password-form input[type="submit"] {
  padding: 0.25em 0.5em;
  border: 1px solid transparent;
  background-color: var(--c-accent);
  color: #fff;
}
