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

/* カスタマイズする場合にはこれより下に追記してください  */

/***エディターモード メッセージ非表示**/
.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;
}


/* トグルの下三角装飾を無効化 */
.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;
}
