/**
 * プレゼント応募フォーム フロント用スタイル。
 * Step 2: LINE 認証の状態表示（認証中／成功／失敗）。
 *
 * @package icn-present
 */

.icn-present {
	max-width: 640px;
	margin: 2rem auto;
}

.icn-present__admin-note {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
	font-size: 0.875rem;
	color: #614b02;
}

/* 状態別の出し分け（既定は全て非表示、data 属性に応じて 1 つだけ表示） */
.icn-present__state {
	display: none;
	padding: 2rem 1.5rem;
	border: 1px solid #d8d8d8;
	border-radius: 8px;
	background: #f7f7f7;
	text-align: center;
}

.icn-present[data-icn-present-state="loading"] .icn-present__state--loading,
.icn-present[data-icn-present-state="prompt"] .icn-present__state--prompt,
.icn-present[data-icn-present-state="before"] .icn-present__state--before,
.icn-present[data-icn-present-state="after"] .icn-present__state--after,
.icn-present[data-icn-present-state="none"] .icn-present__state--none,
.icn-present[data-icn-present-state="already"] .icn-present__state--already,
.icn-present[data-icn-present-state="select"] .icn-present__state--select,
.icn-present[data-icn-present-state="overview"] .icn-present__state--overview,
.icn-present[data-icn-present-state="success"] .icn-present__state--success,
.icn-present[data-icn-present-state="ready"] .icn-present__state--ready,
.icn-present[data-icn-present-state="error"] .icn-present__state--error {
	display: block;
}

/* 企画（プレゼント）選択 */
.icn-present__state--select {
	background: #fff;
	text-align: left;
}

.icn-present-choices {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}

.icn-present-choices__btn {
	display: block;
	width: 100%;
	text-align: left;
	padding: 1rem;
	border: 1px solid #ccc;
	border-radius: 8px;
	background: #fafafa;
	cursor: pointer;
	font: inherit;
}

.icn-present-choices__btn:hover,
.icn-present-choices__btn:focus {
	border-color: #06c755;
	background: #f1fbf4;
}

.icn-present-choices__title {
	display: block;
	font-weight: 700;
	font-size: 1rem;
	margin-bottom: 0.35rem;
}

.icn-present-choices__prizes {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.icn-present-choices__img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
}

.icn-present-choices__prize {
	font-size: 0.85rem;
	color: #555;
}

.icn-present-form__campaign {
	margin: 0 0 0.5rem;
	font-size: 1.05rem;
	font-weight: 700;
}

.icn-present__state--already {
	border-color: #6a8cc7;
	background: #f3f6fb;
}

.icn-present__done {
	padding: 1.5rem;
	border: 1px solid #46b450;
	border-radius: 8px;
	background: #edfaef;
	text-align: center;
	font-size: 1rem;
	line-height: 1.8;
	color: #1a7f37;
}

/* ready 状態はフォームを載せるので枠なし */
.icn-present__state--ready {
	padding: 0;
	border: 0;
	background: transparent;
	text-align: left;
}

.icn-present__auth-badge {
	margin: 0 0 1rem;
	padding: 0.6rem 1rem;
	border-radius: 6px;
	background: #edfaef;
	border: 1px solid #46b450;
	color: #1a7f37;
	font-size: 0.9rem;
	text-align: center;
	overflow: hidden;
	max-height: 4rem;
	transition:
		opacity 0.5s ease,
		max-height 0.5s ease,
		margin 0.5s ease,
		padding 0.5s ease,
		border-width 0.5s ease;
}

/* 認証完了バッジ：一定時間後にふわっと消える */
.icn-present__auth-badge.is-dismissed {
	opacity: 0;
	max-height: 0;
	margin: 0;
	padding-top: 0;
	padding-bottom: 0;
	border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
	.icn-present__auth-badge {
		transition: opacity 0.2s ease;
	}
}

.icn-present__state--prompt {
	background: #fff;
}

.icn-present__login-button {
	display: inline-block;
	margin: 1rem 0 0.75rem;
	padding: 0.75rem 2rem;
	border: 0;
	border-radius: 6px;
	background: #06c755; /* LINE グリーン */
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	cursor: pointer;
}

.icn-present__login-button:hover,
.icn-present__login-button:focus {
	background: #05b34c;
}

.icn-present__prompt-note {
	margin: 0.5rem 0 0;
	color: #d63638;
	font-size: 0.875rem;
	min-height: 1.2em;
}

.icn-present__text--small {
	margin-top: 0.25rem;
	font-size: 0.8125rem;
	color: #666;
}

