/* css/modals.css */
.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-main);
  padding: 24px;
  border-radius: 20px;
  width: 85%;
  max-width: 400px;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow-y: auto;
}

.download-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-sec);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.download-input-group:focus-within { border-color: var(--accent); }

.download-input-group input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 12px;
  font-size: 14px;
  outline: none;
}

.file-ext {
  padding: 12px;
  background: var(--bg-ter);
  color: var(--accent);
  font-weight: bold;
  border-left: 1px solid var(--border);
  font-size: 14px;
}

.btn-cancel {
  flex: 1; padding: 12px; background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: all 0.2s;
  font-weight: 500;
}

.btn-cancel:hover { background: var(--bg-sec); color: var(--text-main); }

.btn-confirm {
  flex: 1; padding: 12px; background: var(--accent); color: #000;
  border: none; border-radius: 8px; cursor: pointer; font-weight: bold; transition: all 0.2s;
}

.btn-confirm:hover { filter: brightness(1.1); transform: translateY(-1px); }

.zip-option-btn {
  padding: 12px; background: var(--bg-sec); color: var(--text-main);
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; text-align: left; transition: all 0.2s;
}

.zip-option-btn:hover { background: var(--bg-ter); border-color: var(--accent); transform: translateY(-1px); }
.zip-option-btn.primary { border-color: var(--accent); }

.hitl-modal { max-width: 450px; }
.hitl-choices { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; padding-right: 4px; min-height: 0; }
.hitl-choice-btn {
  padding: 12px; background: var(--bg-sec); color: var(--text-main);
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; text-align: left; transition: all 0.2s;
  font-size: 13px; line-height: 1.4;
}

.hitl-choice-btn:hover { background: var(--bg-ter); border-color: var(--accent); }
.hitl-choice-btn.selected {
  background: rgba(163, 130, 87, 0.2);
  border-color: var(--accent);
  font-weight: bold;
  box-shadow: 0 0 8px rgba(163, 130, 87, 0.3);
}

.slider-group { display: flex; flex-direction: column; gap: 8px; }
.slider-header { display: flex; justify-content: space-between; align-items: center; }
.slider-header label { font-size: 12px; color: var(--text-muted); font-weight: bold; }
.slider-header input[type="number"] {
  width: 65px; padding: 6px; background: var(--bg-ter); border: 1px solid var(--border-light);
  color: var(--text-main); border-radius: 6px; font-size: 12px; text-align: center; outline: none; transition: border-color 0.2s;
}
.slider-header input[type="number"]:focus { border-color: var(--accent); }

input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 4px; background: var(--border-light); border-radius: 2px; outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer; transition: transform 0.1s; box-shadow: 0 0 6px rgba(0,0,0,0.5);
}

.doc-viewer-modal {
  width: 95%; max-width: 800px; max-height: 85vh; display: flex; flex-direction: column;
  padding: 0; overflow: hidden; background: var(--bg-main);
}

.doc-viewer-header {
  display: flex; justify-content: space-between; align-items: center; padding: 16px 20px;
  background: var(--bg-sec); border-bottom: 1px solid var(--border); border-radius: 20px 20px 0 0; flex-shrink: 0; gap: 12px;
}

.doc-viewer-title-container { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.doc-viewer-title { color: var(--accent); font-weight: bold; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }

.btn-back-icon, .btn-close-icon {
  background: transparent; border: none; color: var(--text-main); width: 32px; height: 32px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0; padding: 0;
}

.btn-close-icon:hover { background: var(--danger); color: white; transform: scale(1.1); }

.doc-viewer-body {
  padding: 20px; overflow-y: auto; color: var(--text-main); font-size: 14px; line-height: 1.6;
  border-radius: 0 0 20px 20px; word-break: break-word; white-space: pre-wrap; flex: 1;
}

.doc-file-list { display: flex; flex-direction: column; gap: 8px; }
.doc-file-item {
  display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg-sec);
  border: 1px solid var(--border-light); border-radius: 8px; cursor: pointer; transition: all 0.2s ease;
}
.doc-file-item:hover { background: var(--bg-ter); border-color: var(--accent); }
.doc-file-item .file-name { flex: 1; color: var(--text-main); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
