/* CSS Styles */
/* --- 기본 레이아웃, 컨트롤, 버튼, 로그, 그리드, 이미지 영역 스타일 --- */
body {
  display: flex;
  padding: 20px;
  /* Use viewport height minus padding */
  height: calc(100vh - 40px);
  box-sizing: border-box;
  font-family: sans-serif;
  overflow: hidden; /* Prevent body scrollbars if content overflows slightly */
}

.left-column {
  flex-grow: 1;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  /* Let the column take full available height */
  height: 100%;
  /* overflow: hidden; */ /* Removing this might be better to see if anything overflows unexpectedly at first */
}

.right-column {
  width: 400px;
  flex-shrink: 0;
  border-left: 1px solid #ccc;
  padding-left: 20px;
  height: 100%;
  overflow-y: auto; /* Allow right column to scroll if needed */
  display: flex; /* Keep flex for image alignment if needed */
  flex-direction: column; /* Keep flex for image alignment if needed */
}

.title-area {
  /* Existing styles are fine */
  flex-shrink: 0; /* Prevent title from shrinking */
  margin-bottom: 5px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

/* --- NEW: Style for Room Code display --- */
#roomInfo {
    display: flex;
    gap: 15px; /* Space between code and count */
    align-items: baseline;
    font-size: 0.9em;
    color: #555;
}
#roomCodeDisplay {
    font-weight: bold;
    background-color: #e0e0e0;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: help; /* Indicate it might be selectable/copyable */
}
#roomCount {
  /* font-size: 0.8em; */ /* Adjusted size in #roomInfo */
  color: #666;
}
/* --- End Room Code Style --- */

.controls-area {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
  /* This area will contain the growing editor */
  flex-grow: 1; /* Make controls area take space, allowing editor inside to grow */
  min-height: 0; /* Necessary for flex-grow in some browsers */
  overflow: hidden; /* Hide overflow within the controls area */
}

#editorContainer {
  display: flex;
  gap: 10px;
  width: 100%;
  /* REMOVE fixed height: height: 500px; */
  margin-bottom: 10px;
  flex-grow: 1; /* Make the editor container grow */
  min-height: 150px; /* Set a minimum height for the editors */
  overflow: hidden; /* Prevent editor container itself from overflowing */
}

