/*
	button: start
*/
.btn { /* medium */
	display: inline-flex;
	justify-content: center;
	align-items: center;
	gap: var(--spacing-3);
	padding: calc(var(--spacing) * 5) calc(var(--spacing) * 11); /* 12px 24px => 10px 22px */
	border-radius: var(--radius);
	border: 2px solid var(--secondary);
	background: var(--secondary);
	font-size: var(--text-body-lg);
	font-weight: 700;
	line-height: 1.5; /* 24px */
	letter-spacing: calc(var(--text-heading-md) * var(--letter-spacing-ratio));
	color: var(--white);
	transition: var(--transition);
}

.btn:hover {
	background: var(--blue-900);
}

.btn .btn__text {
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	color: inherit;
}

/* 기존 아이콘 (showPlus, showArrow)에만 적용 */
.btn .icon:not(.icon--custom) svg path {
	stroke: var(--white);
}

.btn .icon {
	display: inline-flex;
}

/* 크기 */
.btn--small {
	padding: var(--spacing-3) calc(var(--spacing) * 7); /* 10px 16px => 8px 14px */
	font-size: var(--text-body-md);
	line-height: 1.4285; /* 20px */
}

.btn--small .icon svg {
	width: 16px;
	height: 16px;
}

.btn--large {
	padding: calc(var(--spacing) * 7) calc(var(--spacing) * 15); /* 16px 32px => 14px 30px */
	font-size: var(--text-body-xl);
	line-height: 1.3333; /* 24px */
}

.btn-icon.btn--fit {
	padding: 0;
	border: none;
}

/* 아이콘 숨김 */
.hide-plus .icon--plus,
.hide-arrow .icon--arrow {
	display: none;
}

/* 타입: Secondary */
.btn--secondary {
	background: var(--gray-600);
	border-color: var(--gray-600);
	color: var(--white);
}

.btn--secondary:hover {
	background: var(--black);
}

/* Secondary 버튼의 기존 아이콘에만 적용 */
.btn--secondary .icon:not(.icon--custom) svg {
	stroke: var(--white);
}

/* 타입: Tertiary */
.btn--tertiary {
	background: var(--white);
	border: 2px solid var(--color-stroke);
	color: var(--text-primary);
}

.btn--tertiary:hover {
	background: var(--white);
	border-color: var(--secondary);
	color: var(--secondary);
}

/* Tertiary 버튼의 기존 아이콘에만 적용 */
.btn--tertiary .icon:not(.icon--custom) svg path {
	stroke: var(--text-primary);
}

.btn--tertiary:hover .icon:not(.icon--custom) svg path {
	stroke: var(--secondary);
}

/* 타입: Text */
.btn--text {
	gap: var(--spacing-2);
	padding: var(--spacing-2) var(--spacing);
	background: transparent;
	border-color: transparent;
	color: var(--text-primary);
}

.btn--text:hover {
	background: transparent;
	color: var(--secondary);
}

/* Text 버튼의 기존 아이콘에만 적용 */
.btn--text .icon:not(.icon--custom) svg path {
	stroke: var(--text-primary);
}

.btn--text:hover .icon:not(.icon--custom) svg path {
	stroke: var(--secondary);
}

/* 비활성 */
.btn.is-disabled,
.btn:disabled {
	background: var(--gray-200);
	border-color: var(--gray-200);
	color: var(--text-disabled);
	cursor: not-allowed;
	pointer-events: none;
}

/* 기본 버튼 비활성 상태 - 기존 아이콘에만 적용 */
.btn.is-disabled .icon:not(.icon--custom) svg path,
.btn:disabled .icon:not(.icon--custom) svg path {
	stroke: var(--text-disabled);
}

/* 비활성: tertiary */
.btn--tertiary.is-disabled,
.btn--tertiary:disabled {
	background: var(--white);
	color: var(--gray-200);
	cursor: not-allowed;
}

.btn--tertiary.is-disabled:hover,
.btn--tertiary:disabled:hover {
	border-color: var(--gray-200);
}

/* Tertiary 버튼 비활성 상태 - 기존 아이콘에만 적용 */
.btn--tertiary.is-disabled .icon:not(.icon--custom) svg path,
.btn--tertiary:disabled .icon:not(.icon--custom) svg path {
	stroke: var(--gray-200);
}

/* 비활성: text */
.btn--text.is-disabled,
.btn--text:disabled {
	background: var(--white);
	border-color: transparent;
	color: var(--gray-200);
	cursor: not-allowed;
}

/* Text 버튼 비활성 상태 - 기존 아이콘에만 적용 */
.btn--text.is-disabled .icon:not(.icon--custom) svg path,
.btn--text:disabled .icon:not(.icon--custom) svg path {
	stroke: var(--gray-200);
}

.btn.full {
	width: 100%;
}

