/* ============================================================
   tex-accessibility.css
   "안내사항" 단계 분리 마크업 스타일
   - Figma 1:472(컨테이너) + 1:474(내부 카드) 시안 반영
   - KWCAG 2.2 명도 대비 4.5:1 / 큰글자(≥18pt 또는 ≥14pt Bold) 3:1 충족
   - 이미지 텍스트 미사용(HTML 텍스트로 분리)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Jua&display=swap');

:root {
	/* Outer container */
	--tex-bg-outer: #FF4273;       /* 분홍 외곽 BG (장식 영역, 텍스트와 직접 접하지 않음) */

	/* Surfaces */
	--tex-bg-panel: #FFFFFF;       /* 본문 카드 */
	--tex-bg-caution: #F8F8F8;     /* 주의사항 박스 */

	/* Tabs */
	--tex-tab-bg: #0886B4;          /* 비활성 탭 BG (White 4.62:1 AA pass) */
	--tex-tab-text: #FFFFFF;        /* 비활성 탭 텍스트 */
	--tex-tab-active-bg: #FFFFFF;   /* 활성 탭 BG */
	--tex-tab-active-text: #0886B4; /* 활성 탭 텍스트 */

	/* Text */
	--tex-text: #111111;            /* 본문 (White 18.88:1) */
	--tex-text-strong: #000000;     /* 주의사항 본문 (White 21:1) */
	--tex-text-note: #444444;       /* 작은 부연 (F8F8F8 대비 9.51:1) */
	--tex-text-title: #111111;

	/* Accents (Figma ts1/ts2) — 강조어는 20~24px Bold(Large Text 기준 3:1 통과) */
	--tex-accent-warn: #FF4273;     /* ts1 분홍 (White 3.85:1, Large Text AA pass) */
	--tex-accent-teal: #3797A4;     /* ts2 청록 (F8F8F8 3.39:1, Large Text AA pass) */

	/* CTA */
	--tex-cta-bg: #0886B4;
	--tex-cta-bg-hover: #066687;
	--tex-cta-text: #FFFFFF;
	--tex-focus-ring: #B81338;

	/* Geometry */
	--tex-radius-tab: 20px;
	--tex-radius-panel: 24px;
	--tex-radius-caution: 20px;
	--tex-radius-btn: 8px;

	/* Type */
	--tex-font: "S-Core Dream", "Pretendard", "Noto Sans KR", system-ui, sans-serif;
}

/* ----- 박스 모델 리셋 (작업 영역 한정) ----- */
.tex-step,
.tex-step *,
.tex-step *::before,
.tex-step *::after {
	box-sizing: border-box;
}

/* ----- 스크린리더 전용 텍스트 ----- */
.tex-step .sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ----- 컨테이너 (분홍 외곽 + 패턴) ----- */
.tex-step {
	position: relative;
	max-width: 910px;
	margin: 0 auto;
	padding: 16px 20px 40px;
	color: var(--tex-text);
	font-family: var(--tex-font);
	letter-spacing: -0.02em;
	background-color: var(--tex-bg-outer);
	background-image: url("/site/www/images/contents/tax/bg_pattern.png");
	background-repeat: repeat;
	background-size: 223px auto;
	background-position: left top;
}

/* ----- 헤더 (세로 스택: 로고 → 타이틀) ----- */
.tex-step__head {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	margin: 0 0 8px;
}

.tex-step__logo {
	width: 90px;
	height: auto;
	align-self: flex-end;
}

.tex-step .tex-step__title {
	display: block;
	width: 100%;
	margin: 0 auto;
	padding: 0;
	font-family: "Jua", var(--tex-font);
	font-size: clamp(28px, 5.4vw, 64px);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: 0;
	white-space: nowrap;
	text-align: center;
	color: #F9DC00;
	-webkit-text-stroke: 3px #000000;
	paint-order: stroke fill;
	text-shadow: 5px 5px 0 #000000;
}

/* ----- 단계 인디케이터 (화살표 chevron, 비대화형 텍스트) ----- */
.tex-tabs__list {
	display: flex;
	list-style: none;
	margin: 0 0 4px;
	padding: 0;
}

.tex-tabs__item {
	flex: 1 1 0;
	display: flex;
	min-width: 0;
}

.tex-tabs__item:not(:first-child) {
	margin-left: -20px;
}

