/* 줌 버튼 / 폰트목록 선택상태 / 스크롤 핸들 — write_letter_v2.html 에서 분리 */

.zoom-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}

#fitToScreen {
    font-size: 13px;
    padding: 3px 10px;
    white-space: nowrap;
}

#zoomValue {
    font-weight: 600;
}

	.list-group-item.on{
		background:#4e52fe;
		color:#FFF;
	}
	.drawtool{
		padding:8px 10px !important;
		border-radius:5px;
	}

	#scroll-rail {
  position: fixed;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 60vh;
  background: rgba(0,0,0,0.12);
  border-radius: 10px;
  z-index: 9999;
  touch-action: none;
}

#scroll-knob {
  position: absolute;
  left: -4px;
  width: 14px;
  height: 40px;
  background: rgba(0,0,0,0.45);
  border-radius: 10px;
  cursor: grab;
  touch-action: none;
}
#scroll-knob:active {
  cursor: grabbing;
  background: rgba(0,0,0,0.7);
}

/* 실행취소/다시실행 버튼: 아이콘 자체를 on/off 이미지로 갈아끼우므로(js 쪽 처리)
   여기서는 <a> 태그가 disabled 속성을 못 쓰는 문제만 클릭 차단으로 보완 */
.btnzone a.disabled {
	pointer-events: none;
	cursor: default;
}

/* ts-icon-bold/italic/strike 은 css/text-stylebox.css(외부, 원본에서 안 보여준 파일)에
   이미 정의돼있을 가능성이 높아 손 안 댐. underline만 새로 추가하는 거라 여기 자체 정의. */
.ts-icon-underline {
	text-decoration: underline;
}

/* 시계 도장(addclock) — 예전 초안(write_letter.php)에만 있던 스타일을 포팅.
   toolbar.js의 addclock('a'/'b')가 이 두 클래스만 지원한다. */
.clock-a {
	font-family: 'Pretendard';
	border: 3px solid rgba(220, 38, 38, 0.75);
	text-align: center;
	padding: 1rem 2rem;
	border-radius: 20px;
	background: #ffffffba;
	color: rgba(220, 38, 38, 0.75);
	text-shadow: 0 0 10px rgba(220, 38, 38, 0.4), 0 0 60px rgba(220, 38, 38, 0.2);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	line-height: 1;
	user-select: none;
	white-space: nowrap;
}
.clock-b {
	font-family: 'Pretendard';
	border: 3px solid rgba(11, 30, 193, 0.5);
	text-align: center;
	padding: 1rem 2rem;
	border-radius: 20px;
	background: #ffffffba;
	color: rgba(11, 30, 193, 0.6);
	text-shadow: 0 0 30px rgba(255, 182, 193, 0.3), 0 0 60px rgba(255, 182, 193, 0.15);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	line-height: 1;
	user-select: none;
	white-space: nowrap;
}
.clock-a .clock_t, .clock-b .clock_t, .clock-c .clock_t, .clock-d .clock_t, .clock-e .clock_t {
	font-size: 2.5rem;
	font-weight: 900;
	letter-spacing: 0.1em;
	line-height: 1;
	user-select: none;
	white-space: nowrap;
}

/* c: 초록, 점선 테두리 — 영수증/도장 느낌 */
.clock-c {
	font-family: 'Pretendard';
	border: 3px dashed rgba(22, 163, 74, 0.75);
	text-align: center;
	padding: 1rem 2rem;
	border-radius: 20px;
	background: #ffffffba;
	color: rgba(22, 163, 74, 0.8);
	text-shadow: 0 0 10px rgba(22, 163, 74, 0.35), 0 0 60px rgba(22, 163, 74, 0.15);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	line-height: 1;
	user-select: none;
	white-space: nowrap;
}