/* btn text + extraClass btn--edit-gray*/
.btn--text.btn--edit-gray {
	--letter-spacing-ratio: -0.004%;
	font-weight: 500;
	color: var(--gray-400);
}

.btn--text.btn--edit-gray .icon svg path {
	stroke: var(--gray-400);
}

.btn--text.btn--edit-gray:hover .icon svg path {
	stroke: var(--secondary);
}

/*
	button: end
*/

/*
	icon_button: start
*/
.btn-icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: fit-content;
	height: fit-content;
	padding: calc(var(--spacing) * 5); /* 12px => 10px */
	border-radius: var(--radius);
	border: 2px solid var(--secondary);
	background: var(--secondary);
	color: var(--white);
	transition: var(--transition);
}

.btn-icon:hover {
	border-color: var(--blue-900);
	background: var(--blue-900);
}

.btn-icon svg {
	width: 24px;
	height: 24px;
}

.btn-icon svg path {
	stroke: var(--white);
}

.btn-icon.btn--small {
	padding: calc(var(--spacing) * 3); /* 8px => 6px */
}

.btn-icon.btn--large svg {
	width: 32px;
	height: 32px;
}

/* isCircle */
.btn-icon.is-circle {
	border-radius: 100%;
}

/* 타입별 색상 */
.btn-icon.btn--secondary {
	border-color: var(--gray-600);
	background: var(--gray-600);
	color: var(--white);
}

.btn-icon.btn--secondary:hover {
	background: var(--black);
}

.btn-icon.btn--tertiary {
	border-color: var(--color-stroke);
	background: var(--white);
	color: var(--text-primary);
}

.btn-icon.btn--tertiary svg path {
	stroke: var(--text-primary);
}

.btn-icon.btn--tertiary:hover {
	border-color: var(--secondary);
}

.btn-icon.btn--tertiary:hover svg path {
	stroke: var(--secondary);
}

.btn-icon.btn--grayscale {
	border-color: var(--gray-200);
	background: var(--gray-200);
	color: var(--white);
}

.btn-icon.btn--grayscale:hover {
	border-color: var(--gray-300);
	background: var(--gray-300);
}

.btn-icon.btn--grayscale svg path {
	stroke: var(--text-primary);
}

.btn-icon.btn--grayscale:hover svg path {
	stroke: var(--white);
}

.btn-icon.btn--base {
	border-color: transparent;
	background: transparent;
	color: var(--text-primary);
}

.btn-icon.btn--base svg path {
	stroke: var(--text-primary);
}

.btn-icon.btn--base:hover svg path {
	stroke: var(--secondary);
}

/* disabled */
.btn-icon.is-disabled,
.btn-icon:disabled {
	border-color: var(--gray-200);
	background: var(--gray-200);
	color: var(--text-disabled);
	cursor: not-allowed;
	pointer-events: none;
}

.btn-icon.is-disabled svg path,
.btn-icon:disabled svg path {
	stroke: var(--text-disabled);
}

.btn-icon.btn--tertiary.is-disabled,
.btn-icon.btn--tertiary:disabled {
	background: var(--white);
}

.btn-icon.btn--base.is-disabled,
.btn-icon.btn--base:disabled {
	background: transparent;
	border-color: transparent;
}

/* extra class */
.w-full {
	width: 100%;
}

/*
	icon_button: end
*/

/*
	radio button: start
	@see /docs/components/radio_button.md
*/
.radio-group {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-4);
}

.radio-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--spacing-3);
	padding: var(--spacing-4);
	border-radius: var(--radius-2);
	transition: var(--transition);
	cursor: pointer;
}

.radio-wrapper input[type="radio"] {
	position: absolute;
	opacity: 0;
	appearance: none;
	-webkit-appearance: none;
}

.custom-radio {
	position: relative;
	box-sizing: border-box;
	flex-shrink: 0;
	width: calc(var(--spacing) * 9);
	height: calc(var(--spacing) * 9);
	aspect-ratio: 1;
	border-radius: var(--radius-6);
	border: 1px solid var(--gray-300);
	background: var(--gray-100);
	transition: var(--transition);
}

.custom-radio::after {
	content: "";
	opacity: 0;
	position: absolute;
	top: 3px;
	left: 3px;
	width: calc(var(--spacing) * 5);
	height: calc(var(--spacing) * 5);
	border-radius: var(--radius-6);
	background-color: var(--white);
	transition: var(--transition);
}

.radio-wrapper input[type="radio"]:checked ~ .custom-radio {
	border-color: var(--primary);
	background: var(--primary);
}

.radio-wrapper input[type="radio"]:checked ~ .custom-radio::after {
	opacity: 1;
}

.radio-wrapper:has(input[type="radio"]:checked ~ .radio-label) {
	background: var(--blue-100);
}

.radio-label {
	font-size: var(--text-body-lg);
	line-height: 1.5; /* 24px */
	transition: var(--transition);
}