.tex-tabs__step {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 58px;
	padding: 8px 28px;
	background: var(--tex-tab-bg);
	color: var(--tex-tab-text);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.1;
	text-align: center;
	clip-path: polygon(
		0 0,
		calc(100% - 24px) 0,
		100% 50%,
		calc(100% - 24px) 100%,
		0 100%,
		24px 50%
	);
}

/* 활성 단계 — 색 반전 + 굵기로 이중 표시 (색에만 의존하지 않음) */
.tex-tabs__item--current .tex-tabs__step {
	background: var(--tex-tab-active-bg);
	color: var(--tex-tab-active-text);
	font-weight: 800;
}

/* ----- 본문 카드 ----- */
.tex-panel {
	background: var(--tex-bg-panel);
	border-radius: 0 0 var(--tex-radius-panel) var(--tex-radius-panel);
	padding: 0 0 48px;
}

/* 인트로 (마스코트 + 안내 문구) */
.tex-panel__intro {
	display: flex;
	gap: 20px;
	align-items: center;
	justify-content: flex-start;
	padding: 48px 24px;
}

.tex-panel__mascot {
	flex: 0 0 121px;
	width: 121px;
	height: auto;
}

.tex-info-list {
	flex: 1;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tex-info-list > li {
	position: relative;
	margin: 0;
	padding-left: 20px;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--tex-text);
}

.tex-info-list > li::before {
	content: "●";
	display: inline-block;
	position: absolute;
	left: 0;
	top: 0;
	width: 16px;
	font-size: 0.28em;
	line-height: 4.6;
	color: var(--tex-text);
	text-align: left;
}

/* 분홍 강조 (ts1) — Bold + ≥18pt → Large Text 3:1 통과 */
.tex-step .accent--warn {
	font-style: normal;
	font-weight: 700;
	color: var(--tex-accent-warn);
}

/* 청록 강조 (ts2) — Bold + ≥18pt → Large Text 3:1 통과 */
.tex-step .accent--teal {
	font-style: normal;
	font-weight: 700;
	color: var(--tex-accent-teal);
}

/* ----- 주의사항 영역 ----- */
.tex-caution-wrap {
	padding: 0 20px;
}

.tex-caution__title {
	margin: 0 0 12px;
	font-size: 24px;
	font-weight: 700;
	color: var(--tex-text-title);
}

.tex-caution {
	background: var(--tex-bg-caution);
	border-radius: var(--tex-radius-caution);
	padding: 24px;
}

.tex-caution__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tex-caution__list > li {
	position: relative;
	margin: 0;
	padding-left: 18px;
	font-size: 19px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--tex-text-strong);
}

.tex-caution__list > li::before {
	content: "●";
	display: inline-block;
	position: absolute;
	left: 0;
	top: 0;
	width: 14px;
	font-size: 0.25em;
	line-height: 5;
	color: var(--tex-text-strong);
	text-align: left;
}

.tex-caution__note {
	margin: 6px 0 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--tex-text-note);
}

/* ----- 시작하기 버튼 ----- */
.tex-actions {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}

.btn-start,
.btn-start:link,
.btn-start:visited,
.btn-start:hover,
.btn-start:focus,
.btn-start:active {
	color: #FFFFFF;
	text-decoration: none;
}

.btn-start {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 200px;
	padding: 18px 40px;
	background: var(--tex-cta-bg);
	font-family: inherit;
	font-size: 24px;
	font-weight: 700;
	border: 0;
	border-radius: var(--tex-radius-btn);
	cursor: pointer;
	transition: background-color .15s ease;
}

.btn-start:hover {
	background: var(--tex-cta-bg-hover);
}

.btn-start:focus-visible {
	outline: 3px solid var(--tex-focus-ring);
	outline-offset: 3px;
	background: var(--tex-cta-bg-hover);
}