/* d: 보라, 네온 글로우 느낌 */
.clock-d {
	font-family: 'Pretendard';
	border: 3px solid rgba(124, 58, 237, 0.7);
	text-align: center;
	padding: 1rem 2rem;
	border-radius: 20px;
	background: #ffffffba;
	color: rgba(124, 58, 237, 0.85);
	text-shadow: 0 0 12px rgba(124, 58, 237, 0.5), 0 0 60px rgba(124, 58, 237, 0.25);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	line-height: 1;
	user-select: none;
	white-space: nowrap;
}

/* e: 골드, 빈티지 우표 느낌(이중선 테두리) */
.clock-e {
	font-family: 'Pretendard';
	border: 3px double rgba(180, 83, 9, 0.85);
	text-align: center;
	padding: 1rem 2rem;
	border-radius: 6px;
	background: #fffaf0ba;
	color: rgba(146, 64, 14, 0.9);
	text-shadow: 0 0 8px rgba(217, 119, 6, 0.3);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	line-height: 1;
	user-select: none;
	white-space: nowrap;
}

/* PC 툴바 "시간넣기" 클릭시 뜨는 작은 선택 팝오버 (a/b 스탬프 고르기) */
#pc-clock-pop {
	display: none;
	position: absolute;
	top: 110%;
	left: 0;
	z-index: 999;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.15);
	padding: 8px;
	min-width: 140px;
	font-weight: normal;
	text-align: left;
}
#pc-clock-pop.open {
	display: block;
}
.pc-clock-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	white-space: nowrap;
}
.pc-clock-item:hover {
	background: #f5f5f5;
}
.pc-clock-item .clock-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

