/* style.css に追加 */

/* header */
.l-header__bar {
  color: #fff;
  background: linear-gradient(90deg, #e678a0 0%, #f8a2b0 100%);
}

.l-header {
  border-top: 4px solid transparent;
  background-image: linear-gradient(#fff, #fff),
    linear-gradient(90deg, #e678a0 0%, #f8a2b0 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* 検索フォーム */
.p-studentSearch {
  margin-bottom: 3rem;
  padding: 0;
  background: var(--color_bg_gray);
  border-radius: 8px;
}

.p-studentSearch__form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.p-studentSearch__basic {
  display: flex;
  gap: 1rem;
}

.p-studentSearch__field.-keyword {
  flex-grow: 1;
}

.p-studentSearch__field.-keyword input {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--color_border);
  border-radius: 4px;
}

.p-studentSearch__advanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.p-studentSearch__fieldTitle {
  font-weight: 700;
  margin-bottom: 1rem;
}

.c-checkLabel {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.c-checkLabel input[type="checkbox"] {
  margin-right: 0.5rem;
}

.p-studentSearch__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  /* margin-top: 2rem; */
}

/* 検索結果 */
.p-studentList__count {
  margin-bottom: 2rem;
  font-weight: 700;
}

.p-studentList__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.p-studentCard {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 20px;
}

.p-studentCard:hover {
  /* transform: translateY(-4px); */
}

.p-studentCard__inner {
  padding: 20px;
}

.p-studentCard__header {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.p-studentCard__thumb {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  margin: 0;
}

.p-studentCard__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.p-studentCard__meta {
  flex: 1;
}

.p-studentCard__name {
  font-size: 1.4em;
  margin: 0 0 10px;
}

.p-studentCard__age,
.p-studentCard__location {
  margin: 5px 0;
  color: #666;
}

.p-studentCard__body {
  margin-bottom: 20px;
}

.p-studentCard__hobbies,
.p-studentCard__groups {
  margin-bottom: 15px;
}

.p-studentCard__hobbies h4,
.p-studentCard__groups h4 {
  font-size: 1em;
  margin: 0 0 10px;
  color: #666;
}

.p-studentCard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.c-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8em;
  background: var(--color_bg_gray);
  border-radius: 100px;
}

.c-tag.-group {
  background: var(--color_main);
  color: #fff;
}

.p-studentCard__footer {
  text-align: center;
}

/* ページネーション */
.p-pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.p-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  background: #fff;
  border: 1px solid var(--color_border);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.p-pagination .page-numbers.current {
  background: var(--color_main);
  color: #fff;
  border-color: var(--color_main);
}

.p-pagination .page-numbers:hover {
  background: var(--color_bg_gray);
}

/* 空の検索結果 */
.p-studentList__empty {
  text-align: center;
  padding: 3rem;
  background: var(--color_bg_gray);
  border-radius: 8px;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .p-studentSearch {
    padding: 1.5rem;
  }

  .p-studentSearch__basic {
    flex-direction: column;
  }

  .p-studentList__grid {
    grid-template-columns: 1fr;
  }

  .p-studentCard__header {
    flex-direction: column;
    text-align: center;
  }

  .p-studentCard__meta {
    text-align: center;
  }

  .p-studentCard__thumb {
    margin: 0 auto;
  }
}

/* SWELLテーマとの調和 */
.p-studentSearch .c-btn {
  min-width: 200px;
}

.p-studentSearch .c-btn.-primary {
  background: linear-gradient(90deg, #e678a0 0%, #f8a2b0 100%);
  color: #fff;
  border: none;
}

.p-studentSearch .c-btn.-secondary {
  background: var(--color_text_sub);
  color: #fff;
}

/* フォーム全体のスタイル */
.wpcf7-form {
  max-width: 600px;
  margin: 2rem auto;
  /* padding: 2rem; */
  background: #ffffff;
  /* border-radius: 12px; */
  /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); */
}

/* ラベルのスタイル */
.wpcf7-form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
  color: #374151;
  font-size: 0.95rem;
}

/* 入力フィールドの共通スタイル */
.wpcf7-form-control:not(.wpcf7-submit) {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0;
  padding: 1rem;
  border: 1px solid var(--color_border);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s ease-in-out;
}

/* フォーカス時のスタイル */
.wpcf7-form-control:not(.wpcf7-submit):focus {
  outline: none;
  border-color: #e678a0;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* テキストエリアのスタイル */
.wpcf7-textarea {
  min-height: 150px;
  resize: vertical;
}

/* 送信ボタンのスタイル */
.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background-color: #e678a0;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.wpcf7-submit:hover {
  background-color: #e678a0;
}

/* スピナーのスタイル */
.wpcf7-spinner {
  margin-left: 1rem;
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  display: none;
}

.submitting .wpcf7-spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* エラーメッセージのスタイル */
.wpcf7-not-valid-tip {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.wpcf7-response-output {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* 必須項目のスタイル */
[aria-required="true"] {
  background-color: #fafafa;
}

/* レスポンシブデザイン */
@media (max-width: 640px) {
  .wpcf7-form {
    padding: 1.5rem;
    margin: 1rem;
  }
}

/* マイページ */
.profile-form-wrapper {
  max-width: 800px;
  margin: 2em auto;
  /* padding: 20px; */
}

/* アバターセクション */
.avatar-section {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.current-avatar {
  margin-bottom: 15px;
}

.current-avatar img {
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.upload-avatar-button {
  background: linear-gradient(90deg, #e678a0 0%, #f8a2b0 100%);
  color: white;
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.field-group {
  flex: 1;
  min-width: 200px;
}

.field-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

.field-group input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* ACFフォーム */
.acf-form {
  background: #fff;
  /* padding: 20px; */
  /* border-radius: 8px; */
  /* box-shadow: 0 0 10px rgba(0,0,0,0.1); */
}

.acf-field {
  /* margin-bottom: 20px; */
  padding: 15px 0 !important;
}

.acf-required {
  color: #e678a0;
}

.acf-label {
  margin-bottom: 3px;
}

.acf-field label {
  font-weight: 500;
  color: #4e4545;
  display: block;
}

.acf-field input[type="text"],
.acf-field textarea {
  width: 100%;
  padding: 1rem !important;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.acf-field textarea {
  min-height: 120px;
}

.acf-field-radio .acf-radio-list,
.acf-field-checkbox .acf-checkbox-list {
  padding: 10px 0;
  list-style: none;
}

input[type="radio"] {
  margin-right: 8px;
  display: inline-block;
}

.acf-field-radio .acf-radio-list li,
.acf-field-checkbox .acf-checkbox-list li {
  margin-bottom: 8px;
}

.acf-form-submit {
  text-align: center;
  margin-top: 30px;
}

.button-primary {
  background: linear-gradient(90deg, #e678a0 0%, #f8a2b0 100%);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.button-primary:hover {
  background: linear-gradient(90deg, #e678a0 0%, #f8a2b0 100%);
  opacity: 0.8;
}

.acf-notice {
  margin: 15px 0;
  padding: 15px;
  border-radius: 4px;
}

.acf-notice.-success {
  background: #dff0d8;
  color: #e678a0;
  border: 1px solid #d6e9c6;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .profile-form-wrapper {
    /* margin: 1em; */
    padding: 15px;
  }

  .name-fields {
    flex-direction: column;
    gap: 15px;
  }

  .field-group {
    width: 100%;
  }

  .acf-field {
    padding: 10px 0 !important;
  }
}

.updated {
  background: linear-gradient(90deg, #e678a0 0%, #f8a2b0 100%);
  border-radius: 4px;
  padding: 10px 16px;
  color: #fff;
  margin: 0px 0 30px;
}

/* BBPress */
.bbp-user-profile {
  font-size: 15px;
  line-height: 1.8;
}

#bbpress-forums #bbp-user-wrapper h2.entry-title {
  font-size: 1.4em;
  margin: 0 0 30px;
  padding: 10px !important;
}

#bbpress-forums hr {
  padding: 5px 0;
}


.bbp-search-form {
  margin-bottom: 20px;
}

.bbp-body {
  font-size: 14px;
}

#bbpress-forums .bbp-forum-info .bbp-forum-content, #bbpress-forums p.bbp-topic-meta {
  font-size: 13px;
}

.bbp-template-notice.info {
  margin: 35px 0 15px !important;
}

.bbp-template-notice.error {
  margin: 35px 0 15px !important;
}

.um-profile .um-profile-body {
  display: none !important;
}

/* ユーザープロフィール表示 */
.p-userProfile {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.p-userProfile__header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem 2rem 0;
  /* background: linear-gradient(90deg, #e678a0 0%, #f8a2b0 100%); */
  /* color: #e678a0; */
  color: #4e4545;
}

.p-userProfile__avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.p-userProfile__name {
  font-size: 1.6em;
  margin: 0 0 0.5rem;
}

.p-userProfile__name i {
  position: relative;
  top: 5px;
}

.p-userProfile__basicInfo {
  font-size: 1.1em;
  margin: 0;
  opacity: 0.9;
}

.p-userProfile__content {
  padding: 2rem;
}

.p-userProfile__section {
  margin-bottom: 2rem;
}

.p-userProfile__section h3 {
  font-size: 1.2em;
  color: #333;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.p-userProfile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.p-userProfile__dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  margin: 0;
}

.p-userProfile__dl dt {
  font-weight: bold;
  color: #666;
}

.p-userProfile__dl dd {
  margin: 0;
}

.p-userProfile__text {
  margin: 1rem 0;
  line-height: 1.8;
  white-space: pre-wrap;
}

.c-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f0f0;
  border-radius: 16px;
  font-size: 0.9em;
  color: #666;
}

.c-tag.-group {
  background: #ffe4e9;
  color: #e678a0;
}

@media (max-width: 768px) {
  .p-userProfile__header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .p-userProfile__dl {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .p-userProfile__dl dt {
    margin-top: 1rem;
  }
}

.p-userProfile__name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.p-userProfile__name .line-icon {
  color: #00B900; /* LINE公式カラー */
}

.p-userProfile__name .fab.fa-line {
  color: #00B900;
  font-size: 1.2em;
}

div.uimob960 .um-profile-photo a.um-profile-photo-img {
  position: static !important;
  margin-top: -20px !important;
}

.c-btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  padding: 12px 30px;
  border-radius: 4px;
  font-size: 16px;
  transition: opacity 0.3s;
}

.c-btn--primary {
  background: linear-gradient(90deg, #e678a0 0%, #f8a2b0 100%);
  color: white;
  border: none;
}

.c-btn--primary:hover {
  opacity: 0.8;
  color: white;
  text-decoration: none;
}

.p-studentSearch__field-hobbies-list,
.profile-hobby-lists {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;

  &::before {
    content: none !important;
  }
}

.um-field-area {
  padding-bottom: 14px !important;
}

.um input[type=submit].um-button {
  background: linear-gradient(90deg, #e678a0 0%, #f8a2b0 100%) !important;
}