/* ----- 반응형 ----- */
@media (max-width: 768px) {
	.tex-step { padding: 12px 14px 24px; }
	.tex-step__head {
		gap: 4px;
		margin-bottom: 12px;
	}
	.tex-step .tex-step__title {
		-webkit-text-stroke-width: 2px;
		text-shadow: 2px 2px 0 #000000;
	}
	.tex-step__logo { width: 68px; }
	.tex-tabs__item:not(:first-child) {
		margin-left: -14px;
	}
	.tex-tabs__step {
		font-size: 13px /*15px*/;
		height: 48px;
		padding: 6px 22px;
		clip-path: polygon(
			0 0,
			calc(100% - 16px) 0,
			100% 50%,
			calc(100% - 16px) 100%,
			0 100%,
			16px 50%
		);
	}
	.tex-panel { padding-bottom: 32px; }
	.tex-panel__intro {
		flex-direction: column;
		align-items: center;
		text-align: left;
		gap: 16px;
		padding: 28px 20px;
	}
	.tex-panel__mascot { flex-basis: auto; width: 100px; }
	.tex-info-list > li { font-size: 17px; }
	.tex-caution-wrap { padding: 0 12px; }
	.tex-caution { padding: 18px; }
	.tex-caution__title { font-size: 20px; }
	.tex-caution__list > li { font-size: 16px; }
	.tex-caution__note { font-size: 13px; }
	.btn-start { min-width: 160px; padding: 14px 28px; font-size: 18px; }
}

/* ============================================================
   Step 4 (조회 결과) 전용 컴포넌트
   ============================================================ */

/* 멀티라인 타이틀 (white-space nowrap override) */
.tex-step .tex-step__title--multi {
	white-space: normal;
	font-size: clamp(26px, 5vw, 56px);
	line-height: 1.1;
}

