@charset 'utf-8';

:root {
	--ql-fz-lg: 24px !important;
	--ql-fz-md: 20px !important;
	--ql-fz-sm: 16px !important;
}


@media screen and (max-width: 576px) {
	:root {
		--ql-fz-lg: 18px !important;
		--ql-fz-md: 16px !important;
		--ql-fz-sm: 14px !important;
	}
}

/* quill editor -------------------------------------------------- */
.ql-editor {
	background-color: #FFF !important;
	color: var(--ql-color-text-main) !important;
	font-family: Helvetica, Arial, sans-serif !important;
	padding: 3rem !important;
	counter-reset: h2-counter;
	height: auto !important;
	min-height: 500px !important;
	max-height: none !important;
}

.ql-editor blockquote {
	border-left: 4px solid var(--color-primary) !important;
	font-weight: 400 !important;
	color: var(--color-primary) !important;
	font-size: var(--ql-fz-md) !important;
	padding: 1rem !important;
	font-style: italic !important;
	background-color: #f8f8f8 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.ql-editor blockquote+blockquote {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* 첫 번째 인용구에만 위쪽 여백 */
/* .ql-editor blockquote:first-of-type,
.ql-editor :not(blockquote) + blockquote {
    margin-top: 1rem !important;
    padding-top: 1rem !important;
} */

/* 마지막 인용구에만 아래쪽 여백 */
/* .ql-editor blockquote:last-of-type,
.ql-editor blockquote + :not(blockquote) {
    margin-bottom: 1rem !important;
    padding-bottom: 1rem !important;
} */



.ql-editor h2::before {
	content: counter(h2-counter) ". " !important;
	font-weight: 700 !important;
	display: inline-block !important;
	color: var(--ql-h2-color) !important;
}

.ql-editor h2 {
	counter-increment: h2-counter;
	margin: 4rem 0 1rem !important;
	font-size: var(--ql-fz-lg) !important;
	color: var(--ql-h2-color) !important;
	display: flex !important;
	padding: .5rem 1rem .5rem 3rem !important;
	border: 1px solid var(--ql-h2-color) !important;
	line-height: 1.5 !important;
	background: transparent !important;
	border-radius: 0 !important;
}

.ql-editor h2:first-child {
	margin-top: 0 !important;
}

.ql-editor h3 {
	margin-top: 1.5rem !important;
	font-size: var(--ql-fz-md) !important;
	font-weight: 600 !important;
	margin-bottom: 1rem !important;
	color: var(--ql-h3-color) !important;
	position: relative !important;
	margin-left: 2rem !important;
}

.ql-editor h3::before {
	content: "\25C6" !important;
	position: absolute !important;
	left: -1.5rem !important;
	color: var(--ql-h3-color) !important;
}

.ql-editor h4 {
	margin-top: 1rem !important;
	font-size: calc(var(--ql-fz-md) - 1px) !important;
	font-weight: 600 !important;
	margin-bottom: 1rem !important;
	color: var(--ql-color-text-main) !important;
	padding-left: 1.2rem !important;
	position: relative !important;
	letter-spacing: -0.2px !important;
	margin-left: .5rem !important;
}

.ql-editor h4::before {
	content: "\25A0" !important;
	/* ■(black square) */
	position: absolute !important;
	left: 0 !important;
	top: 0.25rem !important;
	color: var(--ql-color-text-main) !important;
	font-size: 0.7rem !important;
}

.ql-editor ol,
.ql-editor ul {
	padding-left: 0 !important;
	margin: 1rem 0 !important;
}

.ql-editor li {
	/* margin-bottom: 0.5rem !important; */
	line-height: 1.8 !important;
	padding: 0 !important;
	font-size: var(--ql-fz-sm) !important;
	margin-left: 2rem !important;
}

.ql-editor>p {
	line-height: 1.8 !important;
	margin-left: 1rem !important;
	font-size: var(--ql-fz-sm) !important;
}

.ql-editor img {
	max-width: 100% !important;
	height: auto !important;
	border-radius: 8px;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
	margin: 0 0 2rem !important;
}

/* Quill size 클래스가 커스텀 p/li font-size보다 우선 적용되도록 강제 */
.ql-editor .ql-size-small,
.ql-editor p.ql-size-small,
.ql-editor .ql-table-block.ql-size-small {
	font-size: 0.75em !important;
}

.ql-editor .ql-size-large,
.ql-editor p.ql-size-large,
.ql-editor .ql-table-block.ql-size-large {
	font-size: 1.5em !important;
}

.ql-editor .ql-size-huge,
.ql-editor p.ql-size-huge,
.ql-editor .ql-table-block.ql-size-huge {
	font-size: 2.5em !important;
}

.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
	padding-left: 2.5em !important;
}