.icn-present__state--error {
	border-color: #d63638;
	background: #fcf0f1;
}

.icn-present__state--success {
	border-color: #46b450;
	background: #edfaef;
}

.icn-present__title {
	margin: 0 0 0;
	font-size: 1.125rem;
	font-weight: 700;
}

.icn-present__text {
	margin: 0;
	color: #333;
	font-size: 0.95rem;
	line-height: 1.7;
}

.icn-present__retry {
	display: inline-block;
	margin-top: 14px;
	padding: 9px 22px;
	border: 0;
	border-radius: 999px;
	background: #0b5fff;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.6;
	cursor: pointer;
}

.icn-present__retry:hover,
.icn-present__retry:focus {
	background: #0950d9;
}

/* =========================================================
 * 診断パネル（試験運用中：「担当者へご連絡ください」表示）
 * 派手にならないよう、外枠（エラー状態の赤系）に対して中は淡いグレーの落ち着いた OneUI 風カード。
 * ========================================================= */

.icn-present__diag {
	margin-top: 1rem;
	padding: 14px 16px;
	border: 1px solid #e2e4e8;
	border-radius: 14px;
	background: #f7f8fa;
	text-align: left;
}

.icn-present__diag-lead {
	margin: 0 0 10px;
	font-size: 0.82rem;
	line-height: 1.6;
	color: #4a4d52;
}

.icn-present__diag-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.icn-present__diag-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border: 1px solid #e2e4e8;
	border-radius: 999px;
	background: #fff;
	font-size: 0.78rem;
	line-height: 1.5;
}

.icn-present__diag-k {
	color: #6b6f76;
	font-weight: 600;
}

.icn-present__diag-code {
	font-weight: 700;
	color: #0b5fff;
	letter-spacing: 0.02em;
}

.icn-present__diag-time {
	color: #24262b;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.75rem;
}

.icn-present__diag-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.icn-present__diag-copy {
	padding: 6px 16px;
	border: 1px solid #0b5fff;
	border-radius: 999px;
	background: #fff;
	color: #0b5fff;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.6;
	cursor: pointer;
	transition: background .12s ease;
}

.icn-present__diag-copy:hover,
.icn-present__diag-copy:focus {
	background: #eaf1ff;
}

.icn-present__diag-copied {
	font-size: 0.78rem;
	font-weight: 600;
	color: #1e8e3e;
}

.icn-present__diag-more {
	margin-top: 10px;
}

.icn-present__diag-more > summary {
	cursor: pointer;
	font-size: 0.72rem;
	color: #6b6f76;
}

.icn-present__diag-raw {
	margin: 8px 0 0;
	padding: 8px 10px;
	border: 1px dashed #cfd2d8;
	border-radius: 8px;
	background: #fff;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.7rem;
	line-height: 1.6;
	color: #4a4d52;
	white-space: pre-wrap;
	word-break: break-all;
}

/* スピナー */
.icn-present__spinner {
	display: inline-block;
	width: 1.75rem;
	height: 1.75rem;
	margin-bottom: 0.75rem;
	border: 3px solid #c9c9c9;
	border-top-color: #06c755; /* LINE グリーン */
	border-radius: 50%;
	animation: icn-present-spin 0.8s linear infinite;
}

@keyframes icn-present-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.icn-present__spinner {
		animation-duration: 2s;
	}
}

/* ============================================================
   応募フォーム
   ============================================================ */

.icn-present-form {
	margin: 0;
}

.icn-present-form__back {
	/* いったん非表示（戻す可能性があるためスタイルは残す） */
	display: none;
	margin: 0 0 1rem;
	padding: 0.4rem 0.9rem;
	border: 1px solid #ccc;
	border-radius: 999px;
	background: #f2f2f2;
	color: #333;
	font-size: 0.85rem;
	line-height: 1.4;
	cursor: pointer;
}

.icn-present-form__back:hover,
.icn-present-form__back:focus {
	background: #e8e8e8;
}

.icn-present-form__lead {
	margin: 0 0 1.25rem;
	font-size: 0.95rem;
	color: #333;
}

.icn-present-form__errors {
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem;
	border: 1px solid #d63638;
	border-radius: 6px;
	background: #fcf0f1;
	color: #b32d2e;
	font-size: 0.9rem;
	font-weight: 700;
}

.icn-present-field {
	margin: 0 0 1.5rem;
	padding: 0;
	border: 0;
}

.icn-present-field__label {
	display: block;
	margin: 0 0 0.5rem;
	font-weight: 700;
	font-size: 0.95rem;
}

