/**
 * Block Styles for core/heading (Gutenberg)
 * Fully compatible with SWELL theme
 * Automatically inherits SWELL theme colors (--color_main, --color_main_thin)
 *
 * @package Custom_Title_Rewriter
 */

:root, .editor-styles-wrapper {
	--ctr-main: var(--ctr-custom-main, var(--color_main, #0066cc));
	--ctr-sub: var(--ctr-custom-sub, var(--color_main_thin, #e6f2ff));
}

/* --- 1. 2色下線 (サルワカ定番) --- */
.is-style-ctr-two-color {
	position: relative !important;
	padding-bottom: 0.5em !important;
	border-bottom: 2px solid var(--ctr-sub, #e6f2ff) !important;
	border-top: none !important;
	border-left: none !important;
	border-right: none !important;
	background: transparent !important;
}
.is-style-ctr-two-color::after {
	content: '' !important;
	position: absolute !important;
	bottom: -2px !important;
	left: 0 !important;
	width: 25% !important;
	min-width: 60px !important;
	height: 4px !important;
	background-color: var(--ctr-main, #0066cc) !important;
	border-radius: 2px !important;
}

/* --- 2. かぎ括弧「」風 (なないろログ) --- */
.is-style-ctr-brackets-corner {
	position: relative !important;
	padding: 0.6em 1.2em !important;
	text-align: center !important;
	border: none !important;
	background: transparent !important;
}
.is-style-ctr-brackets-corner::before {
	content: '' !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 22px !important;
	height: 22px !important;
	border-left: 3px solid var(--ctr-main, #0066cc) !important;
	border-top: 3px solid var(--ctr-main, #0066cc) !important;
}
.is-style-ctr-brackets-corner::after {
	content: '' !important;
	position: absolute !important;
	bottom: 0 !important;
	right: 0 !important;
	width: 22px !important;
	height: 22px !important;
	border-right: 3px solid var(--ctr-main, #0066cc) !important;
	border-bottom: 3px solid var(--ctr-main, #0066cc) !important;
}

/* --- 3. かぎ括弧 [ ] 囲み (なないろログ) --- */
.is-style-ctr-brackets-square {
	position: relative !important;
	padding: 0.5em 1.4em !important;
	border: none !important;
	background: transparent !important;
}
.is-style-ctr-brackets-square::before,
.is-style-ctr-brackets-square::after {
	content: '' !important;
	position: absolute !important;
	top: 0 !important;
	bottom: 0 !important;
	width: 10px !important;
	border-top: 3px solid var(--ctr-main, #0066cc) !important;
	border-bottom: 3px solid var(--ctr-main, #0066cc) !important;
}
.is-style-ctr-brackets-square::before {
	left: 0 !important;
	border-left: 3px solid var(--ctr-main, #0066cc) !important;
}
.is-style-ctr-brackets-square::after {
	right: 0 !important;
	border-right: 3px solid var(--ctr-main, #0066cc) !important;
}

/* --- 4. 中央アクセント下線 (なないろログ) --- */
.is-style-ctr-center-line {
	position: relative !important;
	text-align: center !important;
	padding-bottom: 0.8em !important;
	border: none !important;
	background: transparent !important;
}
.is-style-ctr-center-line::after {
	content: '' !important;
	position: absolute !important;
	bottom: 0 !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
	width: 80px !important;
	height: 4px !important;
	background-color: var(--ctr-main, #0066cc) !important;
	border-radius: 2px !important;
}

/* --- 5. 両端フェード下線 (なないろログ) --- */
.is-style-ctr-fade-underline {
	text-align: center !important;
	padding-bottom: 0.5em !important;
	background: linear-gradient(90deg, transparent 0%, var(--ctr-main, #0066cc) 50%, transparent 100%) no-repeat bottom / 100% 3px !important;
	border: none !important;
}

/* --- 6. 左右水平ライン (なないろログ) --- */
.is-style-ctr-lines-sides {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-align: center !important;
	border: none !important;
	background: transparent !important;
}
.is-style-ctr-lines-sides::before,
.is-style-ctr-lines-sides::after {
	content: '' !important;
	flex: 1 !important;
	height: 2px !important;
	background-color: var(--ctr-main, #0066cc) !important;
}
.is-style-ctr-lines-sides::before {
	margin-right: 0.8em !important;
}
.is-style-ctr-lines-sides::after {
	margin-left: 0.8em !important;
}

/* --- 7. 枠線ずらし / オフセットボックス (なないろログ) --- */
.is-style-ctr-offset-box {
	padding: 0.6em 1em !important;
	background: var(--ctr-sub, #e6f2ff) !important;
	border: 2px solid var(--ctr-main, #0066cc) !important;
	box-shadow: 6px 6px 0 var(--ctr-main, #0066cc) !important;
	border-radius: 4px !important;
}

/* --- 8. 付箋風 (上線) (なないろログ) --- */
.is-style-ctr-sticky-top {
	padding: 0.6em 1em !important;
	background: var(--ctr-sub, #e6f2ff) !important;
	border-top: 5px solid var(--ctr-main, #0066cc) !important;
	border-bottom: none !important;
	border-left: none !important;
	border-right: none !important;
	border-radius: 0 0 6px 6px !important;
}

/* --- 9. 背景塗り＋左太線 --- */
.is-style-ctr-left-accent {
	padding: 0.6em 0.9em !important;
	background: var(--ctr-sub, #e6f2ff) !important;
	border-left: 6px solid var(--ctr-main, #0066cc) !important;
	border-radius: 0 8px 8px 0 !important;
	border-top: none !important;
	border-bottom: none !important;
	border-right: none !important;
}

/* --- 10. グラデーション背景 (じゃじゃ〜ん風) --- */
.is-style-ctr-gradient {
	padding: 0.7em 1.2em !important;
	background: linear-gradient(135deg, var(--ctr-main, #0066cc) 0%, var(--ctr-sub, #e6f2ff) 100%) !important;
	color: #ffffff !important;
	border-radius: 8px !important;
	border: none !important;
	text-shadow: 0 1px 2px rgba(0,0,0,0.15) !important;
}

/* --- 11. 斜めストライプ背景 (なないろログ) --- */
.is-style-ctr-stripe-bg {
	padding: 0.6em 1em !important;
	background: repeating-linear-gradient(-45deg, var(--ctr-sub, #e6f2ff), var(--ctr-sub, #e6f2ff) 10px, #ffffff 10px, #ffffff 20px) !important;
	border: 2px solid var(--ctr-main, #0066cc) !important;
	border-radius: 6px !important;
}

/* --- 12. ポルカドット水玉背景 (なないろログ) --- */
.is-style-ctr-dots-bg {
	padding: 0.6em 1em !important;
	background-color: var(--ctr-sub, #e6f2ff) !important;
	background-image: radial-gradient(var(--ctr-main, #0066cc) 1.5px, transparent 1.5px) !important;
	background-size: 14px 14px !important;
	border-left: 6px solid var(--ctr-main, #0066cc) !important;
	border-radius: 0 6px 6px 0 !important;
	border-top: none !important;
	border-bottom: none !important;
	border-right: none !important;
}

/* --- 13. 立体リボン風 --- */
.is-style-ctr-ribbon {
	position: relative !important;
	padding: 0.6em 1.2em !important;
	background: var(--ctr-main, #0066cc) !important;
	color: #ffffff !important;
	border-radius: 4px !important;
	box-shadow: 0 3px 6px rgba(0,0,0,0.15) !important;
	border: none !important;
}

/* --- 14. 吹き出し風 --- */
.is-style-ctr-balloon {
	position: relative !important;
	padding: 0.7em 1.2em !important;
	background: var(--ctr-sub, #e6f2ff) !important;
	border-radius: 8px !important;
	border: none !important;
	margin-bottom: 1.5em !important;
}
.is-style-ctr-balloon::after {
	content: '' !important;
	position: absolute !important;
	bottom: -10px !important;
	left: 2em !important;
	border-width: 10px 10px 0 !important;
	border-style: solid !important;
	border-color: var(--ctr-sub, #e6f2ff) transparent !important;
}

/* --- 15. 蛍光マーカー風 --- */
.is-style-ctr-marker {
	padding: 0.2em 0 !important;
	background: linear-gradient(transparent 60%, var(--ctr-sub, #e6f2ff) 60%) !important;
	display: inline-block !important;
	border: none !important;
}

/* --- 16. ステッチ風 --- */
.is-style-ctr-stitch {
	position: relative !important;
	padding: 0.6em 1em !important;
	background: var(--ctr-sub, #e6f2ff) !important;
	border: 2px dashed #ffffff !important;
	border-radius: 6px !important;
	box-shadow: 0 0 0 4px var(--ctr-sub, #e6f2ff), 0 2px 5px rgba(0,0,0,0.1) !important;
}

/* --- 17. 英字上部配置 (SECTION) --- */
.is-style-ctr-en-top {
	position: relative !important;
	padding-top: 1.4em !important;
	padding-bottom: 0.4em !important;
	border-bottom: 2px solid var(--ctr-main, #0066cc) !important;
	border-top: none !important;
	border-left: none !important;
	border-right: none !important;
	background: transparent !important;
}
.is-style-ctr-en-top::before {
	content: 'SECTION' !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	font-size: 0.45em !important;
	font-weight: 700 !important;
	letter-spacing: 0.18em !important;
	text-transform: uppercase !important;
	color: var(--ctr-main, #0066cc) !important;
	line-height: 1 !important;
}

/* --- 18. 英字背景透かし重ね (TOPIC) --- */
.is-style-ctr-en-overlap {
	position: relative !important;
	padding: 0.6em 0.8em !important;
	border: none !important;
	background: transparent !important;
	z-index: 1 !important;
}
.is-style-ctr-en-overlap::before {
	content: 'TOPIC' !important;
	position: absolute !important;
	top: -0.35em !important;
	left: 0 !important;
	font-family: "Georgia", "Times New Roman", serif !important;
	font-size: 2.2em !important;
	font-weight: 900 !important;
	font-style: italic !important;
	letter-spacing: 0.05em !important;
	color: var(--ctr-main, #0066cc) !important;
	opacity: 0.12 !important;
	z-index: -1 !important;
	pointer-events: none !important;
	line-height: 1 !important;
	white-space: nowrap !important;
}

/* --- 19. 先頭ナンバー付き (01) --- */
.is-style-ctr-en-number {
	position: relative !important;
	padding: 0.4em 0 0.4em 2.2em !important;
	border-bottom: 2px solid var(--ctr-sub, #e6f2ff) !important;
	border-top: none !important;
	border-left: none !important;
	border-right: none !important;
	background: transparent !important;
}
.is-style-ctr-en-number::before {
	content: '01' !important;
	position: absolute !important;
	top: 0.1em !important;
	left: 0 !important;
	font-family: "Impact", "Arial Black", sans-serif !important;
	font-size: 1.1em !important;
	font-weight: bold !important;
	color: var(--ctr-main, #0066cc) !important;
	line-height: 1 !important;
	letter-spacing: 0.05em !important;
}

/* --- 20. Codejump: 英語メイン大 ＋ 日本語サブ下 (左寄せ) --- */
.is-style-ctr-cj-en-bottom {
	position: relative !important;
	font-size: 1.6em !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	letter-spacing: 0.05em !important;
	line-height: 1.2 !important;
	padding-bottom: 1.6em !important;
	border: none !important;
	background: transparent !important;
}
.is-style-ctr-cj-en-bottom::after {
	content: '会社概要' !important;
	position: absolute !important;
	bottom: 0 !important;
	left: 0 !important;
	font-size: 0.45em !important;
	font-family: inherit !important;
	font-weight: 500 !important;
	letter-spacing: 0.05em !important;
	color: #666 !important;
	line-height: 1 !important;
}

/* --- 21. Codejump: 日本語メイン大 ＋ 英語サブ下 (中央揃え) --- */
.is-style-ctr-cj-ja-center {
	position: relative !important;
	text-align: center !important;
	font-size: 1.5em !important;
	line-height: 1.2 !important;
	padding-bottom: 1.8em !important;
	border: none !important;
	background: transparent !important;
}
.is-style-ctr-cj-ja-center::after {
	content: 'VOICE' !important;
	position: absolute !important;
	bottom: 0 !important;
	left: 0 !important;
	right: 0 !important;
	text-align: center !important;
	font-size: 0.45em !important;
	font-weight: 700 !important;
	letter-spacing: 0.15em !important;
	text-transform: uppercase !important;
	color: var(--ctr-main, #0066cc) !important;
	line-height: 1 !important;
}

/* --- 22. Codejump: 英語 ＋ 日本語 横並び --- */
.is-style-ctr-cj-inline {
	display: flex !important;
	align-items: baseline !important;
	gap: 0.8em !important;
	font-size: 1.5em !important;
	line-height: 1.2 !important;
	border: none !important;
	background: transparent !important;
}
.is-style-ctr-cj-inline::after {
	content: 'サービス' !important;
	font-size: 0.45em !important;
	font-weight: normal !important;
	color: #666 !important;
}

/* --- 23. Codejump: 中央サブタイトル ＋ センター細下線 (56px) --- */
.is-style-ctr-cj-center-line {
	position: relative !important;
	text-align: center !important;
	padding-bottom: 2em !important;
	border: none !important;
	background: transparent !important;
}
.is-style-ctr-cj-center-line::before {
	content: 'SUBTITLE' !important;
	display: block !important;
	font-size: 0.45em !important;
	font-weight: 700 !important;
	letter-spacing: 0.18em !important;
	text-transform: uppercase !important;
	color: var(--ctr-main, #0066cc) !important;
	margin-bottom: 0.6em !important;
}
.is-style-ctr-cj-center-line::after {
	content: '' !important;
	position: absolute !important;
	bottom: 0 !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
	width: 56px !important;
	height: 1px !important;
	background-color: var(--ctr-main, #333333) !important;
}

/* --- 24. Yutsuzo風: 中央英字上 ＋ 日本語タイトル (data-en対応) --- */
.is-style-ctr-yt-center-top {
	position: relative !important;
	text-align: center !important;
	padding-top: 1.8em !important;
	border: none !important;
	background: transparent !important;
}
.is-style-ctr-yt-center-top::before {
	content: 'SECTION' !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	text-align: center !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	font-size: 0.48em !important;
	font-weight: 700 !important;
	letter-spacing: 0.16em !important;
	text-transform: uppercase !important;
	color: var(--ctr-main, #0066cc) !important;
	line-height: 1.2 !important;
}
.is-style-ctr-yt-center-top[data-en]::before {
	content: attr(data-en) !important;
}

/* --- 25. Yutsuzo風: 左縦線 ＋ 右端英字 (左右振り分け・data-en対応) --- */
.is-style-ctr-yt-left-bar {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	flex-wrap: wrap !important;
	gap: 10px !important;
	padding: 0.35em 0.8em 0.35em 1em !important;
	border-left: 4px solid var(--ctr-main, #0066cc) !important;
	border-top: none !important;
	border-bottom: none !important;
	border-right: none !important;
	background: transparent !important;
}
.is-style-ctr-yt-left-bar::after {
	content: 'TOPIC' !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	font-size: 0.46em !important;
	font-weight: 700 !important;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
	color: var(--ctr-main, #0066cc) !important;
	margin-left: auto !important;
	line-height: 1 !important;
	opacity: 0.85 !important;
}
.is-style-ctr-yt-left-bar[data-en]::after {
	content: attr(data-en) !important;
}

/* --- 26. Yutsuzo風: 下グラデーション線 ＋ 英字サブ (data-en対応) --- */
.is-style-ctr-yt-grad-line {
	position: relative !important;
	display: flex !important;
	align-items: flex-end !important;
	justify-content: space-between !important;
	flex-wrap: wrap !important;
	gap: 10px !important;
	padding-bottom: 0.6em !important;
	border-bottom: 3px solid var(--ctr-main, #0066cc) !important;
	border-image: linear-gradient(to right, var(--ctr-main, #0066cc) 0%, var(--ctr-sub, #e6f2ff) 100%) 1 !important;
	border-top: none !important;
	border-left: none !important;
	border-right: none !important;
	background: transparent !important;
}
.is-style-ctr-yt-grad-line::after {
	content: 'POINT' !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	font-size: 0.46em !important;
	font-weight: 700 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	color: var(--ctr-main, #0066cc) !important;
	margin-left: auto !important;
	line-height: 1.2 !important;
}
.is-style-ctr-yt-grad-line[data-en]::after {
	content: attr(data-en) !important;
}

/* Gutenbergの「English Subtitle (CTR)」で入力した値を全英字デザインに反映する。 */
.is-style-ctr-en-top[data-en]::before,
.is-style-ctr-en-overlap[data-en]::before,
.is-style-ctr-en-number[data-en]::before,
.is-style-ctr-cj-en-bottom[data-en]::after,
.is-style-ctr-cj-ja-center[data-en]::after,
.is-style-ctr-cj-inline[data-en]::after,
.is-style-ctr-cj-center-line[data-en]::before {
	content: attr(data-en) !important;
}

