/*
	Theme Name: diver_child
	Template: diver
	Description:  Diverの子テーマです。
	Theme URI: http://tan-taka.com/diver/
	Author: Takato Takagi
	Version: 2.1.2

 */

/* 
Last Update: 2025-10-29
Note: https://misato-derma.or.jp/
カスタマイズする場合にはこれより下に追記してください  */

/***エディターモード メッセージ非表示**/
.global-editor-panel #message.updated {
  display: none;
}

/***エディターモードボタン**/
.tnh-editor-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #222;
  color: #fff;
  text-align: center;
  padding: 8px 0;
  z-index: 9999;
}
.tnh-editor-bar a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
}
body.admin-bar .tnh-editor-bar {
  top: 32px; /* 管理バーがあるときの対応 */
}

#wp-admin-bar-tnh_editor_toggle > .ab-item {
  background-color: #ff0044 !important;  /* 赤背景 */
  color: #fff !important;                /* 白文字 */
  font-weight: bold;
  border-radius: 4px;
  padding: 2px 8px;
}


/**カラーパネルの表示**/
.color-swatch-group {
  margin-bottom: 20px;
}
.color-swatch-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.color-swatch {
  width: 100px;
  height: 60px;
  border-radius: 6px;
  padding: 6px;
  box-sizing: border-box;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 0 4px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.color-swatch span {
  font-size: 10px;
  font-weight: normal;
}


/* mainコンテンツの影を削除 */
/* すべてのbox-shadowをmain関連から削除 */
#main-wrap,
.l-main-container,
#page-main,
#main-wrap *,
.l-main-container *,
#page-main * {
  box-shadow: none !important;
}
#main-wrap,
.l-main-container,
#page-main {
  border: none !important;
  filter: none !important;
}

/* h1見出しの下のライン装飾を削除 */
.entry-title,
h1 {
  border-bottom: none !important;
  box-shadow: none !important;
  background: none !important;
}
.entry-title::before,
.entry-title::after,
h1::before,
h1::after {
  content: none !important;
  display: none !important;
}

/* === モーダルオーバーレイ（全画面黒半透明） === */
.tnh-modal-overlay {
  position: fixed;  /* ←重要 */
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);  /* ←黒半透明 */
  z-index: 9999;
}

/* === モーダルボックス（中央の白枠） === */
.tnh-modal-box {
  background: #fff;
  max-width: 800px;
  width: 90%;
  margin: 50px auto;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  top: 50%;                 /* ←中央に配置する */
  transform: translateY(-50%);
}


/* === フォントタイプ === */
body.font-noto_sans_jp {
  font-family: 'Noto Sans JP', sans-serif;
}
body.font-m_plus_rounded_1c {
  font-family: 'M PLUS Rounded 1c', sans-serif;
}
body.font-roboto {
  font-family: 'Roboto', sans-serif;
}
body.font-noto_serif_jp {
  font-family: 'Noto Serif JP', serif;
}
body.font-yu_gothic {
  font-family: "Yu Gothic", "游ゴシック体", sans-serif;
}
body.font-hiragino {
  font-family: "Hiragino Kaku Gothic ProN", sans-serif;
}
body.font-meiryo {
  font-family: "Meiryo", sans-serif;
}
body.font-cabin {
  font-family: 'Cabin', sans-serif;
}


/* トグルの下三角装飾を無効化 */
.ib.sc_toggle_title::before {
  content: none !important;
}

/* =========================
   編集ボタン（フロント編集用）
   ========================= */
.tnh-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #fff !important;          /* ← 白文字を最優先 */
  background: #d32f2f;
  padding: 2px 6px;
  border-radius: 4px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.tnh-edit-btn:hover,
.tnh-edit-btn:focus,
.tnh-edit-btn:visited {
  color: #fff !important;          /* ← 全状態で白文字固定 */
  background: #f44336;
  text-decoration: none !important;
}

.tnh-edit-btn i {
  font-size: 11px;
  opacity: 0.9;
}


/* =========================
エディターボタン  
 ========================= */
