/* ====================================================
   📝 Memo Mode - Post-it 스타일
   ==================================================== */

/* 메모 모드 커서 */
.memo-active { cursor: crosshair !important; }

/* DivIcon 기본 오버라이드 */
.memo-box {
    background: transparent !important;
    border: none !important;
    pointer-events: auto !important;
    overflow: visible !important;
}

/* Post-it 컨테이너 */
.memo-container {
    width: 250px;
    min-height: 80px;
    padding: 0;
    border-radius: 3px;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.2), 0 0 1px rgba(0,0,0,0.15);
    font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans KR', 'Segoe UI', sans-serif;
    position: relative;
    transform: rotate(-1deg);
    transition: box-shadow 0.2s;
}
.memo-container:hover {
    box-shadow: 3px 5px 15px rgba(0,0,0,0.3), 0 0 2px rgba(0,0,0,0.2);
}

/* 헤더 (드래그 + 버튼) */
.memo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 5px 0;
}
.memo-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* 드래그 핸들 */
.memo-drag-handle {
    cursor: grab;
    color: rgba(0,0,0,0.3);
    font-size: 16px;
    user-select: none;
    padding: 3px 5px;
    line-height: 1;
}
.memo-drag-handle:active { cursor: grabbing; }

/* 삭제 버튼 */
.memo-delete-btn {
    background: none;
    border: none;
    color: rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 14px;
    padding: 3px 5px;
    line-height: 1;
}
.memo-delete-btn:hover { color: #dc2626; }

/* 사진 버튼 */
.memo-photo-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    padding: 3px 4px;
    line-height: 1;
    opacity: 0.6;
}
.memo-photo-btn:hover { opacity: 1; }

/* 텍스트 입력 */
.memo-textarea {
    width: calc(100% - 10px);
    min-height: 40px;
    max-height: 120px;
    border: none;
    background: transparent;
    resize: vertical;
    font-size: 12px;
    line-height: 1.4;
    padding: 3px 5px 4px;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    overflow-y: auto;
}
.memo-textarea::placeholder { color: rgba(0,0,0,0.25); font-size: 11px; }
.memo-textarea:focus { background: rgba(255,255,255,0.15); }

/* 사진 크기 토글 */
.memo-photo-view-btn {
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.12);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    color: rgba(0,0,0,0.5);
    margin-bottom: 3px;
    display: inline-block;
    font-weight: 600;
}
.memo-photo-view-btn:hover { background: rgba(0,0,0,0.2); color: rgba(0,0,0,0.7); }

/* 사진 영역 */
.memo-photos {
    display: flex;
    gap: 5px;
    padding: 3px 5px 5px;
    flex-wrap: wrap;
}
/* 확대 모드 (기본) — 사진 전체 폭으로 표시 */
.memo-photos-expand {
    flex-direction: column;
}
.memo-photos-expand .memo-photo-thumb {
    width: 100% !important;
    height: auto !important;
    max-height: 300px;
    border-radius: 4px;
}
.memo-photos-expand .memo-photo-thumb img {
    width: 100%;
    height: auto !important;
    max-height: 280px;
    object-fit: contain;
}
/* 축소 모드 — 썸네일 */
.memo-photo-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.12);
}
.memo-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.memo-photo-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.6);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}
.memo-photo-thumb:hover .memo-photo-delete { opacity: 1; }

/* 크기 토글 버튼 */
.memo-size-btn {
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.12);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    line-height: 1.3;
    border-radius: 4px;
    color: rgba(0,0,0,0.5);
    font-family: monospace;
    min-width: 22px;
    text-align: center;
}
.memo-size-btn:hover { background: rgba(0,0,0,0.2); color: rgba(0,0,0,0.7); }

/* ── 크기 프리셋 ── */
.memo-size-s.memo-container { width: 200px; min-height: 60px; }
.memo-size-s .memo-textarea { font-size: 12px; min-height: 35px; max-height: 100px; }
.memo-size-s .memo-photo-thumb { width: 60px; height: 60px; }

.memo-size-m.memo-container { width: 280px; }
.memo-size-m .memo-photo-thumb { width: 80px; height: 80px; }

.memo-size-l.memo-container { width: 400px; min-height: 100px; }
.memo-size-l .memo-textarea { font-size: 14px; min-height: 60px; max-height: 250px; }
.memo-size-l .memo-photo-thumb { width: 120px; height: 120px; }

/* PNU 태그 */
.memo-pnu-tag {
    font-size: 9px;
    color: rgba(0,0,0,0.35);
    padding: 0 5px 3px;
    text-align: right;
}

/* 화살표머리 */
.memo-arrow-head {
    background: transparent !important;
    border: none !important;
    pointer-events: none !important;
}