.icn-present-field__badge {
	display: inline-block;
	margin-left: 0.4rem;
	padding: 0.1rem 0.45rem;
	border-radius: 3px;
	font-size: 0.7rem;
	font-weight: 700;
	vertical-align: middle;
}

.icn-present-field__badge.is-required {
	background: #d63638;
	color: #fff;
}

.icn-present-field__badge.is-optional {
	background: #e0e0e0;
	color: #444;
}

.icn-present-field__note {
	margin-left: 0.4rem;
	font-size: 0.8rem;
	font-weight: 400;
	color: #666;
}

.icn-present-field__hint {
	margin: 0 0 0.5rem;
	padding: 0.6rem 0.8rem;
	background: #f3f6fb;
	border-left: 3px solid #6a8cc7;
	font-size: 0.82rem;
	line-height: 1.6;
	color: #33475b;
}

.icn-present-field__error {
	display: block;
	margin: 0.35rem 0;
	color: #d63638;
	font-size: 0.82rem;
	font-weight: 700;
}

.icn-present-field.is-error input,
.icn-present-field.is-error select,
.icn-present-field.is-error textarea {
	border-color: #d63638;
	background: #fff8f8;
}

.icn-present-field input[type="text"],
.icn-present-field input[type="email"],
.icn-present-field select,
.icn-present-field textarea,
.icn-present-form textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.6rem 0.7rem;
	border: 1px solid #b9b9b9;
	border-radius: 5px;
	font-size: 1rem;
	line-height: 1.5;
	box-sizing: border-box;
	background: #fff;
}

.icn-present-field textarea {
	min-height: 5rem;
	resize: vertical;
}

