/* 共通コンポーネント */

/* カード */
.card {
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}

.card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.card-title {
	margin: 0;
}

.card-content {
	margin-bottom: 1rem;
}

.card-footer {
	display: flex;
	justify-content: flex-end;
}

/* フォーム要素 */
input, select, textarea {
	width: 100%;
	padding: 0.75rem;
	margin-bottom: 1rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	background-color: #fff;
	font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.form-row {
	margin-bottom: 1.5rem;
}

.form-row label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.form-row .description {
	font-size: 0.85rem;
	color: #666;
	margin-top: 0.5rem;
}

.form-actions {
	margin-top: 1rem;
	margin-bottom: 1rem;
	padding-right: 16px;
	display: flex;
	justify-content: flex-end;
}

/* アラート */
.alert {
	padding: 1rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.alert-success {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.alert-warning {
	background-color: #fff3cd;
	color: #856404;
	border: 1px solid #ffeeba;
}

.alert-danger {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.alert-info {
	background-color: #d1ecf1;
	color: #0c5460;
	border: 1px solid #bee5eb;
}

/* バッジ */
.badge {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
	vertical-align: baseline;
	border-radius: 10rem;
}

.badge-primary {
	background-color: #0073aa;
	color: #fff;
}

.badge-secondary {
	background-color: #6c757d;
	color: #fff;
}

.badge-success {
	background-color: #4caf50;
	color: #fff;
}

.badge-warning {
	background-color: #ff9800;
	color: #fff;
}

.badge-danger {
	background-color: #f44336;
	color: #fff;
}

.badge-info {
	background-color: #2196f3;
	color: #fff;
}

/* ステータスラベル */
.status-published {
	background-color: #4caf50;
	color: #fff;
}

.status-draft {
	background-color: #ff9800;
	color: #fff;
}

.status-other {
	background-color: #6c757d;
	color: #fff;
}

/* モーダル */
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
	background-color: #fff;
	margin: 5% auto;
	padding: 2rem;
	border-radius: 8px;
	max-width: 800px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}

.modal-header h3 {
	margin: 0;
}

.modal-body {
	margin-bottom: 1.5rem;
}

.modal-footer {
	display: flex;
	justify-content: flex-end;
}

.close-modal {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	color: #333;
	cursor: pointer;
}

/* ローディングインジケータ */
.loading-indicator {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.7);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 1100;
}

.spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #0073aa;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin-bottom: 1rem;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* === フロントページ === */
.hero-section {
  background: linear-gradient(135deg, #0e1f2f, #144a66);
  color: #fff;
  padding: 4rem 2rem;
  text-align: center;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.hero-section p {
  font-size: 1.25rem;
  max-width: 720px;
  margin: 0 auto 2rem;
  color: #e0e0e0;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button.button-primary {
  background-color: #144a66;
  border-color: #144a66;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.button.button-primary:hover {
  background-color: #0e354c;
  border-color: #0e354c;
}

.button.button-secondary {
  background-color: transparent;
  color: #fff;
  border: 2px solid #fff;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.button.button-secondary:hover {
  background-color: #fff;
  color: #144a66;
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1rem;
  }
}

/* テンプレート・LP関連共通コンポーネント */
.method-options {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0 -1rem;
}

.method-option {
	width: calc(25% - 2rem);
	margin: 0 1rem 2rem;
	padding: 2rem 1.5rem;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	text-align: center;
	text-decoration: none;
	color: #333;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.method-option:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
	text-decoration: none;
	color: #333;
}

.method-option h2 {
	font-size: 1.2rem;
	margin-bottom: 0.5rem;
	color: #0073aa;
}

.method-option p {
	font-size: 0.9rem;
	color: #777;
}

.template-list {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -1rem;
}

.template-card {
	width: calc(33.333% - 2rem);
	margin: 0 1rem 2rem;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.template-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.template-card img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.template-card h2 {
	font-size: 1.2rem;
	margin: 1rem;
	color: #0073aa;
}

.template-card p {
	font-size: 0.9rem;
	color: #777;
	margin: 0 1rem 1rem;
}

.template-select-button {
	display: block;
	margin: 1rem;
	background-color: #0073aa;
	color: #fff;
	text-align: center;
	padding: 0.8rem;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	transition: background-color 0.3s ease;
}

.template-select-button:hover {
	background-color: #005177;
	color: #fff;
	text-decoration: none;
}

/* レスポンシブ（LP関連共通コンポーネント） */
@media (max-width: 768px) {
	.method-option {
		width: calc(50% - 2rem);
	}

	.template-card {
		width: calc(50% - 2rem);
	}
}

@media (max-width: 480px) {
	.method-option,
	.template-card {
		width: 100%;
	}
}

/* === LP編集ページ UI改善 === */

#lp-edit-form #message {
	position: absolute;
	top: 0;
	padding: 0 16px;
}

#lp-edit-form #message p {
	padding: 0.5rem 1rem;
	border-left: solid 3px #135e96;
	background: #fff;
	font-size: 1rem;
}

.page-template-page-edit-lp .select2-container {
	pointer-events: none;
}

.page-template-page-edit-lp .select2-container--default .select2-selection--single .select2-selection__arrow {
	display: none;
}

.page-template-page-edit-lp .select2-container.-acf .select2-selection {
	border-color: #ccc;
	background: #eee;
}

@print {
	size: A4 landscape;
	margin: 0mm;
}

.print {
	position: relative;
	width: 297mm;
	height: 210mm;
	box-sizing: border-box;
	page-break-after: auto;
	padding: 0;
}

@media screen {
	.print {
		box-shadow: 0 .5mm 2mm rgba(0,0,0,.3);
		margin: calc((100svh - 210mm)/2) calc((100svw - 297mm)/2);
	}
}

@media screen and (max-width: 750px) {

	.print {
		margin: auto;
	}
}

.page-template-page-edit-lp .lp-builder-content {
	display: flex;
}

.page-template-page-edit-lp .lp-builder-content .lp-builder-main {
	position: relative;
	width: 100%;
}

.page-template-page-edit-lp .lp-builder-content .lp-builder-sidebar {
	position: relative;
	width: 800px;
	max-width: 100%;
}

.page-template-page-edit-lp input {
	width: 100%;
	max-width: -webkit-fill-available;
	padding: 8px;
	margin-bottom: 1rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	background-color: #fff;
	font-size: 1rem;
}

.page-template-page-edit-lp select {
	width: 100%;
	padding: 8px;
	margin-bottom: 1rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	background-color: #fff;
	font-size: 1rem;
}

.page-template-page-edit-lp textarea {
	width: 100%;
	padding: 8px;
	margin-bottom: 1rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	background-color: #fff;
	font-size: 1rem;
}

.page-template-page-edit-lp h1.page-title {

}

.preview-container.device-desktop #lp-preview-frame {
	border: solid 10px #777;
	border-radius: 30px;
	width: 100%;
	height: auto;
	aspect-ratio: 16/9;
	max-width: 100%;
	zoom: 0.4;
	margin: 3rem auto;
}

.preview-container.device-tablet #lp-preview-frame {
	border: solid 10px #777;
	border-radius: 30px;
	width: 100%;
	height: auto;
	aspect-ratio: 3/4;
	max-width: 80%;
	zoom: 0.3;
	margin: 3rem auto;
}

.preview-container.device-mobile #lp-preview-frame {
	border: solid 10px #777;
	border-radius: 30px;
	width: 100%;
	height: auto;
	aspect-ratio: 9/16;
	max-width: 50%;
	zoom: 0.2;
	margin: 3rem auto;
}

.preview-container #lp-preview-frame {
	display: flex;
}

.page-template-page-edit-lp .form-rows {
	display: flex;
}

.page-template-page-edit-lp .form-row {
	margin-bottom: 0;
	padding: 16px;
}

.page-template-page-edit-lp .form-row-title {
	width: 70%;
}

.page-template-page-edit-lp .form-row-status {
	width: 30%;
}

@media screen and (min-width: 1024px) {
	.preview-container #lp-preview-frame {
		max-width: 70%;
	}
}

@media screen and (max-width: 1023px) {
	.preview-container #lp-preview-frame {
		max-width: 100%;
	}

	.page-template-page-edit-lp .lp-builder-content {
		display: block;
	}
}