.CodeMirror {
  flex: 1;
  height: 100% !important; /* Keep this to fill the editor container divs */
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Styles for cm-s-material, CodeMirror-dialog, etc. remain the same */
.cm-s-material.CodeMirror { background: #263238; color: #eeffff; }
.CodeMirror-dialog { background: #f8f8f8; color: #333; border: 1px solid #ccc; padding: 5px 10px; border-radius: 3px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); }
.CodeMirror-dialog input { border: 1px solid #aaa; padding: 3px 5px; }
.CodeMirror-dialog button { margin-left: 5px; padding: 3px 8px; font-size: 0.9em; }

.button-area {
  display: flex;
  gap: 10px;
  flex-shrink: 0; /* Prevent button area from shrinking */
}

button { padding: 8px 15px; border: none; background-color: #007bff; color: white; border-radius: 3px; cursor: pointer; transition: background-color 0.2s ease; }
button:hover { background-color: #0056b3; }
button#saveBtn { background-color: #28a745; }
button#saveBtn:hover { background-color: #218838; }
button#saveBtn:disabled { background-color: #cccccc; cursor: not-allowed; }

hr {
  width: 100%;
  margin-top: 15px;
  margin-bottom: 15px;
  border: 0;
  border-top: 1px solid #eee;
  flex-shrink: 0; /* Prevent hr from shrinking */
}

/* Explicitly select the h3 before the log area */
.left-column > h3:nth-of-type(1) {
    flex-shrink: 0; /* Prevent log title from shrinking */
    margin-top: 0; /* Adjust margin if needed */
    margin-bottom: 5px;
}

#realtimeLogArea {
  width: 100%;
  /* Keep a fixed height for the log area */
  height: 100px; /* Or adjust as needed (e.g., 120px) */
  flex-shrink: 0; /* IMPORTANT: Prevent log area from shrinking */
  overflow-y: scroll;
  border: 1px solid #ddd;
  background-color: #f8f8f8;
  padding: 8px;
  font-family: monospace;
  font-size: 0.8em;
  white-space: pre-wrap;
  word-break: break-all;
  box-sizing: border-box;
  margin-bottom: 15px;
}

#snapshotHistoryArea {
  width: 100%;
  /* 최소 높이 설정하고 내용에 따라 늘어나도록 */
  min-height: 200px;
  max-height: 400px; /* 최대 높이 제한 */
  flex-shrink: 0; /* IMPORTANT: Prevent snapshot area from shrinking */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Container should hide overflow */
}

#snapshotHistoryArea h3 {
  margin-bottom: 10px;
  font-size: 1.1em;
  color: #333;
  flex-shrink: 0; /* Prevent title from shrinking */
}

#snapshotGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  /* Let the grid grow to fill the snapshotHistoryArea */
  flex-grow: 1;
  overflow-y: auto; /* Allow vertical scrolling WITHIN the grid */
  padding: 10px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  border-radius: 3px;
  align-content: flex-start;
  min-height: 150px; /* 최소 높이 보장 */
  max-height: 300px; /* 최대 높이 제한하여 스크롤 활성화 */
}

/* Styles for snapshot-item, thumbnail, timestamp, etc. remain the same */
.snapshot-item { width: 100px; height: 140px; border: 1px solid #ddd; background-color: #fff; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; font-size: 0.7em; color: #555; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; position: relative; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); padding: 5px; box-sizing: border-box; }
.snapshot-item:hover { transform: scale(1.05); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }
.snapshot-item .thumbnail-container { width: 100%; height: 45%; display: flex; justify-content: center; align-items: center; overflow: hidden; background-color: #eee; }
.snapshot-item img.thumbnail { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.snapshot-item .snapshot-name { font-size: 1em; font-weight: bold; margin-top: 3px; display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; }
.snapshot-item .snapshot-description { font-size: 0.85em; margin-top: 2px; display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #666; font-style: italic; }
.snapshot-item .timestamp { font-size: 0.8em; margin-top: 2px; display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #888; }
#snapshotGrid p { width: 100%; text-align: center; padding: 20px; color: #888; }

#receivedImage { max-width: 100%; display: block; margin-top: 10px; border: 1px solid #eee; }

/* --- CodeMirror Autocomplete Hint Styling (Keep as is) --- */
.CodeMirror-hints { position: absolute; z-index: 100; overflow: hidden; list-style: none; margin: 0; padding: 2px; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2); border-radius: 4px; border: 1px solid #aaa; font-size: 0.9em; font-family: inherit; max-height: 18em; overflow-y: auto; min-width: 260px; }
.cm-s-material .CodeMirror-hints { background: #37474f; border-color: #546e7a; color: #eeffff; }
.CodeMirror-hint { margin: 0; padding: 6px 8px; border-radius: 3px; white-space: normal; color: inherit; cursor: pointer; display: block; }
li.CodeMirror-hint-active { background: #03a9f4; color: white; }
.cm-s-material li.CodeMirror-hint-active { background: #546e7a; color: #ffffff; }
.json-key-hint-title { font-weight: 700; line-height: 1.2; }
.json-key-hint-detail { color: #b0bec5; font-size: 0.85em; line-height: 1.35; margin-top: 2px; }
li.CodeMirror-hint-active .json-key-hint-detail { color: #e3f2fd; }
.json-key-assist-tooltip {
  position: absolute;
  z-index: 120;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid #546e7a;
  border-radius: 6px;
  background: #263238;
  color: #eeffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
}
.json-key-assist-title { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.json-key-assist-meta { color: #90a4ae; margin-bottom: 6px; word-break: break-all; }
.json-key-assist-row { color: #cfd8dc; }

/* --- Collapsible Section Styles (Keep as is) --- */
.collapsible-header { cursor: pointer; user-select: none; margin-bottom: 5px; position: relative; padding-right: 20px; }
.collapsible-header .toggle-icon { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-weight: bold; font-size: 1.1em; color: #555; transition: transform 0.2s ease; }
#realtimeLogArea.collapsed,
#snapshotGrid.collapsed { display: none; }
#snapshotHistoryArea.collapsed-container { height: auto; flex-grow: 0; flex-shrink: 0; min-height: auto; }
#snapshotHistoryArea { display: flex; flex-direction: column; transition: height 0.3s ease, min-height 0.3s ease; width: 100%; flex-shrink: 0; overflow: hidden; }
#realtimeLogArea { width: 100%; height: 100px; flex-shrink: 0; overflow-y: scroll; border: 1px solid #ddd; background-color: #f8f8f8; padding: 8px; font-family: monospace; font-size: 0.8em; white-space: pre-wrap; word-break: break-all; box-sizing: border-box; margin-bottom: 15px; transition: height 0.3s ease, margin-bottom 0.3s ease, padding 0.3s ease, border 0.3s ease; }
#realtimeLogArea.collapsed { height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0; border-width: 0; overflow: hidden; }
#snapshotGrid { display: flex; flex-wrap: wrap; gap: 10px; flex-grow: 1; overflow-y: auto; padding: 10px; border: 1px solid #ccc; background-color: #f9f9f9; border-radius: 3px; align-content: flex-start; min-height: 0; transition: padding 0.3s ease, border 0.3s ease; }
#snapshotGrid.collapsed { height: 0; padding: 0; border-width: 0; flex-grow: 0; overflow: hidden; }

/* --- Key Structure Editor Modal Styles --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.25s, opacity 0.25s;
}

.modal-overlay.visible {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.modal-container {
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  max-height: 90%;
  width: 800px;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5em;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  color: #888;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  flex: 1;
  overflow: auto;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.modal-editor-container {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 3px;
  overflow: hidden;
  min-height: 350px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  margin-top: 15px;
}

#keyStructureEditor {
  width: 100%;
  height: 100%;
}

.modal-footer button {
  padding: 8px 15px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modal-footer button.save-btn {
  background-color: #28a745;
  color: white;
}

.modal-footer button.save-btn:hover {
  background-color: #218838;
}

.modal-footer button.cancel-btn {
  background-color: #6c757d;
  color: white;
}

.modal-footer button.cancel-btn:hover {
  background-color: #5a6268;
}

#keyStructureBtn {
  background-color: #17a2b8;
  margin-left: auto;
}

#keyStructureBtn:hover {
  background-color: #138496;
}

/* Status message styles */
.status-message {
  padding: 8px 12px;
  margin: 10px 0;
  border-radius: 4px;
  font-size: 0.9em;
  display: none;
}

.status-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Key Structure Editor Popup Styles */
.editor-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.editor-popup-content {
  background-color: #2d2d2d;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  width: 80%;
  max-width: 900px;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  color: #eee;
}

.editor-popup-header {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #444;
}

.editor-popup-header h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.editor-popup-close {
  cursor: pointer;
  font-size: 24px;
  color: #999;
  transition: color 0.3s;
  user-select: none;
}

.editor-popup-close:hover {
  color: #f44;
}

.editor-popup-body {
  padding: 20px;
  flex-grow: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.editor-popup-container {
  flex-grow: 1;
  min-height: 300px;
  position: relative;
}

.editor-popup-textarea {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 1px solid #555;
  background-color: #282c34;
  color: #eee;
  font-family: monospace;
  resize: none;
}

.editor-popup-buttons {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.editor-popup-button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

#saveKeyStructureBtn {
  background-color: #0078d4;
  color: white;
}

#saveKeyStructureBtn:hover {
  background-color: #0069bd;
}

#cancelKeyStructureBtn {
  background-color: #555;
  color: white;
}

#cancelKeyStructureBtn:hover {
  background-color: #444;
}

.editor-popup-footer {
  padding: 10px 20px;
  border-top: 1px solid #444;
  font-size: 12px;
  color: #888;
}

/* Override CodeMirror styles to fit the popup better */
.editor-popup .CodeMirror {
  height: 100%;
  min-height: 300px;
  border: 1px solid #555;
}

/* Key Structure Editor Button */
#keyStructureEditorBtn {
  background-color: #2d2d2d;
  color: white;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#keyStructureEditorBtn:hover {
  background-color: #444;
}

#keyStructureEditorBtn:active {
  background-color: #555;
}

/* === Folder Management Styles === */

#folderManagement {
  margin-bottom: 15px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
}

.folder-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.folder-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85em;
  transition: background-color 0.2s;
}

.folder-btn:hover {
  background-color: #45a049;
}

#folderSelect {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9em;
  background-color: white;
  cursor: pointer;
}

#folderSelect:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.folder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 80px;
  overflow-y: auto;
}

.folder-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s;
  position: relative;
}

.folder-item:hover {
  background-color: #e9ecef;
  border-color: #007bff;
}

.folder-item.active {
  background-color: #007bff;
  color: white;
  border-color: #0056b3;
}

.folder-item.active .folder-count {
  color: rgba(255, 255, 255, 0.8);
}

.folder-icon {
  font-size: 1.1em;
}

.folder-name {
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-count {
  color: #888;
  font-size: 0.9em;
}

.folder-actions {
  display: none;
  gap: 2px;
  margin-left: 5px;
}

.folder-item:hover .folder-actions {
  display: flex;
}

.folder-edit-btn,
.folder-delete-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.folder-edit-btn {
  background-color: #17a2b8;
  color: white;
}

.folder-edit-btn:hover {
  background-color: #138496;
}

.folder-delete-btn {
  background-color: #dc3545;
  color: white;
}

.folder-delete-btn:hover {
  background-color: #c82333;
}

/* 스냅샷 아이템 폴더 표시 */
.snapshot-folder-badge {
  position: absolute;
  bottom: 2px;
  left: 2px;
  font-size: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 1px 4px;
  border-radius: 2px;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 스냅샷 그리드가 비어있을 때 폴더 안내 */
#snapshotGrid p {
  width: 100%;
  text-align: center;
  padding: 20px;
  color: #888;
}

/* === setMethod Dialog Styles === */

#setMethodBtn {
  background-color: #6f42c1;
}

#setMethodBtn:hover {
  background-color: #5a32a3;
}

.setmethod-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.2s, opacity 0.2s ease;
}

.setmethod-modal-overlay.visible {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.setmethod-modal-container {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 450px;
  max-width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.setmethod-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  background-color: #6f42c1;
  color: white;
  border-radius: 10px 10px 0 0;
}

.setmethod-modal-header h3 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
}

.setmethod-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5em;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.setmethod-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.setmethod-modal-body {
  padding: 20px;
  overflow-y: auto;
}

.setmethod-form-group {
  margin-bottom: 15px;
  position: relative;
}

.setmethod-form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
  font-size: 0.95em;
}

.setmethod-form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.setmethod-form-group input:focus {
  outline: none;
  border-color: #6f42c1;
  box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.15);
}

.setmethod-form-group input::placeholder {
  color: #aaa;
}

.setmethod-key-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  margin-top: 2px;
}

.suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.95em;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.15s;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background-color: #f5f0ff;
}

.setmethod-history {
  margin-top: 20px;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.setmethod-history h4 {
  margin: 0 0 10px 0;
  font-size: 0.95em;
  color: #666;
  font-weight: 600;
}

#historyList {
  max-height: 150px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background-color: #f8f9fa;
  border-radius: 5px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
  font-size: 0.9em;
}

.history-item:hover {
  background-color: #e9ecef;
}

.history-key {
  font-weight: 600;
  color: #6f42c1;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-separator {
  margin: 0 8px;
  color: #999;
}

.history-value {
  flex: 1;
  color: #28a745;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-use-btn {
  background-color: #6f42c1;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.85em;
  cursor: pointer;
  margin-left: auto;
  transition: background-color 0.2s;
}

.history-use-btn:hover {
  background-color: #5a32a3;
}

.no-history {
  color: #999;
  font-size: 0.9em;
  text-align: center;
  padding: 10px;
  margin: 0;
}

.setmethod-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid #eee;
  background-color: #f8f9fa;
  border-radius: 0 0 10px 10px;
}

.setmethod-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.setmethod-btn:active {
  transform: scale(0.98);
}

.setmethod-btn.cancel {
  background-color: #6c757d;
  color: white;
}

.setmethod-btn.cancel:hover {
  background-color: #5a6268;
}

.setmethod-btn.send {
  background-color: #6f42c1;
  color: white;
}

.setmethod-btn.send:hover {
  background-color: #5a32a3;
}
