/* 약관 동의 (views/partials/terms_agreement.ejs) */
.terms-agree {
	background: #f5f6f8;
	border-radius: 16px;
	padding: 4px 14px;
	margin-bottom: 16px;
	box-sizing: border-box;
	width: 100%;
}

.terms-agree__row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.terms-agree__row .terms-agree__item {
	flex: 1;
	min-width: 0;
}

.terms-agree__item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 0;
	font-size: 14px;
	line-height: 1.4;
	color: #222;
	cursor: pointer;
}

.terms-agree__item--all {
	font-weight: 600;
	padding: 10px 0;
	border-bottom: 1px solid #e3e6ec;
	margin-bottom: 3px;
}

.terms-agree__input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.terms-agree__check {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #d5d9e0;
	position: relative;
	transition: background 0.15s ease;
}

.terms-agree__check::after {
	content: '';
	position: absolute;
	left: 7px;
	top: 3.5px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.terms-agree__input:checked + .terms-agree__check {
	background: #2ec4b6;
}

.terms-agree__input:focus-visible + .terms-agree__check {
	outline: 2px solid #4a90e2;
	outline-offset: 2px;
}

.terms-agree__badge {
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: 600;
	padding: 1px 5px;
	border-radius: 4px;
	background: #e6e8ec;
	color: #6b7280;
}

.terms-agree__badge--required {
	background: #d9f5f1;
	color: #149c8f;
}

.terms-agree__text {
	min-width: 0;
	word-break: keep-all;
}

.terms-agree__view {
	flex: 0 0 auto;
	border: 0;
	background: none;
	padding: 4px 0 4px 4px;
	font-size: 12px;
	color: #8a8f98;
	text-decoration: underline;
	cursor: pointer;
}

.terms-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.terms-modal[hidden] {
	display: none;
}

.terms-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.terms-modal__panel {
	position: relative;
	width: 100%;
	max-width: 560px;
	height: min(80vh, 720px);
	background: #fff;
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.terms-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #eceef2;
}

.terms-modal__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
}

.terms-modal__close {
	border: 0;
	background: none;
	font-size: 18px;
	color: #666;
	cursor: pointer;
	padding: 4px 8px;
}

.terms-modal__frame {
	flex: 1;
	width: 100%;
	border: 0;
}

.terms-modal__footer {
	padding: 12px 20px 16px;
	border-top: 1px solid #eceef2;
}

.terms-modal__agree {
	width: 100%;
	height: 48px;
	border: 0;
	border-radius: 10px;
	background: #4a90e2;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.terms-modal__panel--confirm {
	height: auto;
	max-width: 360px;
	padding: 28px 24px 20px;
	align-items: center;
	text-align: center;
	gap: 10px;
}

.terms-optional__icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #d9f5f1;
	color: #149c8f;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 4px;
}

.terms-optional__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #222;
	word-break: keep-all;
}

.terms-optional__body {
	margin: 0 0 10px;
	font-size: 14px;
	line-height: 1.5;
	color: #666;
	word-break: keep-all;
}

.terms-optional__skip {
	width: 100%;
	height: 44px;
	border: 0;
	background: none;
	color: #8a8f98;
	font-size: 14px;
	cursor: pointer;
}

body.terms-modal-open {
	overflow: hidden;
}
