@charset 'utf-8';

:root {
	--color-bg: #ffffff !important;
	/* 전체 배경 */
	--color-surface: #ffffff !important;
	/* 카드/섹션 배경 */
	--color-surface-soft: #ffffff !important;
	--color-primary: #1d4585 !important;
	/* 메인 블루 */
	--color-primary-rgb: 29, 69, 133 !important;
	/* 메인 블루 RGB for rgba(...) usage */
	--color-primary-soft: #1d4ed8 !important;
	--color-accent-red: #dc143c !important;
	/* 크림슨 레드 포인트 */
	--color-text-main: #222 !important;
	--color-text-sub: #52565e !important;
	--color-text-sub-dark: #b8b0b0 !important;
	--color-border-subtle: #cacaca !important;
	--color-text-muted: #b5b5b5 !important;

	--theme-primary: #4a69bd !important;
	--theme-dark: #2c3e50 !important;
	--theme-gradient: linear-gradient(135deg, #2c3e50 0%, #4a69bd 100%) !important;
	--mobile-bar-height: 70px !important;
	--radius-sm: 0.5rem !important;
	--radius-md: 0.75rem !important;
	--radius-lg: 1rem !important;
	--radius-xl: 1.5rem !important;
	--shadow-soft: 0 0.2rem 0.2rem rgba(50, 50, 50, 0.25) !important;
	--fz-xxl: 56px !important;
	--fz-xl: 42px !important;
	--fz-lg: 24px !important;
	--fz-md: 20px !important;
	--fz-sm: 16px !important;

	--bs-container-xxxl: 1520px !important;
}


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

/* quill editor -------------------------------------------------- */
.ql-editor {
	background-color: #FFF !important;
	color: var(--color-text-main) !important;
	font-family: Helvetica, Arial, sans-serif !important;
	padding: 3rem !important;
	counter-reset: h2-counter;
	height: auto !important;
	min-height: 300px !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(--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(--color-primary) !important;
}

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

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

.ql-editor h3::before{
	content: "\25C6" !important;
	position: absolute !important;
	left: -1.5rem !important;
	color: var(--color-primary) !important;
}
.ql-editor h4 {
	margin-top: 1rem !important;
	font-size: calc(var(--fz-md) - 1px) !important;
	font-weight: 600 !important;
	margin-bottom: 1rem !important;
	color: var(--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(--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(--fz-sm) !important;
	margin-left: 2rem !important;
}

.ql-editor>p{
	line-height: 1.8 !important;
	margin-left: 1rem !important;
   	font-size: var(--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: 2rem 0 !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: 1px solid #0d6efd !important;
	text-decoration: none !important;
	display: inline-flex !important;
	align-items: center !important;
	padding: 0 0.5rem !important;
	font-weight: 700 !important;
	transition: transform 0.2s ease !important;
	border-radius: 4px !important;
}

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

.ql-editor a:hover {
	transform: translateY(-2px) !important;
	color: #3586ff !important;
	box-shadow: var(--shadow-soft) !important;
} */

.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-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; }
}

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

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

	.ql-editor h2 {
		font-size: var(--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(--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(--fz-sm) !important;
		margin-left: 0 !important;
		margin-right: 0 !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(--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;
	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(--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(--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;
}

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;
}
