/* 헤더 알림센터(종 아이콘 + 드롭다운). 마크업: inc/top_gnb2_area/rt_notify_center.php, 동작: common/js/rt_notify.js.
   PC(≥1024px)와 모바일(≤767px)에서만 보인다 — 그 사이 태블릿 헤더는 건드리지 않는다. 버튼은 같은 줄의 환경 설정(톱니) 버튼과 같은 토큰을 쓴다. */
.rt-notify { position: relative; flex: none; display: none; }
@media (min-width: 1024px) { .rt-notify { display: block; } }

html:root .rt-header .rt-auth .rt-notify-btn {
	position: relative; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; padding: 0; margin: 0; cursor: pointer;
	border: 1px solid var(--rt-btn-line); border-radius: 8px; background: var(--rt-btn-bg); color: rgb(170, 177, 199);
	transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
html:root .rt-header .rt-auth .rt-notify-btn:hover,
html:root .rt-header .rt-auth .rt-notify-btn[aria-expanded="true"] { border-color: var(--rt-btn-line-hover); background: var(--rt-btn-bg-hover); color: #e6e9fb; }
html:root .rt-header .rt-auth .rt-notify-btn:focus-visible { outline: 2px solid rgba(149, 107, 255, .75); outline-offset: 2px; }
.rt-notify-btn svg { display: block; }

.rt-notify-badge {
	position: absolute; top: -6px; right: -6px; box-sizing: border-box; min-width: 17px; height: 17px; padding: 0 4px;
	display: inline-flex; align-items: center; justify-content: center; border-radius: 9px;
	background: #7c4dff; color: #fff; font: 700 10px/1 -apple-system, "Segoe UI", sans-serif; letter-spacing: 0;
	box-shadow: 0 0 0 2px var(--rt-surface-1, #0B1826);
}

.rt-notify-panel {
	position: fixed; z-index: 70; top: 60px; right: 12px; box-sizing: border-box; display: flex; flex-direction: column;
	width: 392px; max-width: calc(100vw - 16px); max-height: min(78vh, 640px); overflow: hidden; outline: none;
	background: linear-gradient(180deg, rgb(24, 21, 58), rgb(14, 15, 40)); color: #e8eaf8;
	border: 1px solid rgba(149, 107, 255, .42); border-radius: 14px; box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.rt-notify-panel[hidden] { display: none; }
.rt-notify-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px; border-bottom: 1px solid rgba(149, 107, 255, .22); }
.rt-notify-acts { display: flex; align-items: center; gap: 8px; }
.rt-notify-close { display: none; }
.rt-notify-title { font-size: 16px; font-weight: 700; color: #fff; }
.rt-notify-readall { padding: 5px 10px; border: 1px solid rgba(149, 107, 255, .45); border-radius: 8px; background: transparent; color: #cdbcff; font: 600 12px/1 inherit; cursor: pointer; }
.rt-notify-readall:hover { background: rgba(149, 107, 255, .16); color: #fff; }
.rt-notify-readall[hidden], .rt-notify-empty[hidden] { display: none; }

.rt-notify-body { flex: 1 1 auto; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(149, 107, 255, .5) transparent; }
.rt-notify-list { list-style: none; margin: 0; padding: 0; }
.rt-notify-item + .rt-notify-item { border-top: 1px solid rgba(149, 107, 255, .14); }
.rt-notify-item a { display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 10px; align-items: start; padding: 12px 16px; color: #aab0d3; text-decoration: none; }
.rt-notify-item a:hover, .rt-notify-item a:focus-visible { background: rgba(149, 107, 255, .12); outline: none; }
.rt-notify-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: transparent; }
.rt-notify-txt { grid-column: 2; font-size: 13.5px; line-height: 1.5; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rt-notify-meta { grid-column: 2; display: flex; gap: 8px; margin-top: 4px; font-size: 11.5px; color: #7f86ad; }
.rt-notify-item.is-unread a { background: rgba(124, 77, 255, .10); color: #f1f2ff; }
.rt-notify-item.is-unread a:hover { background: rgba(124, 77, 255, .2); }
.rt-notify-item.is-unread .rt-notify-dot { background: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .22); }
.rt-notify-item.is-unread .rt-notify-state { color: #b79bff; font-weight: 600; }
.rt-notify-empty { margin: 0; padding: 42px 16px; text-align: center; font-size: 13.5px; color: #8b92b8; }

/* 라이트 테마: 같은 퍼플 계열을 밝은 바탕으로 */
html[data-theme="light"] .rt-notify-panel { background: #fff; color: #23253a; border-color: rgba(124, 77, 255, .35); box-shadow: 0 16px 40px rgba(40, 30, 90, .18); }
html[data-theme="light"] .rt-notify-head { border-bottom-color: rgba(124, 77, 255, .18); }
html[data-theme="light"] .rt-notify-title { color: #1b1c2e; }
html[data-theme="light"] .rt-notify-readall { color: #5b36d6; border-color: rgba(124, 77, 255, .4); }
html[data-theme="light"] .rt-notify-readall:hover { background: rgba(124, 77, 255, .1); color: #3d1fa8; }
html[data-theme="light"] .rt-notify-item + .rt-notify-item { border-top-color: rgba(124, 77, 255, .12); }
html[data-theme="light"] .rt-notify-item a { color: #6a6d8c; }
html[data-theme="light"] .rt-notify-item a:hover, html[data-theme="light"] .rt-notify-item a:focus-visible { background: rgba(124, 77, 255, .08); }
html[data-theme="light"] .rt-notify-item.is-unread a { background: rgba(124, 77, 255, .07); color: #1b1c2e; }
html[data-theme="light"] .rt-notify-meta { color: #8a8da8; }
html[data-theme="light"] .rt-notify-item.is-unread .rt-notify-state { color: #6a3df0; }
html[data-theme="light"] .rt-notify-empty { color: #7a7d99; }
html:root[data-theme="light"] .rt-header .rt-auth .rt-notify-btn { color: #4b4f73; }
html:root[data-theme="light"] .rt-header .rt-auth .rt-notify-btn:hover, html:root[data-theme="light"] .rt-header .rt-auth .rt-notify-btn[aria-expanded="true"] { color: #3d1fa8; }
html[data-theme="light"] .rt-notify-badge { box-shadow: 0 0 0 2px #fff; }

/* ── 모바일(≤767px): 톱니바퀴는 헤더에서 빼서 회원 메뉴의 '설정' 줄로 옮기고, 그 자리에 종 버튼을 둔다 ── */
.rt-auth-set { display: none; }
.rt-notify-ico, .rt-notify-chev, .rt-notify-title-ico { display: none; }   /* 모바일 컴팩트 목록 전용 — PC 는 기존 모양 그대로 */
@media (max-width: 767px) {
	.rt-notify { display: block; }
	html:root .rt-header .rt-settings-btn { display: none; }
	.rt-auth-set { display: list-item; }
	html:root .rt-header .rt-auth .rt-notify-btn { width: 30px; height: 30px; }
	html:root .rt-header .rt-auth .rt-notify-btn::after { content: ""; position: absolute; inset: -8px; }   /* 보이는 크기 30px, 터치 영역 46px */
	.rt-notify-badge { top: -7px; right: -7px; }
	.rt-notify-panel { width: 320px; max-width: calc(100vw - 16px); }
	.rt-notify-close { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #cdbcff; cursor: pointer; }
	.rt-notify-close:hover { background: rgba(149, 107, 255, .16); color: #fff; }
	/* 컴팩트 목록: 높이는 알림 개수에 따라 자동(고정 높이·최소 높이 없음), 많을 때만 최대 높이 + 내부 스크롤 */
	.rt-notify-panel { max-height: 60vh; max-height: 60dvh; }
	.rt-notify-head { padding: 5px 10px 5px 14px; }
	.rt-notify-title { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; }
	.rt-notify-title-ico { display: block; color: #b79bff; }
	.rt-notify-acts { gap: 6px; }
	.rt-notify-readall { padding: 5px 9px; font-size: 12px; }
	.rt-notify-close { width: 28px; height: 28px; }
	.rt-notify-body { flex: 0 1 auto; min-height: 0; }
	.rt-notify-item a { grid-template-columns: 32px minmax(0, 1fr) 16px; column-gap: 11px; align-items: center; padding: 6px 12px; }
	.rt-notify-dot { display: none; }
	.rt-notify-ico { grid-column: 1; grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(124, 77, 255, .22); color: #cdbcff; }
	.rt-notify-txt { grid-column: 2; grid-row: 1; font-size: 13.5px; line-height: 1.38; -webkit-line-clamp: 2; }
	.rt-notify-meta { grid-column: 2; grid-row: 2; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; }
	.rt-notify-item.is-unread .rt-notify-state { padding: 1px 7px; border-radius: 999px; background: #7c4dff; color: #fff; font-size: 10.5px; line-height: 1.5; }
	.rt-notify-chev { grid-column: 3; grid-row: 1 / span 2; display: block; color: #8f7fe0; }
	.rt-notify-empty { padding: 20px 12px; font-size: 13px; }
	html[data-theme="light"] .rt-notify-ico { background: rgba(124, 77, 255, .12); color: #5b36d6; }
	html[data-theme="light"] .rt-notify-title-ico, html[data-theme="light"] .rt-notify-chev { color: #6a3df0; }
	html[data-theme="light"] .rt-notify-item.is-unread .rt-notify-state { background: #6a3df0; color: #fff; }
	html[data-theme="light"] .rt-notify-close { color: #5b36d6; }
	html[data-theme="light"] .rt-notify-close:hover { background: rgba(124, 77, 255, .1); color: #3d1fa8; }
}
