/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--text);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.info { background: var(--accent); }

/* Dialog Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 320px;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.modal-content h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  white-space: pre-wrap;
  max-height: 50vh;
  overflow-y: auto;
}

.modal-content .input-group {
  margin-bottom: 16px;
}

.modal-content .input-group input {
  width: 100%;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Transfer overlay */
.transfer-overlay {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.2s, transform 0.2s;
}

.transfer-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.transfer-overlay .transfer-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-bar-bg {
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.transfer-bar-bg .bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.2s;
}

.transfer-details {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

/* Settings page */
.settings-page {
  padding: 24px;
  max-width: 600px;
}

.settings-page h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.settings-group {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.settings-group h3 {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.settings-row:last-child { border-bottom: none; }

.settings-detail {
  padding: 6px 0;
  font-family: var(--font-mono);
}

.settings-detail[hidden] { display: none; }

/* Security warning icon in file list */
.security-warn {
  margin-right: 4px;
  font-size: 14px;
  vertical-align: middle;
}

.security-warn.severity-high { color: var(--error); }
.security-warn.severity-medium { color: var(--warning); }
.security-warn.severity-low { color: var(--text-tertiary); }

/* Security alert banner in file viewer */
.security-alert {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

/* Security banner in sidebar */
.security-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--accent);
  line-height: 1.4;
}

.security-banner[hidden] { display: none; }

.security-banner svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Danger button */
.danger {
  color: var(--error) !important;
  border-color: var(--error) !important;
}

.danger:hover {
  background: rgba(255, 59, 48, 0.1) !important;
}

/* Hidden file input */
#uploadInput { display: none; }
