/**
 * Sidetalk Modal System
 * 모달 관련 통합 스타일
 *
 * 포함 내용:
 * 1. Sidetalk Universal Modal System (sidetalkModal)
 * 2. Form Modal System (sidetalk-form-modal)
 * 3. Mission Modal
 */

/* ========================================
   Sidetalk Universal Modal System
   통합 모달 (alert, confirm, action)
   ======================================== */

/* Animation keyframes */
@keyframes sidetalk-modal-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes sidetalk-modal-slide-up {
	from {
		opacity: 0;
		transform: translateY(20px) scale(0.95);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes sidetalk-modal-fade-out {
	from {
		opacity: 1;
	}

	to {
		opacity: 0;
	}
}

@keyframes sidetalk-modal-slide-down {
	from {
		opacity: 1;
		transform: translateY(0) scale(1);
	}

	to {
		opacity: 0;
		transform: translateY(20px) scale(0.95);
	}
}

/* Overlay */
.sidetalk-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: sidetalk-modal-fade-in 0.2s ease;
}

.sidetalk-modal-overlay.sidetalk-modal--closing {
	animation: sidetalk-modal-fade-out 0.15s ease forwards;
}

.sidetalk-modal-overlay.sidetalk-modal--active {
	display: flex;
}

/* Modal Container */
.sidetalk-modal {
	position: relative;
	background: #FFFFFF;
	border-radius: 20px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	padding: 32px 28px 24px;
	text-align: center;
	max-width: 400px;
	width: 100%;
	animation: sidetalk-modal-slide-up 0.2s ease;
}

.sidetalk-modal-overlay.sidetalk-modal--closing .sidetalk-modal {
	animation: sidetalk-modal-slide-down 0.15s ease forwards;
}

/* Close Button */
.sidetalk-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 8px;
	color: #A1A1AA;
	cursor: pointer;
	transition: all 0.15s ease;
}

.sidetalk-modal-close:hover {
	background: #F4F4F5;
	color: #52525B;
}

.sidetalk-modal-close svg {
	width: 20px;
	height: 20px;
}

/* Icon Area */
.sidetalk-modal-icon {
	margin-bottom: 16px;
	font-size: 48px;
	line-height: 1;
}

.sidetalk-modal-icon svg {
	width: 48px;
	height: 48px;
}

/* Theme Icons - Default hidden */
.sidetalk-modal-icon--info,
.sidetalk-modal-icon--success,
.sidetalk-modal-icon--warning,
.sidetalk-modal-icon--danger {
	display: none;
}

/* Show icon based on theme */
.sidetalk-modal--info .sidetalk-modal-icon--info,
.sidetalk-modal--success .sidetalk-modal-icon--success,
.sidetalk-modal--warning .sidetalk-modal-icon--warning,
.sidetalk-modal--danger .sidetalk-modal-icon--danger {
	display: inline-block;
}

/* Custom icon/emoji */
.sidetalk-modal-icon--custom {
	display: inline-block;
}

/* Emoji icon (larger size) */
.sidetalk-modal-emoji {
	font-size: 64px;
	line-height: 1;
	margin-bottom: 8px;
}

/* SVG icon */
.sidetalk-modal-svg-icon {
	margin-bottom: 16px;
}

.sidetalk-modal-svg-icon svg {
	width: 48px;
	height: 48px;
}

/* Title */
.sidetalk-modal-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: #18181B;
	letter-spacing: -0.02em;
}

/* Message */
.sidetalk-modal-message {
	margin: 0 0 24px;
	font-size: 14px;
	color: #71717A;
	line-height: 1.6;
	word-break: keep-all;
}

.sidetalk-modal-message a {
	color: #2563EB;
	text-decoration: underline;
}

.sidetalk-modal-message a:hover {
	color: #1D4ED8;
}

/* Actions Container */
.sidetalk-modal-actions {
	display: flex;
	flex-direction: row;
	gap: 10px;
}

/* Base Button Style */
.sidetalk-modal-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 12px 20px;
	border: none;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidetalk-modal-btn:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* Primary Button - Theme Based */