.ql-editor hr {
	color: #6d6d6d !important;
	margin: 3rem 0 !important;
}

.ql-editor iframe {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 16 / 9;
	min-height: 200px;
	max-width: 100%;
	display: block;
}

.ql-editor .hash-heading {
	font-weight: 600;
	color: var(--color-primary);
	font-size: 1.05rem;
}



.ql-editor a {
	cursor: pointer !important;
	color: #0d6efd !important;
	border: 1.5px solid #0d6efd !important;
	text-decoration: none !important;
	display: inline-block !important;
	align-items: center !important;
	padding: 0.45rem 0.75rem !important;
	font-weight: 600 !important;
	border-radius: 6px !important;
	transition: border-color .25s ease, color .25s ease !important;
}

.ql-editor a::after {
	content: "→" !important;
	margin-left: 0.35rem !important;
	display: inline-block !important;
}

.ql-editor a:hover {
	border-color: #4da3ff !important;
	color: #4da3ff !important;
}



.ql-table-menus-container {
	z-index: 9999 !important;
	margin: 0 !important;
}

.ql-table-tooltip-hover {
	z-index: 10000 !important;
}

.ql-toolbar button.ql-tableCenter.ql-table-button-disabled,
.ql-toolbar button.ql-tableCenter[disabled] {
	opacity: 1 !important;
	pointer-events: auto !important;
}

/* quill-table-better override */
.ql-table-properties-form .properties-form-row {
	justify-content: flex-start !important;
	gap: 1rem !important;
}

.ql-container .label-field-view-input-wrapper>label {
	/* top: auto !important;
	bottom: 100% !important;
	transform: translateY(-2px) scale(0.75) !important;
	transform-origin: left bottom !important; */
	margin-bottom: 0 !important;
	top: auto !important;
	bottom: 100% !important;
	transform: none !important;
}

.ql-table-dropdown-properties {
	width: max-content !important;
}

.ql-table-dropdown-label,
.ql-table-dropdown-properties-label {
	margin: 16px 0 0 !important;
}

.ql-container .ql-table-color-container .color-picker .color-picker-select {
	z-index: 10030 !important;
}

.ql-container .ql-table-color-container .color-picker .color-picker-select>.erase-container {
	position: relative !important;
	z-index: 10031 !important;
}

.ql-container .ql-table-color-container .color-picker .color-picker-palette {
	z-index: 10032 !important;
}

/* table/cell properties 창을 선택 위치와 무관하게 에디터 좌상단에 고정 */
.ql-container .ql-table-properties-form {
	/* top: 12px !important;
	left: 12px !important;
	right: auto !important;
	bottom: auto !important; */
	/* transform: none !important; */
	z-index: 10020 !important;
	max-height: calc(100vh - 32px) !important;
	overflow: auto !important;
}

/* .ql-container .ql-table-properties-form .ql-table-check-container {
	display: none !important;
} */



/* 태그  */
.ql-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.15rem 0.5rem;
	margin: 0 0.25rem;
	border-radius: 0.375rem;
	background: #eef6ff;
	/* 연한 배경 */
	color: #0b5ed7;
	/* 강조 색 */
	font-weight: 600;
	font-size: 0.9rem;
	white-space: nowrap;
	user-select: none;
	-webkit-user-select: none;
	vertical-align: middle;
	border: 1px solid rgba(11, 94, 215, 0.12);
	box-shadow: none;
}

.ql-editor .ql-tag {
	font-family: inherit;
}

.ql-tag.clickable {
	cursor: pointer;
	transition: background .12s ease, transform .06s ease;
}

.ql-tag.clickable:hover {
	background: #d8eaff;
	transform: translateY(-1px);
}

.ql-tag.buttonlike {
	background: #0d6efd;
	color: #fff;
	border-color: rgba(13, 110, 253, 0.2);
	box-shadow: 0 2px 6px rgba(13, 110, 253, 0.12);
}

.ql-tag:focus {
	outline: 2px solid rgba(13, 110, 253, 0.25);
	outline-offset: 2px;
}