/* ── [2026-12-02] 사진 첨부 (PC 패널 #side_menu_photo / 모바일 사진 모달) ── */
.photo-load-btn{ border-radius: 12px !important; }
.filebox.filebox-compact{
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	padding: 12px 10px !important;
	border-radius: 12px;
}
.filebox.filebox-compact p{ margin: 0; font-size: 14px; color: #555; }

/* 사진이 없을 때 자리 채우기 (PC) */
.img-empty{   /* 사진(.thumnail)·문서(.filelist) 공통 */
	width: 100%;
	padding: 18px 12px 20px;
	border-radius: 14px;
	background: #F7F8FA;
	text-align: center;
}
.img-empty-slots{ display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; }
.img-empty-slots span{
	width: 64px; height: 64px; border-radius: 12px;
	border: 1.5px dashed #CDD3DC; background: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B5BDC9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: center; background-size: 26px 26px;
}
.img-empty-slots span:nth-child(2){ opacity: .75; }
.img-empty-slots span:nth-child(3){ opacity: .5; }
.img-empty-title{ margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #4A5260; }
.img-empty-desc{ margin: 0; font-size: 12.5px; line-height: 1.5; color: #8A93A0; word-break: keep-all; }

/* 모바일: 빈 자리 칸 + 안내 */
.my-img-ph{
	aspect-ratio: 1 / 1; border-radius: 16px;
	border: 1.5px dashed #E1E4EA; background: #FAFAFB;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9CFD8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: center; background-size: 30%;
}
.my-img-empty-hint{ margin: 10px 0 0; font-size: 13px; color: #8A93A0; text-align: center; word-break: keep-all; }
.my-img-empty-hint b{ color: #4A5260; }

/* ── [2026-12-02] 문서 첨부 (PC 패널 #side_menu_doc / 모바일 문서 모달) ── */
.filebox.filebox-doc{ justify-content: center; min-height: 114px; }   /* 사진 칸(아이콘·문구·Ctrl+V)과 같은 높이 */
.img-empty--doc .img-empty-slots span{
	width: 52px; height: 70px;            /* A4 비율 */
	border-radius: 8px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B5BDC9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8l6 6v12a2 2 0 0 1-2 2z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 13h8M8 17h6'/%3E%3C/svg%3E");
	background-size: 24px 24px;
}
/* 모바일 문서 없을 때 */
.my-doc-empty{
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	padding: 22px 14px; border-radius: 16px;
	border: 1.5px dashed #E1E4EA; background: #FAFAFB;
	text-align: center; cursor: pointer;
}
.my-doc-empty-icon{
	width: 40px; height: 40px; margin-bottom: 4px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A9B2BF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8l6 6v12a2 2 0 0 1-2 2z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 13h8M8 17h6'/%3E%3C/svg%3E") no-repeat center / 32px 32px;
}
.my-doc-empty-title{ margin: 0; font-size: 14px; font-weight: 700; color: #4A5260; }
.my-doc-empty-desc{ margin: 0; font-size: 12.5px; color: #8A93A0; word-break: keep-all; }

/* ── [2026-12-02] 사진·문서 패널: 탭과 [불러오기] 버튼 사이 그림·설명 칸 높이 통일 (문서 칸 기준 218px)
   그림이 남는 높이 안에서 줄어들어 맞춤 ── */
.side-intro{
	height: 218px;
	display: flex; flex-direction: column;
}
.side-intro > .text-center.py-4{ flex: 0 0 auto; padding-top: 1rem !important; padding-bottom: .75rem !important; }
.side-intro > .text-center.py-4 p{ margin-bottom: 0; }
.side-intro > .w-100{
	flex: 1 1 auto; min-height: 0;
	display: flex; flex-direction: column; align-items: center;
}
.side-intro > .w-100 > p:first-child{
	flex: 1 1 auto; min-height: 0; margin: 0;
	display: flex; align-items: center; justify-content: center;
}
.side-intro > .w-100 > p:first-child img{
	max-height: 100%; max-width: 100%;
	width: auto !important; height: auto;
	object-fit: contain;
}
.side-intro > .w-100 > p.py-4{ flex: 0 0 auto; margin: 0; padding: .6rem 0 .9rem !important; }

/* ── [2026-12-02] 첨부문서: 일괄 버튼 + 문서별 컬러 ON/OFF 토글 ── */
.doc-list-head{ display: flex; align-items: center; gap: 6px; }
.doc-batch-btns{ display: flex; gap: 6px; margin-left: auto; }
.doc-batch-btn{
	height: 28px; padding: 0 10px; border-radius: 8px;
	font-size: 12px; font-weight: 700; cursor: pointer;
	transition: background .15s;
}
.doc-batch-btn.is-color{ background: #EFF6FF; color: #2563EB; border: 1px solid #BFDBFE; }   /* [2026-12-02] 빨강 → 파랑 (토글과 같은 계열) */
.doc-batch-btn.is-color:hover{ background: #DBEAFE; }
/* 모바일 문서 모달의 [컬러일괄] 도 같은 파랑 (css/pop.css 원래 빨강) */
#modal_doc .my-batch-btn-color{ background: #EFF6FF; color: #2563EB; border-color: #BFDBFE; }
#modal_doc .my-batch-btn-color:hover{ background: #DBEAFE; }
.doc-batch-btn.is-bw{ background: #F3F4F6; color: #374151; border: 1px solid #E2E4E9; }
.doc-batch-btn.is-bw:hover{ background: #E7E9ED; }

.doc-item-right{ display: flex; align-items: center; gap: 4px; margin: 0; flex-shrink: 0; }
.doc-cl-toggle{
	display: inline-flex; align-items: center; gap: 6px;
	cursor: pointer; user-select: none; white-space: nowrap;
}
.doc-cl-text{ font-size: 12px; font-weight: 700; color: #6B7280; min-width: 24px; text-align: right; }
.doc-cl-toggle.on .doc-cl-text{ color: #2563EB; }
.doc-cl-switch{
	position: relative; width: 38px; height: 22px; border-radius: 999px;
	background: #C9CED6; transition: background .2s;
	flex-shrink: 0;
}
.doc-cl-toggle.on .doc-cl-switch{ background: #3B82F6; }
.doc-cl-knob{
	position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
	transition: transform .2s;
}
.doc-cl-toggle.on .doc-cl-knob{ transform: translateX(16px); }
