/* ========================================================================
   또바기윤 공지사항 플러그인 스타일
   모든 클래스에 tbn- 접두어 적용 — 외부 CSS 충돌 방지
   ======================================================================== */

/* --- Reset (scoped) --------------------------------------------------- */
.tbn-wrap *,
.tbn-wrap *::before,
.tbn-wrap *::after {
	box-sizing: border-box;
}

/* --- Keyframes -------------------------------------------------------- */
@keyframes tbn-row-enter {
	from {
		opacity: 0;
		transform: translate3d(0, 28px, 0);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes tbn-modal-backdrop-in {
	from {
		background: rgba(10, 12, 18, 0);
		backdrop-filter: blur(0px);
		-webkit-backdrop-filter: blur(0px);
	}
	to {
		background: rgba(10, 12, 18, 0.55);
		backdrop-filter: blur(14px);
		-webkit-backdrop-filter: blur(14px);
	}
}

/* --- Container -------------------------------------------------------- */
.tbn-wrap {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
	color: #000000;
	-webkit-font-smoothing: antialiased;
}

/* --- List ------------------------------------------------------------- */
.tbn-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tbn-list__item {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #eeeeee;
}

/* --- Scroll-reveal ---------------------------------------------------- */
.tbn-reveal {
	opacity: 0;
	transform: translate3d(0, 28px, 0);
	will-change: opacity, transform;
}

.tbn-reveal.tbn-visible {
	animation: tbn-row-enter 1.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tbn-reveal.tbn-visible:nth-child(1) {
	animation-delay: 0.14s;
}

.tbn-reveal.tbn-visible:nth-child(2) {
	animation-delay: 0.34s;
}

.tbn-reveal.tbn-visible:nth-child(3) {
	animation-delay: 0.54s;
}

.tbn-reveal.tbn-visible:nth-child(4) {
	animation-delay: 0.74s;
}

.tbn-reveal.tbn-visible:nth-child(5) {
	animation-delay: 0.94s;
}

.tbn-reveal.tbn-visible:nth-child(6) {
	animation-delay: 1.14s;
}

.tbn-reveal.tbn-visible:nth-child(7) {
	animation-delay: 1.34s;
}

.tbn-reveal.tbn-visible:nth-child(8) {
	animation-delay: 1.54s;
}

@media (prefers-reduced-motion: reduce) {
	.tbn-reveal {
		opacity: 1;
		transform: none;
		will-change: auto;
	}

	.tbn-reveal.tbn-visible {
		animation: none !important;
	}
}

/* --- Notice item (button) --------------------------------------------- */
.tbn-item {
	display: flex;
	align-items: center;
	gap: clamp(28px, 4vw, 48px);
	width: 100%;
	margin: 0;
	padding: clamp(56px, 6vw, 72px) 0;
	border: none;
	background: transparent;
	font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 1rem;
	color: inherit;
	text-align: left;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	line-height: 1.5;
}

.tbn-list__item:first-child .tbn-item {
	padding-top: clamp(48px, 5vw, 64px);
}

.tbn-item:hover .tbn-action {
	background: #000000;
	color: #ffffff;
}

.tbn-item:focus-visible {
	outline: none;
}

.tbn-item:focus-visible .tbn-body {
	outline: 2px solid #000000;
	outline-offset: 4px;
}

/* --- Number ----------------------------------------------------------- */
.tbn-num {
	flex: 0 0 11%;
	min-width: 4.75rem;
	max-width: 9rem;
	font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
	font-size: clamp(2.5rem, 3.6vw, 3.5rem);
	font-weight: 400;
	line-height: 1;
	color: #cccccc;
	letter-spacing: -0.02em;
	user-select: none;
}

/* --- Body ------------------------------------------------------------- */
.tbn-body {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
}

.tbn-title {
	display: block;
	margin: 0 0 10px;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
	color: #000000;
}

.tbn-desc {
	display: block;
	margin: 0;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.65;
	color: #777777;
}

/* --- Action button ---------------------------------------------------- */
.tbn-action {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border: 1px solid #000000;
	border-radius: 50%;
	background: #ffffff;
	color: #000000;
	pointer-events: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.tbn-action .material-symbols-outlined {
	font-size: 22px;
	font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --- Empty state ------------------------------------------------------ */
.tbn-empty {
	padding: 60px 0;
	text-align: center;
	font-size: 0.9375rem;
	color: #999999;
	font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ======================================================================
   Modal
   ====================================================================== */
html.tbn-modal-open {
	overflow: hidden;
}

.tbn-modal {
	--tbn-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--tbn-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	width: min(720px, calc(100vw - 32px));
	max-height: min(88vh, 900px);
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	color: #0f172a;
	overflow: visible;
}

.tbn-modal::backdrop {
	background: rgba(10, 12, 18, 0);
	backdrop-filter: blur(0px);
	-webkit-backdrop-filter: blur(0px);
	transition:
		background 0.9s var(--tbn-ease-out),
		backdrop-filter 1.05s var(--tbn-ease-out),
		-webkit-backdrop-filter 1.05s var(--tbn-ease-out);
}

.tbn-modal[open].tbn-modal--shown::backdrop {
	background: rgba(10, 12, 18, 0.55);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.tbn-modal__panel {
	display: flex;
	flex-direction: column;
	max-height: min(88vh, 900px);
	border-radius: 22px;
	background: linear-gradient(165deg, #ffffff 0%, #fafafa 42%, #f4f4f2 100%);
	border: 1px solid rgba(255, 255, 255, 0.72);
	box-shadow:
		0 0 0 1px rgba(15, 23, 42, 0.05),
		0 4px 6px -2px rgba(15, 23, 42, 0.04),
		0 28px 56px -20px rgba(15, 23, 42, 0.22),
		0 80px 120px -48px rgba(15, 23, 42, 0.12);
	transition:
		opacity 0.85s var(--tbn-ease),
		transform 1s var(--tbn-ease),
		box-shadow 1s var(--tbn-ease);
	will-change: opacity, transform;
	font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tbn-modal[open]:not(.tbn-modal--shown) .tbn-modal__panel {
	opacity: 0;
	transform: translate3d(0, 28px, 0) scale(0.96);
}

.tbn-modal[open].tbn-modal--shown .tbn-modal__panel {
	opacity: 1;
	transform: translate3d(0, 0, 0) scale(1);
	box-shadow:
		0 0 0 1px rgba(15, 23, 42, 0.06),
		0 8px 16px -4px rgba(15, 23, 42, 0.06),
		0 36px 72px -24px rgba(15, 23, 42, 0.26),
		0 96px 140px -56px rgba(15, 23, 42, 0.14);
}

.tbn-modal[open]:not(.tbn-modal--shown)::backdrop {
	background: rgba(10, 12, 18, 0);
	backdrop-filter: blur(0px);
	-webkit-backdrop-filter: blur(0px);
}

@media (prefers-reduced-motion: reduce) {
	.tbn-modal::backdrop {
		transition-duration: 0.01ms !important;
	}

	.tbn-modal__panel {
		transition-duration: 0.01ms !important;
		will-change: auto;
	}

	.tbn-modal[open] .tbn-modal__panel {
		opacity: 1;
		transform: none;
	}

	.tbn-modal[open]::backdrop {
		background: rgba(10, 12, 18, 0.55);
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
	}
}

/* --- Modal toolbar ---------------------------------------------------- */
.tbn-modal__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px 0;
	flex-shrink: 0;
}

.tbn-modal__badge {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: #64748b;
	font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tbn-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: -8px -10px -8px 0;
	padding: 0;
	border: none;
	border-radius: 12px;
	background: transparent;
	color: #475569;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
	font-family: inherit;
}

.tbn-modal__close:hover {
	background: rgba(15, 23, 42, 0.06);
	color: #0f172a;
}

.tbn-modal__close:focus-visible {
	outline: 2px solid #0f172a;
	outline-offset: 2px;
}

.tbn-modal__close .material-symbols-outlined {
	font-size: 24px;
	font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* --- Modal header ----------------------------------------------------- */
.tbn-modal__header {
	padding: 8px 24px 20px;
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
	flex-shrink: 0;
}

.tbn-modal__date {
	display: block;
	margin-bottom: 10px;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #64748b;
}

.tbn-modal__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.45;
	color: #0f172a;
	font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Modal body ------------------------------------------------------- */
.tbn-modal__content {
	padding: 24px 24px 28px;
	overflow-y: auto;
	font-size: 0.9375rem;
	line-height: 1.75;
	color: #334155;
}

.tbn-modal__content p {
	margin: 0 0 1.1em;
}

.tbn-modal__content p:last-child {
	margin-bottom: 0;
}

.tbn-modal__content strong {
	font-weight: 700;
	color: #0f172a;
}

/* ======================================================================
   Responsive — Tablet / Mobile
   ====================================================================== */
@media (max-width: 767px) {
	.tbn-desc {
		font-size: 0.9rem;
		line-height: 1.7;
	}

	.tbn-modal {
		width: calc(100vw - 24px);
		max-height: min(90dvh, 900px);
		margin: auto;
		border-radius: 20px;
	}

	.tbn-modal__panel {
		max-height: min(90dvh, 900px);
	}

	.tbn-modal__title {
		font-size: 1.125rem;
	}

	.tbn-modal__content {
		font-size: 0.9rem;
		line-height: 1.72;
		padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 640px) {
	.tbn-wrap {
		padding: 0;
	}

	.tbn-item {
		display: grid;
		grid-template-columns: minmax(0, auto) 1fr auto;
		grid-template-rows: auto auto;
		padding: 44px 0;
		gap: 14px 20px;
	}

	.tbn-list__item:first-child .tbn-item {
		padding-top: 36px;
	}

	.tbn-num {
		flex: unset;
		min-width: 0;
		max-width: none;
		font-size: 2.25rem;
		grid-column: 1;
		grid-row: 1;
	}

	.tbn-action {
		grid-column: 3;
		grid-row: 1;
	}

	.tbn-body {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.tbn-title {
		margin-bottom: 8px;
	}
}