.icn-present-field__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* 生年月日（年・月・日 の3セレクト横並び） */
.icn-present-birthdate {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.icn-present-birthdate__part {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.icn-present-birthdate__part select {
	width: auto;
	min-width: 4.5rem;
}

.icn-present-birthdate__unit {
	font-size: 0.95rem;
	color: #555;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.icn-present-field__sub {
	flex: 1 1 12rem;
	display: block;
}

.icn-present-field__sub label {
	display: block;
	margin-bottom: 0.2rem;
	font-size: 0.85rem;
	color: #555;
}

.icn-present-choice {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0;
	font-size: 0.95rem;
	cursor: pointer;
}

.icn-present-choice input {
	width: 1.1rem;
	height: 1.1rem;
	margin: 0;
	flex: 0 0 auto;
}

/* 希望プレゼント */
.icn-present-presents {
	display: grid;
	gap: 0.75rem;
}

.icn-present-present {
	display: flex;
	gap: 0.7rem;
	padding: 0.8rem;
	border: 1px solid #ccc;
	border-radius: 8px;
	cursor: pointer;
}

.icn-present-present input {
	margin: 0.2rem 0 0;
	flex: 0 0 auto;
}

.icn-present-present__body {
	display: block;
}

.icn-present-present__img {
	display: block;
	max-width: 100%;
	height: auto;
	margin-bottom: 0.4rem;
	border-radius: 4px;
}

.icn-present-present__name {
	display: block;
	font-weight: 700;
}

.icn-present-present__desc {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.85rem;
	color: #555;
}

.icn-present-survey__q {
	margin: 0.75rem 0 0.3rem;
	font-size: 0.9rem;
	font-weight: 700;
}

/* 注意事項 */
.icn-present-form__notice {
	margin: 1.5rem 0;
	padding: 1rem 1.2rem;
	background: #f7f7f7;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 0.83rem;
	line-height: 1.8;
	color: #444;
}

.icn-present-form__notice ul {
	margin: 0;
	padding-left: 1.2rem;
}

.icn-present__notice-list {
	margin: 0;
	padding-left: 0;
}

.icn-present__notice-list p {
	margin: 0 0 0.25rem;
	line-height: 1.5;
}

.icn-present__notice-list p:last-child {
	margin-bottom: 0;
}

.icn-present-form__submit {
	display: block;
	width: 100%;
	margin-top: 1rem;
	padding: 0.9rem 1rem;
	border: 0;
	border-radius: 6px;
	background: #06c755;
	color: #fff;
	font-size: 1.05rem;
	font-weight: 700;
	cursor: pointer;
}

.icn-present-form__submit:hover,
.icn-present-form__submit:focus {
	background: #05b34c;
}

.icn-present-form__submit:disabled {
	opacity: 0.6;
	cursor: default;
}

@media (max-width: 480px) {
	.icn-present {
		margin: 1rem auto;
	}
}

/* =========================================================
 * 企画概要（クッション）ページ
 * ========================================================= */

.icn-present__state--overview {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	text-align: left;
}

.icn-present-overview__hero {
	/* 背景を画面幅いっぱいに（中央寄せコンテナからのフルブリード） */
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	margin-bottom: 40px;
	padding: 2rem 1rem 2.2rem;
	background: #1160c4;
	color: #fff;
	text-align: center;
}

.icn-present-overview__hero-sm {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
	letter-spacing: 0.02em;
}

.icn-present-overview__hero-lg {
	margin: 0.3rem 0;
	font-size: 2rem;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: 0.04em;
}

.icn-present-overview__section {
	margin: 1.8rem 0 0;
}

.icn-present-overview__head {
	margin: 0 0 0.9rem;
	font-size: 1.15rem;
	font-weight: 700;
	color: #1160c4;
}

.icn-present-overview__head::before {
	content: "\25cf";
	margin-right: 0.35em;
	color: #1160c4;
}

.icn-present-overview__prizes {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.4rem;
}

.icn-present-overview__prize {
	text-align: center;
}

.icn-present-overview__prize-img {
	max-width: 100%;
	max-height: 480px;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
}

.icn-present-overview__prize-name {
	margin: 0.6rem 0 0;
	font-size: 1.05rem;
	font-weight: 700;
}

.icn-present-overview__prize-desc {
	margin: 0.3rem 0 0;
	font-size: 0.9rem;
	color: #555;
}

.icn-present-overview__period {
	margin: 0;
	font-size: 1.05rem;
}

.icn-present-overview__notice {
	font-size: 0.9rem;
	line-height: 1.9;
	color: #444;
}

.icn-present-overview__apply {
	display: block;
	width: 100%;
	margin: 2.4rem 0 0.5rem;
	padding: 1.1rem 1rem;
	border: 0;
	border-radius: 8px;
	background: #f57c00;
	color: #fff;
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.4;
	cursor: pointer;
}

.icn-present-overview__apply:hover,
.icn-present-overview__apply:focus {
	background: #e06f00;
}

/* 企画概要ページ表示中はテーマのページヘッダーを隠す（このページのみ・概要state中のみ） */
html.icn-present--overview header.page-header {
	display: none !important;
}

.icn-present:has(.icn-present-overview__hero) {
	margin: 0 auto 2rem;
}

/* =========================================================
 * 応募内容の確認
 * ========================================================= */

.icn-present [hidden] {
	display: none !important;
}

.icn-present-confirm__campaign {
	margin: 0 0 0.5rem;
	font-size: 1.05rem;
	font-weight: 700;
}

.icn-present-confirm__heading {
	margin: 0 0 0.5rem;
	font-size: 1.15rem;
	font-weight: 700;
	color: white;
	background: #1160c4;
	border: 2px solid #1160c4;
	text-align: center;
	padding: 1rem;
	border-radius: 6px;
}

.icn-present-confirm__lead {
	margin: 0 0 1.25rem;
	font-size: 0.95rem;
	color: #333;
}

.icn-present-confirm__list {
	margin: 0 0 1.5rem;
	padding: 0;
	border-top: 1px solid #e0e0e0;
}

.icn-present-confirm__item {
	margin: 0;
	padding: 0.9rem 0;
	border-bottom: 1px solid #e0e0e0;
}

.icn-present-confirm__label {
	margin: 0 0 0.3rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: #555;
}

.icn-present-confirm__value {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
	word-break: break-word;
}

.icn-present-confirm__errors {
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem;
	border: 1px solid #d63638;
	border-radius: 6px;
	background: #fcf0f1;
	color: #b32d2e;
	font-size: 0.9rem;
	font-weight: 700;
}

.icn-present-confirm__actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.icn-present-confirm__submit {
	display: block;
	width: 100%;
	padding: 0.9rem 1rem;
	border: 0;
	border-radius: 6px;
	background: #06c755;
	color: #fff;
	font-size: 1.05rem;
	font-weight: 700;
	cursor: pointer;
}

.icn-present-confirm__submit:hover,
.icn-present-confirm__submit:focus {
	background: #05b34c;
}

.icn-present-confirm__submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.icn-present-confirm__edit {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid #bbb;
	border-radius: 6px;
	background: #f2f2f2;
	color: #333;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
}

.icn-present-confirm__edit:hover,
.icn-present-confirm__edit:focus {
	background: #e8e8e8;
}

.icn-present-confirm__edit:disabled {
	opacity: 0.6;
	cursor: default;
}