.ql-tag.small {
	padding: 0.08rem 0.35rem;
	font-size: 0.8rem;
}

.ql-tag.large {
	padding: 0.25rem 0.6rem;
	font-size: 1.05rem;
}

.ql-tag .tag-remove {
	display: inline-block;
	font-size: 0.85em;
	opacity: 0.7;
	margin-left: 0.25rem;
}

.ql-tag.clickable .tag-remove {
	display: inline-block;
}

.ql-tag:not(:hover) .tag-remove {
	opacity: 0;
	transition: opacity .15s ease;
}

.ql-tag:hover .tag-remove {
	opacity: 1;
}

.ql-tag[data-tag] {
	max-width: 12rem;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media (max-width:480px) {
	.ql-tag {
		margin: 0 0.15rem;
		font-size: 0.85rem;
	}
}

/* ── 테이블 모바일 반응형: 에디터는 넘침 숨김, 테이블만 독립 가로 스크롤 ── */
.ql-editor {
	overflow-x: hidden !important;
}

.ql-editor table {
	display: block !important;
	overflow-x: auto !important;
	-webkit-overflow-scrolling: touch !important;
	white-space: normal !important;
	max-width: none !important;
	cursor: grabbing !important;
}


.ql-editor table thead,
.ql-editor table tbody {
	display: table !important;
	width: 100% !important;
	/* margin: 0 auto !important; */
}
.ql-editor .table-responsive {
	padding-bottom: 1rem;
}
.ql-editor .table-responsive table.table::-webkit-scrollbar{
	display: none !important;
	width: 0 !important;
	height: 0 !important;
}
.ql-editor table th, 
.ql-editor table td {
	white-space: normal !important;
}
.ql-editor td,
.ql-editor th {
	white-space: normal !important;
	min-width: 60px !important;
}

/***************** 미디어 쿼리 *****************/
@media (max-width: 768px) {

	.ql-editor {
		padding: 1rem !important;
	}

	.ql-editor h2 {
		font-size: var(--ql-fz-md) !important;
		line-height: 1.45 !important;
		margin-top: 1.8rem !important;
		margin-bottom: 0.8rem !important;
		font-weight: 600 !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding: .5rem 1rem !important;
	}

	.ql-editor h3 {
		font-size: var(--ql-fz-md) !important;
		line-height: 1.5 !important;
		margin-top: 1.2rem !important;
		margin-bottom: 0.5rem !important;
		font-weight: 600 !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.ql-editor h3::before {
		display: inline !important;
		position: static !important;
	}

	.ql-editor p {
		font-size: var(--ql-fz-sm) !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.ql-editor li {
		margin-left: 1rem !important;
	}
}


/* lawjibsa board style (youtube) */

/* lawjibsa media timestamp a tag style */
.board-lawjibsa {
	counter-reset: h2-counter;
}


.board-lawjibsa h3:first-of-type {
	color: #1D4585 !important;
	font-size: 1.2rem !important;
	font-weight: 700 !important;
	margin-bottom: 15px !important;
	display: flex !important;
	align-items: center !important;
}

/* 요약 제목 앞에 아이콘 느낌 추가 */
.board-lawjibsa h3:first-of-type::before {
	content: "💡";
	margin-right: 8px !important;
}

/* 요약 박스 (첫 번째 UL) */
.board-lawjibsa h2 {
	background: transparent !important;
	padding: 0 !important;
	color: var(--color-primary) !important;
	border: none !important;
}

.board-lawjibsa h3 {
	margin-top: 4rem !important;
}

.board-lawjibsa h3::before {
	content: "" !important;
}

.board-lawjibsa li {
	line-height: 2 !important;
}

.ql-editor a[href^="#t="] {
	display: inline-block !important;
	background-color: #f1f3f5 !important;
	color: #495057 !important;
	text-decoration: none !important;
	padding: 2px 8px !important;
	border-radius: 4px !important;
	font-size: 0.9em !important;
	font-weight: 700 !important;
	border: 1px solid #dee2e6 !important;
	margin-right: 6px !important;
	transition: all 0.2s !important;
	white-space: nowrap !important;
}

.ql-editor a[href^="#t="]:hover {
	background-color: #228be6 !important;
	color: white !important;
	border-color: #228be6 !important;
}

.ql-editor li:has(a[href^="#t="]) {
	list-style: none !important;
	margin-bottom: 10px !important;
	padding-left: 0 !important;
	/* display: inline-block !important;  */
	align-items: center !important;
}

/*    Quill v2 data-list="bullet" 강제 스타일 초기화*/
.board-lawjibsa li[data-list="bullet"]:has(a[href^="#t="]) .ql-ui {
	display: none !important;
}

.board-lawjibsa li[data-list="bullet"]:has(a[href^="#t="]) {
	margin-left: 1.5rem !important;
}

/* 체크리스트 커스텀 */
.checklist-count {
	margin: 12px 0;
	padding: 8px 12px;
	background: #f4f8ff;
	/* border-left: 4px solid #1d4585; */
	font-weight: 600;
	color: #1d4585;
	font-size: var(--ql-fz-md);
}

/* 체크 아이콘 자체 */
.ql-editor li[data-list="checked"],
.ql-editor li[data-list="unchecked"] {
	position: relative !important;
	padding-left: 0 !important;
	text-align: left !important;
	line-height: 2.2em !important;
}

.ql-editor li[data-list="checked"]>.ql-ui,
.ql-editor li[data-list="unchecked"]>.ql-ui {
	position: absolute !important;
	left: -1.6em !important;
	/* top: 0.2em !important; */
	width: 2.2em !important;
	height: 2.2em !important;
	cursor: pointer !important;
}

.ql-editor li[data-list="checked"]>.ql-ui:before,
.ql-editor li[data-list="unchecked"]>.ql-ui:before {
	margin-left: 0 !important;
}

/* 클릭 히트 영역 확장 */
/* .ql-editor li[data-list="checked"] > .ql-ui::after,
.ql-editor li[data-list="unchecked"] > .ql-ui::after{
  content: "";
  position: absolute;
  inset: -8px;
} */



/* ================================
   News Source Blot (Anchor Reset)
================================*/
a.ql-news-source::after {
	content: none !important;
}

a.ql-news-source {
	display: flex !important;
	color: inherit !important;
	text-decoration: none !important;
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	margin: 1.5rem 0 !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 8px !important;
	background-color: #fafafa !important;
	cursor: pointer !important;
	height: 250px !important;
	align-items: stretch !important;
	justify-content: center !important;
}

a.ql-news-source:visited,
a.ql-news-source:hover,
a.ql-news-source:active,
a.ql-news-source:focus {
	color: inherit !important;
	text-decoration: none !important;
}

a.ql-news-source:hover {
	background-color: #f3f4f6 !important;
	border-color: #c7d2fe !important;
}

a.ql-news-source .news-source-inner {
	padding: 1rem !important;
	display: flex !important;
	flex-direction: row !important;
	gap: 1rem !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	width: 100% !important;
}


a.ql-news-source .news-source-meta {
	flex: 1 1 0 !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: center !important;
	height: auto !important;
	min-height: 1px !important;
	padding: 2rem !important;
	border-radius: 0 12px 12px 0 !important;
}

a.ql-news-source .news-source-label {
	display: inline-block !important;
	margin-bottom: 0.25rem !important;

	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: -0.01em !important;

	color: #2563eb !important;
}

a.ql-news-source .news-source-title {
	margin-top: 0.25rem !important;
	font-size: var(--ql-fz-lg) !important;
	font-weight: 600 !important;
	line-height: 1.45 !important;
	letter-spacing: -0.015em !important;

	color: #111827 !important;
}

a.ql-news-source .news-source-info {
	margin-top: 0.25rem !important;
	font-size: var(--ql-fz-md) !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	letter-spacing: -0.01em !important;
	color: #6b7280 !important;
	display: inline-flex;
}

a.ql-news-source .news-source-date {
	margin-left: 0.25rem !important;
}

a.ql-news-source .news-source-image {
	flex: 0 0 320px !important;
	height: auto !important;
	min-height: 1px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	overflow: hidden !important;
	border-radius: 6px !important;
}

@media (max-width: 1200px) {
	a.ql-news-source {
		height: auto !important;
	}

	a.ql-news-source .news-source-inner {
		flex-direction: column !important;
	}

	a.ql-news-source .news-source-meta {
		flex: 1 1 auto !important;
		padding: .5rem !important;
	}

	a.ql-news-source .news-source-image {
		flex: 1 1 auto !important;
	}

}

a.ql-news-source .news-source-image img {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	object-fit: cover !important;
	pointer-events: none !important;
	margin: 0 !important;
}

a.ql-news-source * {
	pointer-events: none !important;
}