/*
 Theme Name:   EVERY TCD075 Child
 Theme URI:
 Description:  EVERY TCD075 の子テーマです。オンラインサロン用に機能を拡張します。
 Author:       airship
 Author URI:   http://airshipjp.com/
 Template:     every_tcd075
 Version:      3.3.0
*/

/* ここより下に独自のCSSを記述していきます */

/* --- 【最終タスク】サイドバーウィジェットのデザイン改善 --- */
.airship_child_category_list_widget .widget_headline {
    padding: 0 25px 0 85px;
    position: relative;
}

.airship_child_category_list_widget .widget_headline:before {
    /* Base structure for the icon */
    position: absolute;
    top: -1px;
    left: -1px;
    width: 60px;
    height: 60px;
    
    /* Google Icon specific styles */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px; /* Optimal size for Material Symbols */
    font-weight: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hide parent theme's triangle */
.airship_child_category_list_widget .widget_headline:after {
    display: none;
}

/* --- 【最終タスク】フッター用ウィジェットのスタイル --- */
#footer_widget .airship_child_category_list_footer_widget .tcd_category_list li {
    margin: 0 0 15px 0;
    line-height: 1.5;
}
#footer_widget .airship_child_category_list_footer_widget .tcd_category_list li a {
    background: none;
    border: none;
    padding: 0;
    height: auto;
    line-height: 1.5;
    color: #fff;
}
#footer_widget .airship_child_category_list_footer_widget .tcd_category_list li a:hover {
    opacity: 0.8;
    color: #fff;
}

/* --- マイページのランク表示スタイル調整 --- */

/* ユーザー情報表示エリアの幅を親テーマの固定値から自動に変更 */
body.membership-mypage #my_account_header .user_info {
    width: auto;
}

/* ユーザー名とランク表示エリアが利用可能なスペースを埋めるように拡張 */
body.membership-mypage #my_account_header .name_area {
    flex-grow: 1;
}

/* 「獲得ポイント」の末尾にある「P」の改行を禁止 */
.user-rank-info .rank-points {
    white-space: nowrap;
}

/* ★★★ 以下を最終版に更新 ★★★ */
.user-rank-info {
    margin-top: 10px;
}
.user-rank-info .rank-label {
    font-size: 13px;
    color: #555;
    font-weight: bold;
}
.user-rank-info .rank-name {
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    margin-top: 8px; /* ← 8pxに修正 */
}
.user-rank-info .rank-name img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}
.user-rank-info .rank-points {
    font-size: 13px;
    color: #555;
    font-weight: bold;
    margin-top: 8px;
}

/* --- トップページのカスタム投稿リストのスタイル --- */
.home_custom_widget_area .custom-post-list-wrapper {
    padding: 0 20px; /* 左右に20pxの余白を追加 */
}

/* --- トップページ専用ウィジェットエリアのデザイン調整 --- */

/* ウィジェット全体の背景や余白 */
.home_custom_widget_area .widget {
  background: #ffffff; /* 背景色を白に */
  padding: 20px;
  margin-bottom: 30px;
}

/* --- トップページ新着ブログのサムネイル比率を修正 (最終版) --- */
.index_blog .recipe_list.type2 .item .image {
    height: 0 !important; /* 親テーマの固定の高さをリセット */
    padding-bottom: 56.25% !important; /* アスペクト比 16:9 を設定 */
}

/* --- トップページ新着ブログのアイテム全体の高さを自動調整 --- */
.index_blog .recipe_list.type2 .item {
    height: auto !important; /* 親テーマの固定高さを解除 */
}

/* --- ポイント・ランク設定ページのタブコンテンツの余白を統一 --- */
.wrap .tab-content {
    margin-top: 1.5em;
}

/* --- 【新規追加】ヘッダーの会員登録ボタンを非表示にする --- */
#header_register {
    display: none !important;
}

/* --- 【新規追加】独立した会員登録フォームのスタイル --- */
.tcd-membership-form-wrapper {
    max-width: 600px; /* フォームの最大幅を少し広げます */
    margin: 40px auto;
    padding: 40px; /* 余白を調整 */
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* 僅かな影を追加 */
}
.tcd-membership-form-item {
    margin-bottom: 20px;
}
.tcd-membership-form-item label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}
.tcd-membership-form-item .input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* paddingを含めて幅を100%に */
}
.tcd-membership-form-item .input:focus {
    border-color: #ff8000; /* 親テーマのアクセントカラー */
    outline: none;
}
.tcd-membership-form-item .description {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
}
.tcd-membership-form-error {
    background-color: #f2dede;
    border: 1px solid #eed3d7;
    color: #b94a48;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.tcd-membership-form-button {
    width: 100%;
    padding: 15px;
    background-color: #ff8000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
}
.tcd-membership-form-button:hover {
    background-color: #e67300;
}

/* パスワード可視化アイコンのスタイル */
.password-wrapper {
    position: relative;
}
.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    user-select: none; /* アイコンのテキスト選択を無効化 */
}
.tcd-membership-form-item.password-wrapper .input {
    padding-right: 50px; /* アイコンとテキストが重ならないように調整 */
}

/* --- 【新規追加】利用規約チェックボックスのスタイル --- */
.tos-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
.tos-wrapper input[type="checkbox"] {
    margin-right: 10px;
    width: auto; /* 幅を自動に */
}
.tos-wrapper label {
    margin-bottom: 0; /* ラベルの下マージンをリセット */
    font-weight: normal; /* 太字を解除 */
}
.tos-wrapper label a {
    text-decoration: underline;
    color: #ff8000;
}
.tos-wrapper label a:hover {
    text-decoration: none;
}

/* --- 【新規追加】利用規約モーダルのスタイル --- */
#tos-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
}
#tos-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background-color: #fff;
    padding: 40px;
    border-radius: 5px;
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
#close-tos-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #777;
    line-height: 1;
}
#tos-modal-body {
    overflow-y: auto; /* 内容が多ければスクロール */
}
#tos-modal-body h1, #tos-modal-body h2, #tos-modal-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* --- 独立した会員登録フォームのスタイル --- */
.tcd-membership-form-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.tcd-membership-form-item {
    margin-bottom: 20px;
}
.tcd-membership-form-item label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}
.tcd-membership-form-item .input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.tcd-membership-form-item .input:focus {
    border-color: #ff8000;
    outline: none;
}
.tcd-membership-form-item .description {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
}
.tcd-membership-form-error {
    background-color: #f2dede;
    border: 1px solid #eed3d7;
    color: #b94a48;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.tcd-membership-form-button {
    width: 100%;
    padding: 15px;
    background-color: #ff8000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
}
.tcd-membership-form-button:hover {
    background-color: #e67300;
}

/* ★★★ パスワード可視化アイコンのスタイル（修正版） ★★★ */
.password-input-wrapper {
    position: relative;
}
.password-input-wrapper .toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    user-select: none;
}
.password-input-wrapper .input {
    padding-right: 50px;
}

/* --- 利用規約チェックボックスのスタイル --- */
.tos-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
.tos-wrapper input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
}
.tos-wrapper label {
    margin-bottom: 0;
    font-weight: normal;
}
.tos-wrapper label a {
    text-decoration: underline;
    color: #ff8000;
}
.tos-wrapper label a:hover {
    text-decoration: none;
}

/* --- 利用規約モーダルのスタイル --- */
#tos-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
}
#tos-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background-color: #fff;
    padding: 40px;
    border-radius: 5px;
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
#close-tos-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #777;
    line-height: 1;
}
#tos-modal-body {
    overflow-y: auto;
}
#tos-modal-body h1, #tos-modal-body h2, #tos-modal-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}