/* 결과 패널 — 세션 단위 컨테이너 */
.tex-panel--result {
	padding: 32px 24px 36px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.tex-result-section {
	margin: 0;
}

.tex-result-section__title {
	margin: 0 0 14px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--tex-text-strong);
	text-align: left;
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.tex-result-section__sub {
	font-size: 18px;
	font-weight: 700;
	font-style: normal;
}

/* 기본사항 박스 */
.tex-result-box {
	background: var(--tex-bg-caution);
	border-radius: var(--tex-radius-caution);
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tex-result-info {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 16px;
}

.tex-result-info__field {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 10px;
}

.tex-result-price {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 16px;
}

/* 결과 알약 (값 표시 박스) */
.tex-result-pill {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 18px;
	background: #FFFFFF;
	border: 1px solid #D9D9D9;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 600;
	color: var(--tex-text-strong);
	box-sizing: border-box;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tex-result-pill--price {
	height: 48px;
	padding: 0 24px;
	justify-content: flex-end;
	font-size: 18px;
	font-weight: 700;
	color:red;
}

.tex-result-box__note {
	margin: 4px 0 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--tex-text-note);
}

/* 세금 테이블 (좌/우 비교) - 회색 외곽 박스 안에 흰 테이블 */
.tex-tax-tables {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	background: var(--tex-bg-caution);
	border-radius: var(--tex-radius-caution);
	padding: 20px;
}

.tex-tax-table {
	display: flex;
	flex-direction: column;
}

.tex-tax-table__card {
	background: #FFFFFF;
	border-radius: 14px;
	overflow: hidden;
}

.tex-tax-table__head {
	margin: 0;
	padding: 12px 18px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	color: #FFFFFF;
}

.tex-tax-table--general .tex-tax-table__head {
	background: var(--tex-tab-active-text); /* dark teal #094452 변수 활용 */
}

/* dark teal hex 직접 보정 */
.tex-tax-table--general .tex-tax-table__head {
	background: #094452;
}

.tex-tax-table--special .tex-tax-table__head {
	background: var(--tex-tab-bg); /* cyan #0886B4 — 활성탭과 통일 */
}

.tex-tax-table__body {
	margin: 0;
	padding: 10px 18px 0;
	display: flex;
	flex-direction: column;
}

.tex-tax-table__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	font-size: 15px;
	font-weight: 500;
	color: var(--tex-text-strong);
	border-bottom: 1px solid #E0E0E0;
}

.tex-tax-table__row dt,
.tex-tax-table__row dd {
	margin: 0;
}

.tex-tax-table__row dd {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.tex-tax-table__row--total {
	margin: 4px -18px 0;
	padding: 10px 18px;
	background: #FFE99D;
	border-bottom: none;
	font-weight: 700;
	font-size: 16px;
}

.tex-tax-table__row--total dd {
	color:red;
	font-size:18px;
}

.tex-tax-table__note {
	margin: 10px 0 0;
	padding: 0 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--tex-text-strong);
}

.tex-tax-table__note + .tex-tax-table__note {
	margin-top: 4px;
}

/* 결과 주의사항 박스 */
.tex-result-box--caution {
	gap: 8px;
}

.tex-result-box--caution .tex-caution__list > li {
	font-size: 16px;
}

/* Step 4 반응형 */
@media (max-width: 768px) {
	.tex-panel--result {
		padding: 20px 14px 24px;
		gap: 20px;
	}
	.tex-result-section__title { font-size: 17px; }
	.tex-result-section__sub { font-size: 14px; }
	.tex-result-box {
		padding: 16px 14px;
		gap: 10px;
	}
	.tex-result-info {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.tex-result-info__field {
		grid-template-columns: 64px 1fr;
	}
	.tex-result-price {
		grid-template-columns: 80px 1fr;
		gap: 10px;
	}
	.tex-result-pill {
		height: 38px;
		padding: 0 14px;
		font-size: 14px;
	}
	.tex-result-pill--price {
		height: 40px;
		padding: 0 18px;
		font-size: 15px;
	}
	.tex-result-box__note { font-size: 12px; }

	.tex-tax-tables {
		grid-template-columns: 1fr;
		gap: 14px;
		padding: 14px;
	}
	.tex-tax-table__card { border-radius: 12px; }
	.tex-tax-table__head { font-size: 14px; padding: 10px 14px; }
	.tex-tax-table__body { padding: 8px 14px 0; }
	.tex-tax-table__row { font-size: 13px; padding: 7px 0; }
	.tex-tax-table__row--total {
		margin: 4px -14px 0;
		padding: 9px 14px;
		font-size: 14px;
	}
	.tex-tax-table__note { font-size: 13px; margin-top: 8px; padding: 0 4px; }
	.tex-tax-table__note + .tex-tax-table__note { margin-top: 3px; }
}

/* ============================================================
   Step 3 (조회하기) 전용 컴포넌트 - 입력 폼
   ============================================================ */

.tex-form {
	background: var(--tex-bg-caution);
	border-radius: var(--tex-radius-caution);
	padding: 24px 28px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tex-form__row {
	display: grid;
	align-items: center;
	gap: 16px;
}

.tex-form__row--full {
	grid-template-columns: 80px 1fr;
}

.tex-form__row--split {
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.tex-form__field {
	display: grid;
	grid-template-columns: 40px 1fr;
	align-items: center;
	gap: 12px;
}

.tex-form__label {
	font-size: 20px;
	font-weight: 700;
	color: var(--tex-text-strong);
	line-height: 1.2;
}

.tex-form__value {
	display: inline-block;
	padding: 0 4px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--tex-text-strong);
	word-break: keep-all;
}

.tex-form .tex-form__input,
.tex-step .tex-form__input {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 100%;
	height: 48px;
	padding: 0 22px;
	background: #FFFFFF;
	border: 1px solid #D9D9D9;
	border-radius: 999px;
	font-family: inherit;
	font-size: 18px;
	font-weight: 500;
	color: var(--tex-text-strong);
	text-align: right;
	box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
	outline: none;
}

.tex-form__input::placeholder {
	color: #8E8E8E;
	font-weight: 500;
}

.tex-form__input:hover {
	border-color: #B0B0B0;
}

.tex-form__input:focus,
.tex-form__input:focus-visible {
	outline: none;
	border-color: var(--tex-cta-bg);
	box-shadow: 0 0 0 3px rgba(8, 134, 180, 0.25);
}

/* 잠금 상태 - 디자인은 입력창, 실제 클릭/입력/포커스 불가 */
.tex-form .tex-form__input--locked,
.tex-step .tex-form__input--locked {
	text-align: left;
	color: #000000;
	font-weight: 600;
	pointer-events: none;
	cursor: default;
	user-select: none;
}

.tex-form .tex-form__input--locked:hover,
.tex-form .tex-form__input--locked:focus,
.tex-step .tex-form__input--locked:hover,
.tex-step .tex-form__input--locked:focus {
	border-color: #D9D9D9;
	box-shadow: none;
}

.tex-form__note {
	margin: 6px 0 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--tex-text-note);
}

/* Step 3 반응형 */
@media (max-width: 768px) {
	.tex-form {
		padding: 18px 16px;
		gap: 12px;
	}
	.tex-form__row--full {
		grid-template-columns: 64px 1fr;
		gap: 10px;
	}
	.tex-form__row--split {
		gap: 12px;
	}
	.tex-form__field {
		grid-template-columns: 32px 1fr;
		gap: 8px;
	}
	.tex-form__label { font-size: 15px; }
	.tex-form__input {
		height: 40px;
		padding: 0 14px;
		font-size: 14px;
		border-radius: 999px;
	}
	.tex-form__note { font-size: 12px; }

	.tex-form .tex-form__input,
	.tex-step .tex-form__input  {
		font-size: 14px;
	}
}

/* ============================================================
   Step 2 (재산세 상식) 전용 컴포넌트
   ============================================================ */

/* 외곽 배경 청록 변형 (Step 2~4 공통) */
.tex-step--knowledge,
.tex-step--search,
.tex-step--result {
	--tex-bg-outer: #34BFD4;
}

/* ----- Q&A 리스트 ----- */
.tex-qa-list {
	list-style: none;
	margin: 0;
	padding: 48px 24px 16px;
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.tex-qa-item {
	position: relative;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* 질문 (스피치 버블) - CSS-only, 텍스트 줄바꿈 시 높이 자동 확장 */
.tex-qa-item__question {
	position: relative;
	display: inline-block;
	max-width: 100%;
	min-height: 60px;
	padding: 15px 36px 15px 50px;
	background: #EDEDED;
	border-radius: 30px;
	box-sizing: border-box;
	filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.25));
}

/* 좌하단 꼬리 (말풍선 tail) */
.tex-qa-item__question::before {
	content: "";
	position: absolute;
	left: -14px;
	bottom: -10px;
	width: 32px;
	height: 28px;
	background: #EDEDED;
	clip-path: polygon(100% 0%, 100% 100%, 0% 100%);
}

.tex-qa-item__q-text {
	display: block;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	color: #000000;
	word-break: keep-all;
}

/* 질문 강조어 - 회색 버블(#EDEDED) 위에서 AA 대비 확보 */
.tex-qa-item__question .accent--warn {
	color: #C9183B;
}

/* 답변 (분홍 알약) */
.tex-qa-item__answer {
	display: inline-block;
	margin: 24px 0 0;
	padding: 16px 32px;
	background: #FFE4F2;
	border-radius: 1000px;
	box-shadow: 4px 4px 4px 0 rgba(0, 0, 0, 0.25);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	color: #000000;
	max-width: 100%;
}

/* 답변 배치 (Figma locationRelativeToParent 반영) */
.tex-qa-item__answer--pos1 { margin-left: clamp(0px, 13vw, 109px); }
.tex-qa-item__answer--pos2 { margin-left: clamp(0px, 6vw, 48px); }
.tex-qa-item__answer--pos3 { margin-left: clamp(0px, 20vw, 172px); }

/* 답변 강조어 - 연분홍 알약(#FFE4F2) 위에서도 AA Large 통과 */
.tex-qa-item__answer .accent--warn {
	color: #C9183B;
}

.tex-qa-item__answer-note {
	display: inline;
	font-size: 16px;
	font-weight: 500;
	color: #555555;
	white-space: nowrap;
}

/* Step 2 패널 - 마지막 액션 영역 패딩 */
.tex-step--knowledge .tex-panel { padding-bottom: 48px; }
.tex-step--knowledge .tex-actions { margin-top: 0; }

/* Step 2 반응형 */
@media (max-width: 768px) {
	.tex-qa-list {
		padding: 28px 16px 8px;
		gap: 28px;
	}
	.tex-qa-item__question {
		min-height: 48px;
		padding: 11px 24px 11px 32px;
		border-radius: 24px;
	}
	.tex-qa-item__question::before {
		left: -10px;
		bottom: -8px;
		width: 22px;
		height: 18px;
	}
	.tex-qa-item__q-text { font-size: 15px; }
	.tex-qa-item__answer {
		margin-top: 14px;
		padding: 12px 22px;
		font-size: 15px;
	}
	.tex-qa-item__answer--pos1,
	.tex-qa-item__answer--pos2,
	.tex-qa-item__answer--pos3 { margin-left: 16px; }
	.tex-qa-item__answer-note { font-size: 12px; }
}

/* ----- 모션 민감 사용자 배려 ----- */
@media (prefers-reduced-motion: reduce) {
	.btn-start { transition: none; }
}