.sidetalk-modal-btn--primary {
	background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
	color: #FFFFFF;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.sidetalk-modal-btn--primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

/* Primary Button by Theme */
.sidetalk-modal--info .sidetalk-modal-btn--primary {
	background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.sidetalk-modal--info .sidetalk-modal-btn--primary:hover {
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.sidetalk-modal--success .sidetalk-modal-btn--primary {
	background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
	box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.sidetalk-modal--success .sidetalk-modal-btn--primary:hover {
	box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
}

.sidetalk-modal--warning .sidetalk-modal-btn--primary {
	background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
	box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.sidetalk-modal--warning .sidetalk-modal-btn--primary:hover {
	box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.sidetalk-modal--danger .sidetalk-modal-btn--primary {
	background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
	box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.sidetalk-modal--danger .sidetalk-modal-btn--primary:hover {
	box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

/* Secondary Button */
.sidetalk-modal-btn--secondary {
	background: #F4F4F5;
	color: #52525B;
}

.sidetalk-modal-btn--secondary:hover {
	background: #E4E4E7;
	border-color: #A1A1AA;
}

/* Danger Button (explicit) */
.sidetalk-modal-btn--danger {
	background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
	color: #FFFFFF;
	box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.sidetalk-modal-btn--danger:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

/* Link Button */
.sidetalk-modal-btn--link {
	background: transparent;
	color: #71717A;
	font-weight: 500;
	box-shadow: none;
}

.sidetalk-modal-btn--link:hover {
	color: #52525B;
	background: #F4F4F5;
}

.sidetalk-modal-btn--link:focus {
	box-shadow: none;
}

/* Ghost Button */
.sidetalk-modal-btn--ghost {
	background: transparent;
	color: #52525B;
	border: 1px solid #E4E4E7;
}

.sidetalk-modal-btn--ghost:hover {
	background: #F4F4F5;
	border-color: #D4D4D8;
}

/* a 태그 버튼: hover 시 text 색상 고정 (테마 CSS 덮어쓰기 방지) */
a.sidetalk-modal-btn,
a.sidetalk-modal-btn:hover,
a.sidetalk-modal-btn:focus,
a.sidetalk-modal-btn:active,
a.sidetalk-modal-btn:visited {
	text-decoration: none;
}

a.sidetalk-modal-btn--primary,
a.sidetalk-modal-btn--primary:hover,
a.sidetalk-modal-btn--primary:focus,
a.sidetalk-modal-btn--primary:active,
a.sidetalk-modal-btn--primary:visited {
	color: #FFFFFF;
}

a.sidetalk-modal-btn--secondary,
a.sidetalk-modal-btn--secondary:hover,
a.sidetalk-modal-btn--secondary:focus,
a.sidetalk-modal-btn--secondary:active,
a.sidetalk-modal-btn--secondary:visited {
	color: #52525B;
}

a.sidetalk-modal-btn--danger,
a.sidetalk-modal-btn--danger:hover,
a.sidetalk-modal-btn--danger:focus,
a.sidetalk-modal-btn--danger:active,
a.sidetalk-modal-btn--danger:visited {
	color: #FFFFFF;
}

a.sidetalk-modal-btn--link,
a.sidetalk-modal-btn--link:visited {
	color: #71717A;
}

a.sidetalk-modal-btn--link:hover,
a.sidetalk-modal-btn--link:focus,
a.sidetalk-modal-btn--link:active {
	color: #52525B;
}

/* Small Button */
.sidetalk-modal-btn--sm {
	min-height: 38px;
	padding: 8px 16px;
	font-size: 14px;
	border-radius: 10px;
}

/* Full Width Button */
.sidetalk-modal-btn--full {
	width: 100%;
	flex: none;
}

/* Button with Icon */
.sidetalk-modal-btn svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* Disabled State */
.sidetalk-modal-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none !important;
}

/* Mobile Responsive */
@media (max-width: 520px) {
	.sidetalk-modal-overlay {
		padding: 0;
		align-items: flex-end;
	}

	.sidetalk-modal {
		max-width: 100%;
		border-radius: 20px 20px 0 0;
		padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	}

	.sidetalk-modal-actions {
		flex-direction: column;
	}
}

/* ========================================
   Form Modal System (sidetalk-form-modal)
   폼/컨텐츠가 있는 모달을 위한 통합 스타일
   ======================================== */

/* Overlay */
.sidetalk-form-modal {
	position: fixed;
	inset: 0;
	z-index: 1000000000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.sidetalk-form-modal.active,
.sidetalk-form-modal[style*="display: flex"] {
	display: flex;
}

/* Container */
.sidetalk-form-modal__container {
	position: relative;
	width: 100%;
	max-width: 456px;
	max-height: calc(100vh - 40px);
	background: #FFFFFF;
	border-radius: 20px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	overflow: hidden;
	transform: translateY(20px) scale(0.98);
	opacity: 0;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidetalk-form-modal.active .sidetalk-form-modal__container,
.sidetalk-form-modal[style*="display: flex"] .sidetalk-form-modal__container {
	transform: translateY(0) scale(1);
	opacity: 1;
}

/* Wide variant */
.sidetalk-form-modal--wide .sidetalk-form-modal__container {
	max-width: 860px;
}

/* Backdrop (plan-modal 구조 호환) */
.sidetalk-form-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

/* Sheet (plan-modal 구조 호환 - container와 동일 스타일) */
.sidetalk-form-modal__sheet {
	width: 100%;
	max-width: 400px;
	padding: 32px 28px 24px;
	background: #FFFFFF;
	border-radius: 20px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	overflow: hidden;
	transform: translateY(20px) scale(0.98);
	opacity: 0;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidetalk-form-modal__sheet.is-open {
	transform: translateY(0) scale(1);
	opacity: 1;
}

/* Small sheet variant */
.sidetalk-form-modal__sheet--small {
	max-width: 320px;
}

/* backdrop 구조 사용 시 overlay 배경 제거 */
.sidetalk-form-modal:has(.sidetalk-form-modal__backdrop) {
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

/* Header - 패딩 없음, sheet에서 통합 관리 */
.sidetalk-form-modal__header {
	text-align: center;
}

.sidetalk-form-modal__title-area {
	text-align: center;
}

.sidetalk-form-modal__title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #18181B;
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.sidetalk-form-modal__subtitle {
	margin: 0 0 10px 0;
	font-size: 14px;
	color: #71717A;
	font-weight: 400;
	line-height: 1.5;
}

/* Close button - 오른쪽 상단 고정 */
.sidetalk-form-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 8px;
	color: #A1A1AA;
	cursor: pointer;
	transition: all 0.15s ease;
	z-index: 1;
}

.sidetalk-form-modal__close:hover {
	background: #F4F4F5;
	color: #52525B;
}

/* Body - 패딩 없음, sheet에서 통합 관리 */
.sidetalk-form-modal__body {
	overflow-y: auto;
	max-height: calc(100vh - 200px);
	text-align: center;
}

/* Footer - 패딩 없음, margin-top으로 간격 */
.sidetalk-form-modal__footer {
	display: flex;
	flex-direction: row;
	gap: 10px;
	margin-top: 24px;
}

/* ========================================
   Form Modal - Form Elements
   ======================================== */
.sidetalk-form-field {
	margin-bottom: 16px;
}

.sidetalk-form-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}

.sidetalk-form-label .required {
	color: #EF4444;
}

.sidetalk-form-input {
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	border: 1px solid #D1D5DB;
	border-radius: 10px;
	background: #FFFFFF;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
}

.sidetalk-form-input:focus {
	outline: none;
	border-color: #2563EB;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sidetalk-form-input--small {
	width: 80px;
}

.sidetalk-form-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sidetalk-form-select {
	padding: 12px 14px;
	font-size: 15px;
	border: 1px solid #D1D5DB;
	border-radius: 10px;
	background: #FFFFFF;
	cursor: pointer;
	min-width: 80px;
}

.sidetalk-form-select:focus {
	outline: none;
	border-color: #2563EB;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sidetalk-form-separator {
	color: #9CA3AF;
	font-size: 16px;
}

.sidetalk-form-hint {
	margin: 6px 0 0;
	font-size: 12px;
	color: #9CA3AF;
}

.sidetalk-form-agreement {
	margin: 20px 0;
	padding: 16px;
	background: #F9FAFB;
	border-radius: 12px;
}

.sidetalk-form-agreement .agreement-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
}

.sidetalk-form-agreement input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	flex-shrink: 0;
	cursor: pointer;
}

.sidetalk-form-agreement .agreement-text {
	font-size: 14px;
	color: #374151;
	line-height: 1.5;
}

.sidetalk-form-error {
	padding: 12px 16px;
	margin-bottom: 16px;
	background: #FEF2F2;
	border: 1px solid #FECACA;
	border-radius: 10px;
	color: #DC2626;
	font-size: 14px;
	display: none;
}

.sidetalk-form-success {
	padding: 12px 16px;
	margin-bottom: 16px;
	background: #F0FDF4;
	border: 1px solid #BBF7D0;
	border-radius: 10px;
	color: #16A34A;
	font-size: 14px;
	display: none;
}

/* ========================================
   Form Modal - Buttons
   ======================================== */
.sidetalk-form-modal__btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 12px 20px;
	border: none;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidetalk-form-modal__btn:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.sidetalk-form-modal__btn--primary {
	background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
	color: #FFFFFF;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.sidetalk-form-modal__btn--primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.sidetalk-form-modal__btn--primary:disabled {
	background: #D1D5DB;
	color: #9CA3AF;
	box-shadow: none;
	cursor: not-allowed;
	transform: none;
}

.sidetalk-form-modal__btn--secondary {
	background: #F4F4F5;
	color: #3F3F46;
}

.sidetalk-form-modal__btn--secondary:hover {
	background: #E4E4E7;
}

.sidetalk-form-modal__btn--danger {
	background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
	color: #FFFFFF;
	box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.sidetalk-form-modal__btn--danger:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.sidetalk-form-modal__btn--danger:disabled {
	background: #D1D5DB;
	color: #9CA3AF;
	box-shadow: none;
	cursor: not-allowed;
	transform: none;
}

.sidetalk-form-modal__btn--link {
	background: transparent;
	color: #71717A;
	box-shadow: none;
}

.sidetalk-form-modal__btn--link:hover {
	color: #3F3F46;
}

/* ========================================
   Form Modal - Theme Variants
   ======================================== */

/* Danger (삭제 확인) */
.sidetalk-form-modal--danger .sidetalk-form-modal__container {
	border-top: 4px solid #EF4444;
}

.sidetalk-form-modal--danger .sidetalk-form-modal__header {
	color: #DC2626;
}

.sidetalk-form-modal--danger .sidetalk-form-modal__title {
	color: #DC2626;
}

/* Warning */
.sidetalk-form-modal--warning .sidetalk-form-modal__container {
	border-top: 4px solid #F59E0B;
}

/* Success */
.sidetalk-form-modal--success .sidetalk-form-modal__sheet {
	border-top: 4px solid #16A34A;
}

/* Welcome (중앙 정렬, 이모지) */
.sidetalk-form-modal--welcome .sidetalk-form-modal__sheet {
	text-align: center;
	max-width: 400px;
}

.sidetalk-form-modal--welcome .sidetalk-form-modal__header {
	flex-direction: column;
	align-items: center;
	padding: 0 24px;
}

.sidetalk-form-modal--welcome .sidetalk-form-modal__title-area {
	text-align: center;
}

.sidetalk-form-modal--welcome .sidetalk-form-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
}

.sidetalk-form-modal--welcome .sidetalk-form-modal__body {
	padding: 20px 0 0;
}

.sidetalk-form-modal--welcome .sidetalk-form-modal__emoji {
	display: block;
	text-align: center;
	font-size: 48px;
	line-height: 1;
	margin-bottom: 12px;
}

.sidetalk-form-modal__desc {
	color: #71717A;
	margin: 0 0 24px;
	line-height: 1.6;
	font-size: 14px;
	text-align: center;
	word-break: keep-all;
}

/* Icon (재결제 모달 등) */
.sidetalk-form-modal__icon {
	display: flex;
	justify-content: center;
	margin-bottom: 16px;
}

/* Actions (버튼 그룹) */
.sidetalk-form-modal__actions {
	display: flex;
	flex-direction: row;
	gap: 10px;
}

/* Button Variants */
.sidetalk-form-modal__btn--full {
	width: 100%;
}

.sidetalk-form-modal__btn--full+.sidetalk-form-modal__btn--full {
	margin-top: 0;
}

.sidetalk-form-modal__btn--disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* Simple (간단한 안내 모달) */
.sidetalk-form-modal--simple .sidetalk-form-modal__container {
	max-width: 400px;
}

/* Info Box */
.sidetalk-form-modal__info-box {
	margin: 20px 24px;
	padding: 16px 20px;
	background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
	border-radius: 16px;
	border: 1px solid #E2E8F0;
}

/* Warning Box */
.sidetalk-form-modal__warning-box {
	padding: 16px;
	background: #FEF2F2;
	border: 1px solid #FECACA;
	border-radius: 12px;
	margin: 16px 0;
}

.sidetalk-form-modal__warning-box ul {
	margin: 0;
	padding-left: 20px;
	color: #991B1B;
	font-size: 14px;
}

.sidetalk-form-modal__warning-box li {
	margin: 4px 0;
}

/* ========================================
   Form Modal - Responsive
   ======================================== */
@media (max-width: 640px) {
	.sidetalk-form-modal {
		padding: 0;
		align-items: flex-end;
	}

	.sidetalk-form-modal__container {
		max-width: 100%;
		border-radius: 20px 20px 0 0;
		max-height: 90vh;
	}

	.sidetalk-form-modal__footer {
		flex-direction: column;
		padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	}

	.sidetalk-form-modal--wide .sidetalk-form-modal__container {
		max-width: 100%;
	}
}

/* ========================================
   Mission Modal
   ======================================== */

/* Sheet variant for mission modal */
.sidetalk-form-modal__sheet--mission {
	max-width: 600px;
}

/* Mission header */
.sidetalk-mission__header {
	text-align: center;
	margin-bottom: 20px;
}

.sidetalk-mission__title {
	margin: 0;
	font-size: 24px;
	color: #1e293b;
	font-weight: 700;
}

.sidetalk-mission__desc {
	color: #64748b;
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.5;
}

.sidetalk-mission__notice {
	color: #ef4444;
	font-size: 13px;
}

/* Progress section */
.sidetalk-mission__progress {
	margin-bottom: 25px;
	background: #f8fafc;
	padding: 15px;
	border-radius: 8px;
}

.sidetalk-mission__progress-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: bold;
	color: #334155;
}

.sidetalk-mission__progress-bar {
	width: 100%;
	background-color: #e2e8f0;
	border-radius: 10px;
	height: 10px;
	overflow: hidden;
}

.sidetalk-mission__progress-fill {
	background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
	height: 100%;
	border-radius: 10px;
	transition: width 0.5s;
}

/* Mission list */
.sidetalk-mission__list {
	max-height: 400px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Mission item */
.sidetalk-mission__item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
}

.sidetalk-mission__item--rewarded {
	background: #f8fafc;
}

.sidetalk-mission__item-content {
	flex: 1;
}

.sidetalk-mission__category {
	font-size: 12px;
	color: #64748b;
	font-weight: 600;
	margin-bottom: 4px;
}

.sidetalk-mission__item-title-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.sidetalk-mission__item-title {
	font-size: 15px;
	font-weight: bold;
	color: #1e293b;
}

.sidetalk-mission__item-title--rewarded {
	color: #94a3b8;
	text-decoration: line-through;
}

.sidetalk-mission__reward-badge {
	color: #f59e0b;
	background: #fffbeb;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 700;
	border: 1px solid #fde68a;
}

.sidetalk-mission__item-action {
	margin-left: 15px;
	flex-shrink: 0;
}

/* Mission buttons */
.sidetalk-mission__btn {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: bold;
	text-decoration: none;
	text-align: center;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
}

.sidetalk-mission__btn--claimed {
	background: #e2e8f0;
	color: #64748b;
	cursor: not-allowed;
}

.sidetalk-mission__btn--claim {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: #fff;
	box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
	animation: sidetalk-mission-pulse 2s infinite;
}

.sidetalk-mission__btn--claim:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

.sidetalk-mission__btn--go {
	background: #e0e7ff;
	color: #4f46e5;
}

.sidetalk-mission__btn--go:hover {
	background: #c7d2fe;
}

@keyframes sidetalk-mission-pulse {
	0% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
	}

	70% {
		transform: scale(1);
		box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
	}

	100% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
	}
}

/* Mission modal responsive */
@media (max-width: 640px) {
	.sidetalk-form-modal__sheet--mission {
		max-width: 100%;
	}

	.sidetalk-mission__item {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.sidetalk-mission__item-action {
		margin-left: 0;
		width: 100%;
	}

	.sidetalk-mission__btn {
		width: 100%;
	}
}

/* ========================================
   Spinner (로딩)
   ======================================== */
.sidetalk-form-modal__spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #E5E7EB;
	border-top-color: #2563EB;
	border-radius: 50%;
	animation: sidetalk-spinner 0.8s linear infinite;
}

@keyframes sidetalk-spinner {
	to {
		transform: rotate(360deg);
	}
}