/*
	radio button: end
*/

/*
	checkbox: start
	@see /docs/components/checkbox.md
*/
.custom-checkbox {
	display: inline-flex;
	align-items: center;
	gap: var(--spacing-3);
	padding: var(--spacing-4);
	border-radius: var(--radius-2);
	font-size: var(--text-body-lg);
	line-height: 1.5; /* 24px */
	transition: var(--transition);
	user-select: none;
	cursor: pointer;
}

.custom-checkbox input[type="checkbox"] {
	display: none;
}

.custom-checkbox .checkmark {
	position: relative;
	width: calc(var(--spacing) * 9);
	height: calc(var(--spacing) * 9);
	border-radius: 3px;
	border: 1px solid var(--gray-300);
	background: var(--gray-100);
	transition: var(--transition);
}

.custom-checkbox .checkmark:after {
	content: '';
	opacity: 0;
	position: absolute;
	top: -1px;
	left: -1px;
	width: calc(100% + 2px);
	height: calc(100% + 2px);
	background-image: url("/assets/icons/ic_checkbox_check.svg");
	transition: var(--transition);
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark {
	border: 1px solid var(--primary);
	background: var(--primary);
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark::after {
	opacity: 1;
}

.custom-checkbox:has(input[type="checkbox"]:checked ~ .label-text):not(.no-bg) {
	background: var(--blue-100);
}

.custom-checkbox .label-text {
	font-size: var(--text-body-lg);
	line-height: 1.5; /* 24px */
	transition: var(--transition);
}

/* just check */
.custom-checkbox .checkmark.just-check {
	border: none;
	background: transparent url("/assets/icons/ic_checkbox_just_check.svg");
	filter: brightness(0) saturate(100%) invert(90%) sepia(4%) saturate(18%) hue-rotate(314deg) brightness(86%) contrast(85%);
}

.custom-checkbox .checkmark.just-check:after {
	display: none;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark.just-check {
	border: none;
	background: transparent url("/assets/icons/ic_checkbox_just_check.svg");
	filter: none;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark.just-check::after {
	display: none;
}

/*
	checkbox: end
*/

/*
	form: start
*/
.form-item {
	display: flex;
	flex-direction: column;
}

.form-item .label {
	display: block;
	margin-bottom: 0;
	padding: 0 var(--spacing-3);
	font-size: var(--text-body-md);
	font-weight: 400;
	line-height: 1.4285; /* 20px */
	color: var(--gray-900);
}

.form-item .label:not(:empty) {
	margin-bottom: 8px;
}

.form-item .desc, .form-item .error-message, .form-item .char-count {
	padding: 0 var(--spacing-3);
	font-size: var(--text-body-sm);
	font-weight: 400;
	line-height: 1.3333; /* 16px */
}

.form-item .desc {
	color: var(--text-secondary);
}

.form-item .error-message {
	color: var(--red-text);
	margin-top: 0;
}

.form-item .error-message:not(:empty) {
	margin-top: 8px;
}

.form-item .char-count {
	text-align: right;
	color: var(--text-secondary);
}

.form-item .char-count span {
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: inherit;
}

.form-item .char-count .char-current {
	color: var(--primary);
}

/* input */
.input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.form-input {
	box-sizing: border-box;
	width: 100%;
	padding: calc(var(--spacing) * 5) var(--spacing-4);
	border-radius: var(--radius);
	border: 2px solid var(--gray-100);
	background: var(--gray-100);
	font-size: var(--text-body-lg);
	font-weight: 400;
	line-height: 1.5; /* 24px */
}

.input-wrapper:has(.left-icon) .form-input {
	padding-left: var(--spacing-9); /* 좌측 아이콘 공간 확보 */
}

.input-wrapper:has(.eye-toggle) .form-input {
	padding-right: var(--spacing-9); /* 눈 아이콘 공간 확보 */
}

.input-wrapper .input-icon {
	position: absolute;
	width: 24px;
	height: 24px;
	top: 50%;
	transform: translateY(-50%);
	cursor: pointer;
}

.input-wrapper .input-icon.left-icon {
	left: 12px;
}

.input-wrapper .input-icon.eye-toggle {
	right: 12px;
}

.form-input::placeholder {
	color: var(--gray-400);
}

/* typing (focus) */
.form-input:focus, .form-input:focus-visible, .form-input:active {
	border-color: var(--text-primary);
	background: var(--white);
}

/* textarea */
.form-textarea {
	width: 100%;
	min-height: 160px;
	padding: var(--spacing-5) var(--spacing-4);
	border-radius: var(--radius);
	border: 2px solid var(--gray-100);
	background: var(--gray-100);
	font-size: var(--text-body-lg);
	font-weight: 400;
	line-height: 1.5; /* 24px */

	box-sizing: border-box;
	resize: none;
	overflow-y: auto;
	/*overflow-y: scroll;*/
	overflow-x: hidden;

	scrollbar-width: thin; /* Firefox용 */
	scrollbar-color: var(--gray-300) var(--gray-200); /* Firefox 스크롤 스타일 */
}

/* 크롬, 엣지, 사파리용 스크롤 스타일 */
.form-textarea::-webkit-scrollbar {
	width: 4px;
}

.form-textarea::-webkit-scrollbar-thumb {
	border-radius: 2px;
	border: 2px solid transparent;
	background: var(--gray-300);
	background-clip: content-box;
}

.form-textarea::-webkit-scrollbar-track {
	background: var(--gray-200);
}

.form-textarea::placeholder {
	color: var(--gray-400);
}

.textarea-bottom {
	display: flex;
	justify-content: space-between;
	gap: var(--spacing-3);
	width: 100%;
}

.textarea-bottom .left {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-3);
}

/* typing (focus) */
.form-textarea:focus, .form-textarea:focus-visible, .form-textarea:active {
	border-color: var(--text-primary);
	background: var(--white);
}

/* error */
.input-error, .textarea-error {
	border-color: var(--red-text);
	background: var(--white);
}

/* readonly: 아직 스타일 없음 */
.form-item:has(.form-input[readonly]) .form-input,
.form-item:has(.form-input[readonly]) .label,
.form-item:has(.form-textarea[readonly]) .form-textarea,
.form-item:has(.form-textarea[readonly]) .label {
}

.form-item:has(.form-input[readonly]) .form-input,
.form-item:has(.form-input[readonly]) .label,
.form-item:has(.form-input[readonly]) .desc,
.form-item:has(.form-textarea[readonly]) .form-textarea,
.form-item:has(.form-textarea[readonly]) .label,
.form-item:has(.form-textarea[readonly]) .desc {}

.form-item:has(.form-input[readonly]) .form-input::placeholder,
.form-item:has(.form-textarea[readonly]) .form-textarea::placeholder {}

/* disabled */
.input-disabled,
.form-item:has(.form-input:disabled) .form-input,
.textarea-disabled {
	border-color: var(--gray-200);
	background: var(--gray-200);
	pointer-events: none;
}

.form-input.input-disabled::placeholder,
.form-item:has(.form-input:disabled) .label,
.form-item:has(.form-input:disabled) .desc,
.form-textarea.textarea-disabled::placeholder,
.form-item:has(.form-textarea:disabled) .label,
.form-item:has(.form-textarea:disabled) .desc,
.form-item:has(.form-textarea:disabled) .char-count,
.form-item:has(.form-textarea:disabled) .char-count .char-current,
.form-item:has(.form-custom-selectbox:disabled) .label,
.form-item:has(.form-custom-selectbox:disabled) .desc {
	color: var(--gray-300);
}

.input-disabled,
.form-item:has(.form-input:disabled) .form-input,
.textarea-disabled,
.form-item:has(.form-textarea:disabled) .form-textarea {
	color: var(--gray-400);
}

.form-item:has(.form-input:disabled) .label,
.form-item:has(.form-textarea:disabled) .label {
	pointer-events: none;
}

.input-disabled::placeholder,
.form-item:has(.form-input:disabled) .form-input::placeholder,
.textarea-disabled::placeholder {
	color: var(--gray-250);
}

/*
	form: end
*/


/*
	custom selectbox: start
*/
.custom-selectbox-wrapper {
	position: relative;
	width: 100%;
	user-select: none;
}

.custom-selectbox-selected {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: calc(var(--spacing) * 5);
	width: 100%;
	padding: var(--spacing-4);
	border: 2px solid var(--gray-100);
	border-radius: var(--radius-2);
	background: var(--gray-100);
	cursor: pointer;
	transition: border 0.2s;
}

.custom-selectbox-selected:focus {
	border-color: var(--primary);
	background: var(--white);
}

.custom-selectbox-error {
	border-color: var(--red-text);
	background: var(--white);
}

.custom-selectbox-selected[data-disabled="1"] {
	border-color: var(--gray-200);
	background: var(--gray-200);
	color: var(--gray-300);
	pointer-events: none;
}

.custom-selectbox-selected .custom-selectbox-selected-label {
	font-size: var(--text-body-lg);
	font-weight: 400;
	line-height: 1.5; /* 24px */
}

.custom-selectbox-selected.is-placeholder .custom-selectbox-selected-label {
	color: var(--gray-400, #999999);
}

.custom-selectbox-selected:not(.is-placeholder) .custom-selectbox-selected-label {
	color: var(--black);
}

.custom-selectbox-option[data-disabled="1"] {
	color: #bbb;
	pointer-events: none;
}

.custom-selectbox-arrow {
	display: inline-block;
	width: 24px;
	height: 24px;
	background: url('/assets/icons/ic_chevron_down.svg') no-repeat center/cover;
}

.custom-selectbox-wrapper.open .custom-selectbox-arrow {
	background: url('/assets/icons/ic_chevron_up.svg') no-repeat center/cover;
}

/* right 타입 (ic_chevron_up.svg 사용) */
.custom-selectbox-arrow.right {
	background: url('/assets/icons/ic_chevron_right.svg') no-repeat center/cover;
}

.custom-selectbox-wrapper.open .custom-selectbox-arrow.right {
	background: url('/assets/icons/ic_chevron_up.svg') no-repeat center/cover;
}

/* 비활성화 상태 */
.custom-selectbox-selected[data-disabled="1"] .custom-selectbox-arrow {
	filter: brightness(0) saturate(100%) invert(90%) sepia(4%) saturate(18%) hue-rotate(314deg) brightness(86%) contrast(85%);
}

.custom-selectbox-options {
	z-index: 999999;
	position: fixed;
	left: 0;
	top: 0;
	display: none;
	min-width: 140px;
	max-width: 312px;
	max-height: 296px;
	padding: var(--spacing-4);
	border-radius: 8px;
	border: 1px solid var(--color-stroke, #e8e8e8);
	background: var(--white);
	box-shadow: var(--shadow-option-list);
	overflow-y: auto;
}

.custom-selectbox-wrapper.open .custom-selectbox-options,
.custom-selectbox-options[data-portaled="true"] {
	display: block;
}

.custom-selectbox-option {
	padding: var(--spacing-5);
	border-radius: var(--radius-2);
	font-size: var(--text-body-lg);
	font-weight: 400;
	line-height: 1.5; /* 24px */
	transition: var(--transition);
	cursor: pointer;
}

.custom-selectbox-option:hover {
	background: var(--gray-100);
	color: var(--secondary, #1c56ff);
}

.custom-selectbox-option.selected {
	background: var(--blue-100);
	color: var(--secondary, #1c56ff);
}

.custom-selectbox-sm .custom-selectbox-selected {
	padding: var(--spacing-3) var(--spacing-4);
	border-radius: var(--radius);
}

.custom-selectbox-sm .custom-selectbox-option {
	padding: var(--spacing-5) var(--spacing-4);
	border-radius: var(--radius);
	font-size: var(--text-body-md);
	line-height: 1.4285; /* 20px */
}

.custom-selectbox-md .custom-selectbox-selected {
	padding: var(--spacing-4);
	border-radius: var(--radius-2);
}

.custom-selectbox-md .custom-selectbox-option {
	padding: var(--spacing-5);
	border-radius: var(--radius-2);
}

.custom-selectbox-lg .custom-selectbox-selected,
.custom-selectbox-lg .custom-selectbox-option {
	padding: calc(var(--spacing) * 11) var(--spacing-5);
	border-radius: var(--radius-2);
	font-size: var(--text-body-xl);
	line-height: 1.3333; /* 24px */
}

/*
	custom selectbox: end
*/


/* mobile */
@media (max-width: 767px) {
	/* icon button */
	.btn-icon.btn--large.responsive-icon-button svg {
		width: 24px;
		height: 24px;
	}

	/* radio button, checkbox */
	.radio-wrapper, .custom-checkbox {
		gap: 5px;
		padding: calc(var(--spacing) * 5) 7px;
	}

	.radio-label, .custom-checkbox .label-text {
		font-size: var(--text-body-md);
		line-height: 1.4285; /* 20px */
	}
}

/* =========================================================================
   stepper  ========================================================================= */
.stepper-wrapper {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: var(--spacing-4);
	border-radius: var(--radius);
	overflow: hidden;
}

.stepper-btn {
	display: flex;
	justify-content: center;
	align-items: center;
	/*padding: var(--spacing-3);*/
	padding: 6px;
	border-radius: var(--radius-6);
	border: 2px solid var(--color-stroke);
	outline: none;
	background: transparent;
	color: var(--text-primary);
	cursor: pointer;
	transition: var(--transition);
}

.stepper-wrapper.small .stepper-btn {
	padding: calc(var(--spacing) * 3);
	border-width: 1.2px;
}

.stepper-btn:hover:not(:disabled) {
	border-color: var(--secondary);
}

.stepper-btn:disabled {
	color: var(--gray-300);
	cursor: not-allowed;
	pointer-events: none;
}

.stepper-btn svg {
	width: 24px;
	height: 24px;
}

.stepper-wrapper.small .stepper-btn svg {
	width: 12px;
	height: 12px;
}

.stepper-btn:disabled path {
	stroke: var(--gray-300);
}

.stepper-input {
	width: 48px;
	height: 48px;
	padding: var(--spacing-3) var(--spacing-2);
	border-radius: var(--radius-2);
	border: 2px solid var(--gray-100);
	outline: none;
	background: var(--gray-100);
	text-align: center;
	font-size: var(--text-body-lg);
	line-height: 1.5;
	color: var(--black);
	-webkit-appearance: none;
	-moz-appearance: textfield;
}

.stepper-wrapper.small .stepper-input {
	width: 40px;
	height: 28px;
	font-size: var(--text-body-md);
	line-height: 1.4285;
}

.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.stepper-input:focus, .stepper-input:focus-visible, .stepper-input:active {
	border-color: var(--secondary);
	background: var(--white);
}

.stepper-message {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	margin-top: var(--spacing-2);
	padding: var(--spacing-2) var(--spacing-3);
	background: var(--red-50);
	border: 1px solid var(--red-200);
	border-radius: var(--radius);
	font-size: var(--text-body-sm);
	color: var(--red-text);
	z-index: 10;
}

/* 크기별 스타일 */
.stepper--sm .stepper-btn {
	padding: var(--spacing-2);
}

.stepper--sm .stepper-btn svg {
	width: 16px;
	height: 16px;
}

.stepper--sm .stepper-input {
	width: 50px;
	font-size: var(--text-body-md);
	padding: var(--spacing-2) var(--spacing);
}

.stepper--lg .stepper-btn {
	padding: var(--spacing-4);
}

.stepper--lg .stepper-btn svg {
	width: 24px;
	height: 24px;
}

.stepper--lg .stepper-input {
	width: 80px;
	font-size: var(--text-body-xl);
	padding: var(--spacing-4) var(--spacing-3);
}

/* 비활성화 상태 */
.stepper-wrapper:has(.stepper-input:disabled) {
	/*background: var(--gray-200);*/
	border-color: var(--gray-200);
}

.stepper-wrapper:has(.stepper-input:disabled) .stepper-btn {
	color: var(--gray-300);
	cursor: not-allowed;
	pointer-events: none;
}

.stepper-wrapper:has(.stepper-input:disabled) .stepper-input {
	color: var(--gray-300);
}

/* 포커스 상태 */
.stepper-wrapper:focus-within {
	border-color: var(--text-primary);
	background: var(--white);
}

/* =========================================================================
   accordion  ========================================================================= */
.accordion {
	--bs-accordion-btn-icon-transform: rotate(-180deg);
}

.accordion-item {
	--bs-accordion-border-radius: 0;
	border: none
}

.accordion-header.with-checkbox {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--spacing-3);
}

.accordion-button:not(.collapsed) {
	color: var(--bs-accordion-active-color);
	background-color: unset;
	box-shadow: unset;
}

.accordion-button:focus {
	box-shadow: unset;
}

.accordion-header.with-checkbox .accordion-button {
	--bs-accordion-btn-padding-x: var(--spacing-4);
	--bs-accordion-btn-padding-y: var(--spacing-4);
	width: fit-content;
}

.accordion-body {
	--bs-accordion-body-padding-x: var(--spacing-5);
	--bs-accordion-body-padding-y: var(--spacing-5);
	border-radius: var(--radius-3);
	border: 1px solid var(--color-stroke);
}

/* =========================================================================
   input-with-button-box  ========================================================================= */
.input-with-button-box {
	display: flex;
	align-items: stretch;
	gap: var(--spacing-4);
	width: 100%;
	height: 100%;
}

/* Mobile Only Break Line */
/* 기본: 데스크탑 */
.responsive-br {
	display: inline;
	font: inherit;
	line-height: inherit;
	vertical-align: baseline;
	white-space: pre; /* 공백 유지 */
}

.responsive-br::after {
	content: " ";
	font: inherit;
	line-height: inherit;
	vertical-align: baseline;
}

/* =========================================================================
   강조 텍스트  ========================================================================= */
/* 부모 텍스트 조건 그대로 색만 바꾸기 */
.emphasis {
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	color: var(--secondary);
}
.emphasis.primary {
	color: var(--primary);
}

/* =========================================================================
   sticky menu  ========================================================================= */
.section-sticky-menu {
	z-index: 9;
	position: sticky;
	top: var(--header-h);
	width: 100%;
	background: var(--white);
	box-shadow: var(--shadow-top-menu);
	transform: translate3d(0, 0, 0);
	transition: all 0.2s ease-out;
	will-change: transform;
}
body:has(.header.fixed-off) .section-sticky-menu {
	top: 0;
}

.sticky-menu-list {
	display: flex;
	justify-content: space-around;
	align-items: center;
	max-width: var(--max-w);
	margin: 0 auto;
	border-bottom: 1px solid var(--color-stroke);
}

.sticky-menu-item a {
	display: flex;
	padding: 20px 48px;
}

.sticky-menu-item.active a {
	position: relative;
	font-weight: 500;
	color: var(--black);
}

.sticky-menu-item.active a::after {
	content: '';
	display: block;
	position: absolute;
	left: 0;
	bottom: 0;
	width: calc(100% - 72px);
	height: 2px;
	margin: 0 36px;
	background: var(--black);
	border-radius: 2px;
}

/* =========================================================================
   no-image  ========================================================================= */
.no-image {
	position: relative;
	background-color: var(--gray-200);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.no-image::before {
	content: '';
	display: block;
	padding-bottom: 100%; /* 1:1 비율 유지 */
}

.no-image::after {
	content: 'No Image';
	position: absolute;
	color: #999;
	font-size: 1rem;
	font-weight: 500;
}

/* 이미지 크기에 따른 폰트 크기 조정 */
.no-image.no-image-sm::after {
	font-size: 0.875rem;
}

.no-image.no-image-lg::after {
	font-size: 1.25rem;
}

.no-image.no-image-xl::after {
	font-size: 1.5rem;
}

/* 이미지 비율 클래스 */
.no-image.ratio-4-3::before {
	padding-bottom: 75%; /* 4:3 비율 */
}

.no-image.ratio-16-9::before {
	padding-bottom: 56.25%; /* 16:9 비율 */
}

.no-image.ratio-3-4::before {
	padding-bottom: 133.33%; /* 3:4 비율 */
}

.no-image.ratio-2-1::before {
	padding-bottom: 50%; /* 2:1 비율 */
}

/* 스와이퍼 내부 no-image 처리 */
.swiper-slide .no-image {
	width: 100%;
	height: 100%;
}

.swiper-slide .no-image::before {
	display: none; /* 스와이퍼는 자체적으로 비율을 관리하므로 제거 */
}

/* 제품 이미지 스와이퍼 no-image 처리 */
.product-image-swiper .no-image,
.product-image-thumbnail-swiper .no-image {
	background-color: var(--gray-200);
}

.product-image-swiper .no-image::after {
	font-size: 1.25rem;
}

.product-image-thumbnail-swiper .no-image::after {
	font-size: 0.75rem;
}

/* =========================================================================
   modal  ========================================================================= */
.modal {
    --modal-z-index: 1055;
    --modal-backdrop-z-index: 1050;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--modal-z-index);
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--modal-backdrop-z-index);
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

/* 모달이 여러개 있을 때 z-index 증가 */
.modal:nth-of-type(2) {
    --modal-z-index: 1065;
    --modal-backdrop-z-index: 1060;
}

.modal:nth-of-type(3) {
    --modal-z-index: 1075;
    --modal-backdrop-z-index: 1070;
}

.modal:nth-of-type(4) {
    --modal-z-index: 1085;
    --modal-backdrop-z-index: 1080;
}

/* 모달이 표시될 때 */
.modal.show {
    display: block;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    max-width: 500px;
    pointer-events: none;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-dialog.modal-sm {
    max-width: 300px;
}

.modal-dialog.modal-lg {
    max-width: 800px;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
	max-height: 100%;
    pointer-events: auto;
    background-color: var(--white);
    background-clip: padding-box;
    border: none;
    border-radius: var(--radius-3);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    outline: 0;
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.modal-title {
    margin: 0;
    line-height: 1.5;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-header .btn-close {
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
    border: 0;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='m.235.757 14.014 14.009m0-14.009L.235 14.766'/%3e%3c/svg%3e") center/1em auto no-repeat;
    opacity: 0.5;
    cursor: pointer;
}

.modal-header .btn-close:hover {
    opacity: 0.75;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.5rem;
	overflow-y: auto;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    border-bottom-right-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-lg);
    gap: 0.5rem;
}

/* 모달 애니메이션 */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* body 스크롤 방지 */
.modal-open {
    overflow: hidden;
}

.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
}

/* 모바일 대응 */
@media (max-width: 768px) {
	.custom-selectbox-md .custom-selectbox-selected {
		padding: var(--spacing-3) var(--spacing-4);
	}
	.custom-selectbox-md .custom-selectbox-option {
		padding: var(--spacing-4) var(--spacing-5);
	}

	.responsive-br {
		display: block;
		height: 0;
	}

	.responsive-br::after {
		content: "";
	}

	/* =========================================================================
   sticky menu  ========================================================================= */
	.sticky-menu-list {
		overflow-x: auto;
		-ms-overflow-style: none;
		-webkit-overflow-scrolling: touch;
	}

	.sticky-menu-list::-webkit-scrollbar {
		display: none;
	}

	.sticky-menu-item a {
		padding: var(--spacing-4);
		font-size: var(--text-body-md);
		text-wrap: nowrap;
		white-space: nowrap;
	}
	.sticky-menu-item.active a::after {
		width: calc(100% - var(--spacing-4));
		margin: 0 calc(var(--spacing-2));
	}

	/* =========================================================================
   no image  ========================================================================= */
	.no-image::after {
		font-size: 0.875rem;
	}

	.no-image.no-image-lg::after {
		font-size: 1rem;
	}

	.no-image.no-image-xl::after {
		font-size: 1.125rem;
	}

	.product-image-swiper .no-image::after {
		font-size: 1rem;
	}

	.product-image-thumbnail-swiper .no-image::after {
		font-size: 0.625rem;
	}

	/* 스테퍼 md 반응형 */
	.stepper-wrapper.stepper--md {
		gap: var(--spacing-3);
	}
	.stepper--md .stepper-btn {
		padding: var(--spacing-2);
	}
	.stepper--md .stepper-btn svg {
		width: 16px;
		height: 16px;
	}
	.stepper--md .stepper-input {
		width: 40px;
		height: 28px;
		font-size: var(--text-body-md);
		padding: var(--spacing-2) var(--spacing);
	}
}

/* 모바일 대응 */
@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
    
    .modal-dialog-centered {
        min-height: calc(100% - 3.5rem);
    }
}

@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-dialog.modal-sm,
    .modal-dialog.modal-lg {
        max-width: none;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* =========================================================================
   datepicker  ========================================================================= */
/* Datepicker 아이콘 우측 배치 */
.date-range-form {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
}
.datepicker-input {
	max-width: 160px;
}
.datepicker-wrapper .input-wrapper .datepicker-icon {
	right: 12px;
	left: auto;
}

/* Datepicker 아이콘 색상 --gray-600 */
.datepicker-wrapper .input-wrapper .datepicker-icon svg {
	width: 24px;
	height: 24px;
	color: var(--gray-600);
}

.datepicker-wrapper .input-wrapper:has(.datepicker-icon) .form-input {
	padding-right: 46px;
	padding-left: var(--spacing-4);
}

/* Datepicker input focus/active 스타일 - 평소와 동일하게 유지 */
.datepicker-input:focus,
.datepicker-input:focus-visible,
.datepicker-input:active {
	border-color: var(--gray-100);
	background: var(--gray-100);
	cursor: default;
	caret-color: transparent;
}

.datepicker-input {
	cursor: pointer;
	caret-color: transparent;
}

/* Datepicker 드롭다운 스타일 */
.datepicker {
    width: fit-content;
	padding: 0;
}

.datepicker-dropdown {
	padding-top: 8px;
}
.datepicker-picker {
	width: fit-content;
	min-width: 280px;
	max-width: 280px;
	padding: 12px;
}

.datepicker-main {
	width: 100%;
	padding: 2px;
}

.datepicker-view {
	width: 100%;
	max-width: 280px;
}

.datepicker-grid {
	width: 100%;
}

/* Datepicker 헤더 버튼 및 텍스트 색상 */
.datepicker-header .datepicker-controls .btn {
	color: var(--text-primary, #333);
	background-color: transparent;
	border: none;
	opacity: 1;
}

.datepicker-header .datepicker-controls .btn:hover {
	color: var(--text-primary, #333);
	background-color: var(--gray-100, #f5f5f5);
	opacity: 1;
}

.datepicker-header .datepicker-controls .view-switch {
	color: var(--text-primary, #333);
	font-weight: 600;
	opacity: 1;
}

.datepicker-header .datepicker-controls .view-switch:hover {
	color: var(--text-primary, #333);
	background-color: var(--gray-100, #f5f5f5);
	opacity: 1;
}

/* Datepicker 요일 헤더 */
.datepicker .dow {
	color: var(--text-primary, #333);
	font-weight: 600;
}

/* Datepicker 셀 색상 */
.datepicker-cell {
	color: var(--text-primary, #333);
}

/* 선택된 날짜 */
.datepicker-cell.selected {
	background-color: var(--primary, #1C56FF);
	color: var(--white, #fff);
}

/* 오늘 날짜 (선택되지 않은 경우) */
.datepicker-cell.today:not(.selected),
.datepicker-cell.today:not(.selected):not(.disabled) {
	background-color: transparent;
	font-weight: 700;
	color: var(--primary, #1C56FF);
}

/* 오늘 날짜이면서 선택된 경우 */
.datepicker-cell.today.selected {
	background-color: var(--primary, #1C56FF);
	color: var(--white, #fff);
	border-color: var(--primary, #1C56FF);
}

/* 포커스된 날짜 (키보드 포커스) */
.datepicker-cell.focused:not(.selected) {
	background-color: var(--gray-100, #f5f5f5);
}

/* 지난 달, 다음 달 날짜 (더 연한 색) */
.datepicker-cell.prev:not(.selected),
.datepicker-cell.next:not(.selected),
.datepicker-cell.old:not(.selected),
.datepicker-cell.new:not(.selected) {
	color: var(--gray-400, #999);
}

.datepicker-cell.prev.selected,
.datepicker-cell.next.selected,
.datepicker-cell.old.selected,
.datepicker-cell.new.selected {
	background-color: var(--primary, #1C56FF);
	color: var(--white, #fff);
}

.datepicker-cell:hover:not(.disabled):not(.selected) {
	background-color: var(--gray-100, #f5f5f5);
}