/* ==============================================
   CTA ブロック（sensing/cta）
   Figma デザイン準拠
============================================== */

/* ---- コンテナ ---- */
.wp-block-sensing-cta {
	position: relative;
	background: #0A1628;
	border-radius: 16px;
	padding: 40px;
	text-align: center !important;
	color: #fff;
	overflow: hidden;
	margin: 0 0 32px;
	width: 100%;
	box-sizing: border-box;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	font-family: Helvetica, 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

/* ドットパターン背景 */
.wp-block-sensing-cta::before {
	content: '';
	position: absolute;
	inset: 0;
	opacity: 0.1;
	background-image: radial-gradient(#CFFF04 1px, transparent 1px);
	background-size: 20px 20px;
	pointer-events: none;
}

/* ---- 内側ラッパー ---- */
.cta-inner {
	position: relative;
	z-index: 1;
}

/* ---- 見出し ---- */
.cta-heading {
	font-size: 24px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 16px;
	line-height: 1.4;
}

/* ---- 説明文 ---- */
.cta-description {
	font-size: 16px;
	line-height: 1.625;
	color: #D1D5DC;
	margin: 0 auto 32px;
	max-width: 640px;
}

/* ---- ボタン群 ---- */
.cta-buttons {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ---- ボタン共通 ---- */
.cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 32px;
	font-size: 16px;
	font-weight: 700;
	border-radius: 10px;
	text-decoration: none;
	transition: background 0.2s, transform 0.2s;
	cursor: pointer;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-btn svg {
	flex-shrink: 0;
	vertical-align: middle;
}

.cta-btn:hover {
	transform: translateY(-1px);
}

/* プライマリ（ライム） */
.cta-btn--primary {
	background: #CFFF04;
	color: #0A1628;
}

.cta-btn--primary:hover {
	background: #B8E600;
	color: #0A1628;
}

/* セカンダリ（白） */
.cta-btn--secondary {
	background: #fff;
	color: #0A1628;
}

.cta-btn--secondary:hover {
	background: #F3F4F6;
	color: #0A1628;
}

/* ターシャリ（ライムアウトライン） */
.cta-btn--tertiary {
	background: transparent;
	color: #CFFF04;
	border: 2px solid #CFFF04;
}

.cta-btn--tertiary:hover {
	background: rgba(207, 255, 4, 0.1);
	color: #CFFF04;
	border-color: #CFFF04;
}

/* ---- ボタン下の追加テキスト ---- */
.cta-extra {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	color: #99A1AF;
	font-size: 14px;
	line-height: 1.6;
	text-align: center !important;
}

.cta-extra:empty {
	display: none;
}

/* ==============================================
   エディター専用
============================================== */

/* サイドバー：ボタン設定グループ */
.cta-button-group {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e0e0e0;
}

.cta-button-group:last-of-type {
	margin-bottom: 8px;
}

.cta-button-group__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.cta-button-group__remove.components-button {
	min-width: 24px;
	height: 24px;
	padding: 0;
	color: #cc1818;
}

.cta-add-button.components-button {
	width: 100%;
	justify-content: center;
	margin-top: 4px;
}

/* エディター内の見出し・説明文の色を維持 */
.wp-block-sensing-cta .cta-heading[contenteditable] {
	color: #fff;
}

.wp-block-sensing-cta .cta-description[contenteditable] {
	color: #D1D5DC;
}

/* 記事本文のスタイルを上書き */
.column-article__body .wp-block-sensing-cta .cta-heading,
.wp-block-sensing-cta .cta-heading {
	font-size: 24px !important;
	font-weight: 700;
	color: #fff !important;
	margin: 0 0 16px !important;
	padding: 0 !important;
	border: none !important;
	line-height: 1.4;
	text-align: center !important;
}

.column-article__body .wp-block-sensing-cta p,
.wp-block-sensing-cta p {
	color: #D1D5DC;
	text-align: center !important;
}

.column-article__body .wp-block-sensing-cta .cta-extra,
.column-article__body .wp-block-sensing-cta .cta-extra p {
	text-align: center !important;
}

.column-article__body .wp-block-sensing-cta a.cta-btn,
.wp-block-sensing-cta a.cta-btn {
	text-decoration: none !important;
	color: #0A1628 !important;
	font-weight: 700 !important;
}

.column-article__body .wp-block-sensing-cta a.cta-btn--tertiary,
.wp-block-sensing-cta a.cta-btn--tertiary {
	color: #CFFF04 !important;
}

/* ---- レスポンシブ ---- */
@media only screen and (max-width: 640px) {
	.wp-block-sensing-cta {
		padding: 32px 20px;
		border-radius: 12px;
	}

	.cta-heading {
		font-size: 20px;
	}

	.cta-buttons {
		flex-direction: column;
	}

	.cta-btn {
		width: 100%;
		text-align: center;
	}
}