.tnh-editor-modal {
position: fixed; top: 0; left: 0;
width: 100%; height: 100%;
background: rgba(0,0,0,0.6);
display: flex; align-items: center; justify-content: center;
z-index: 9999;
}
.tnh-editor-inner {
background: #fff;
padding: 30px;
width: 80%;
max-width: 800px;
border-radius: 8px;
overflow-y: auto;
max-height: 90%;
}
.btn-front-edit {
display: inline-block;
background: #0073aa;
color: #fff;
padding: 8px 16px;
border-radius: 4px;
text-decoration: none;
}
.btn-front-edit:hover { background: #005d8f; }
.btn-save, .btn-cancel {
display: inline-block;
padding: 8px 16px;
border-radius: 4px;
text-decoration: none;
margin-left: 8px;
}
.btn-save {
background: #0073aa;
color: #fff;
border: none;
cursor: pointer;
}
.btn-save:hover { background: #005d8f; }
.btn-cancel {
background: #ccc;
color: #333;
}


/* =========================
.p-nav（ナビボタン）
 ========================= */

.p-nav{
margin:2em 0;/* 全体外余白 */
padding:0;/* 全体内余白 */
}
.p-nav ul{
display:-webkit-box;
display:-ms-flexbox;
display:flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
list-style:none;
margin:0;
padding:0;
border:none;
}
.p-nav ul li{
-ms-flex-preferred-size: calc(100%/4);/* 4列 */
flex-basis: calc(100%/4);/* 4列 */
margin:0;
padding:0;
text-align:center;
box-shadow: inset 1px 1px 0 0 #e0ddd1, 1px 1px 0 0 #e0ddd1, 1px 0 0 0 #e0ddd1;/* 罫線 */
display:-webkit-box;
display:-ms-flexbox;
display:flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-orient: vertical;
-webkit-box-direction: reverse;
-ms-flex-direction: column-reverse;
flex-direction: column-reverse;
min-height:100px;/* 最低の高さ */
cursor:pointer;
background:#eaf2ff;/* 背景色 */
}
.p-nav ul li:hover{
z-index:2;
box-shadow: inset 2px 2px 0 0 #0034af, 2px 2px 0 0 #0034af, 2px 0 0 0 #0034af, 0 2px 0 0 #0034af;/* 罫線(マウスホバー) */
transition: 0.35s ease-in-out;
}

.p-nav a{
    display: inline-block;
    -webkit-transition: 0.5s;
    -moz-transition: 0.5s;
    -o-transition: 0.5s;
    -ms-transition: 0.5s;
    transition: 0.5s;
}
 
.p-nav a:hover {
    color: #111;
    -webkit-transform: scale(1.1,1.1);
    -moz-transform: scale(1.1,1.1);
    -o-transform: scale(1.1,1.1);
    -ms-transform: scale(1.1,1.1);
    transform: scale(1.1,1.1);
}

.p-nav ul li:before{
content:unset !important;
}
.p-nav ul li a{
display:block;
padding: 0.5em 1em;/* 内余白 */
text-decoration:none;
width:100%;
}
.p-nav ul li a:hover{
background:none;
opacity:1;
}
.p-nav ul li a img{
max-width:50% !important;/* 画像横幅 */
height: auto !important;
filter: drop-shadow(0px 0px 3px rgba(0,0,0,0.1));/* 画像影 */
display: inline-block;
}
.p-nav .p-nav-title{
display: block;
color: #666;/* 文字色 */
font-size: 0.7em;/* 文字大きさ */
letter-spacing: 1px;
font-weight: 600;/* 文字太さ */
text-align: center;
line-height: 1.5;/* 文字行間高さ */
}

/* サイドバー */
#sidebar .p-nav ul li{
-ms-flex-preferred-size: calc(100%/2);/* 2列 */
flex-basis: calc(100%/2);/* 2列 */
}

/* スマホ */
@media screen and (max-width: 559px) {
  .p-nav ul li{
    -ms-flex-preferred-size: calc(100%/2);/* 2列 */
    flex-basis: calc(100%/2);/* 2列 */
  }
}
/* fontawesome */
.p-nav ul li a i,.p-nav ul li a svg{
font-size: 65pt ;/* アイコン大きさ */
padding: 10px 0;/* アイコン余白 */
color: #0034af;/* アイコン色 */
display:inline-block;
}


/* =========================
縦書き
 ========================= */
.vertical-wrap{
margin: 0 auto;
width: 100%;
}
 
.vertical{
width: 100%;
margin-right:20px;
writing-mode: vertical-rl;
-ms-writing-mode: tb-rl;
-webkit-writing-mode:vertical-rl;   
}

.vertical-title{
color: #333;
font-size: 40px;
font-weight: 700;
line-height: 1.4;
margin: 5px 20px 10px 20px;
}


/* =========================
ユーチューブ埋め込みショートコード
========================= */
.tnh-video {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.tnh-video-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.tnh-video-inner iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

/* ACF対策（必要なら） */
.acf-field .tnh-video,
.acf-field .tnh-video-inner {
  width: 100% !important;
}